summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLProgram.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-02-26 03:22:49 +0100
committerMichael Bien <[email protected]>2010-02-26 03:22:49 +0100
commit4d348191412077970954f3bc6e672a34f4a7980b (patch)
tree8a0e43cb5e5252fc79963865523d684e2513486d /src/com/mbien/opencl/CLProgram.java
parent0857dbb04fe9259f1076e9559b822c5032c23461 (diff)
implemented Serialization for CLProgramBuilder.
CLProgram.getBinaries() is now ordered. updated junit to 4.8.1. javadoc fixes.
Diffstat (limited to 'src/com/mbien/opencl/CLProgram.java')
-rw-r--r--src/com/mbien/opencl/CLProgram.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/mbien/opencl/CLProgram.java b/src/com/mbien/opencl/CLProgram.java
index 44e747bf..a5d1311c 100644
--- a/src/com/mbien/opencl/CLProgram.java
+++ b/src/com/mbien/opencl/CLProgram.java
@@ -9,6 +9,7 @@ import java.nio.IntBuffer;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.LinkedHashMap;
import java.util.Set;
import java.util.Map;
@@ -250,7 +251,7 @@ public class CLProgram extends CLObject implements CLResource {
* Prepares the build for this program by returning a new {@link CLProgramConfiguration}.
*/
public CLProgramConfiguration prepare() {
- return CLProgramBuilder.createForProgram(this);
+ return CLProgramBuilder.createConfiguration(this);
}
/**
@@ -437,7 +438,7 @@ public class CLProgram extends CLObject implements CLResource {
}
/**
- * Returns the binaries for this program in a Map containing the device as key
+ * Returns the binaries for this program in an ordered Map containing the device as key
* and the program binaries as value.
*/
public Map<CLDevice, byte[]> getBinaries() {
@@ -471,7 +472,7 @@ public class CLProgram extends CLObject implements CLResource {
ret = cl.clGetProgramInfo(ID, CL_PROGRAM_BINARIES, addresses.capacity(), addresses.getBuffer(), null);
checkForError(ret, "on clGetProgramInfo");
- Map<CLDevice, byte[]> map = new HashMap<CLDevice, byte[]>();
+ Map<CLDevice, byte[]> map = new LinkedHashMap<CLDevice, byte[]>();
sizes.rewind();
for (int i = 0; i < devices.length; i++) {
byte[] bytes = new byte[(int)sizes.getLong()];