diff options
Diffstat (limited to 'src/com/jogamp/opencl/CLProgramBuilder.java')
-rw-r--r-- | src/com/jogamp/opencl/CLProgramBuilder.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/jogamp/opencl/CLProgramBuilder.java b/src/com/jogamp/opencl/CLProgramBuilder.java index 00d4dab9..ece9ba36 100644 --- a/src/com/jogamp/opencl/CLProgramBuilder.java +++ b/src/com/jogamp/opencl/CLProgramBuilder.java @@ -55,7 +55,7 @@ import java.util.Set; * @see #loadConfiguration(java.io.ObjectInputStream, com.jogamp.opencl.CLContext) * @author Michael Bien */ -public final class CLProgramBuilder implements CLProgramConfiguration, Serializable { +public final class CLProgramBuilder implements CLProgramConfiguration, Serializable, Cloneable { static final long serialVersionUID = 42; @@ -185,8 +185,10 @@ public final class CLProgramBuilder implements CLProgramConfiguration, Serializa @Override public CLProgramBuilder withDefines(Map<String, ? extends Object> defines) { - for (String name : defines.keySet()) { - defineSet.add(CLProgram.define(name, defines.get(name))); + for (Map.Entry<String, ? extends Object> define : defines.entrySet()) { + String name = define.getKey(); + Object value = define.getValue(); + defineSet.add(CLProgram.define(name, value)); } return this; } @@ -319,10 +321,12 @@ public final class CLProgramBuilder implements CLProgramConfiguration, Serializa return builder; } + @Override public CLProgram getProgram() { return program; } + @Override public CLProgramBuilder setProgram(CLProgram program) { this.program = program; return this; |