aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-10-14 20:43:02 +0200
committerMichael Bien <[email protected]>2009-10-14 20:43:02 +0200
commita69ac7eb33e3e963bacf2d47d92875d8e8176d1d (patch)
tree121f68caafd5aebb5816628280195da4b2e14d2d /src/com/mbien/opencl
parenta6b5518bdd903afb65305c9f272875d87454e485 (diff)
implemented clBuildProgram(...) and updated JUnit test.
Diffstat (limited to 'src/com/mbien/opencl')
-rw-r--r--src/com/mbien/opencl/BuildProgramCallback.java10
-rw-r--r--src/com/mbien/opencl/CLContext.java10
-rw-r--r--src/com/mbien/opencl/CLException.java2
-rw-r--r--src/com/mbien/opencl/CreateContextCallback.java1
4 files changed, 20 insertions, 3 deletions
diff --git a/src/com/mbien/opencl/BuildProgramCallback.java b/src/com/mbien/opencl/BuildProgramCallback.java
new file mode 100644
index 00000000..0b2b1b04
--- /dev/null
+++ b/src/com/mbien/opencl/BuildProgramCallback.java
@@ -0,0 +1,10 @@
+package com.mbien.opencl;
+
+/**
+ * @author Michael Bien
+ */
+// TODO implement callbacks
+public interface BuildProgramCallback {
+
+ public void buildProgramCallback(long cl_program, Object user_data);
+}
diff --git a/src/com/mbien/opencl/CLContext.java b/src/com/mbien/opencl/CLContext.java
index bcfb09a0..203172b0 100644
--- a/src/com/mbien/opencl/CLContext.java
+++ b/src/com/mbien/opencl/CLContext.java
@@ -1,6 +1,7 @@
package com.mbien.opencl;
import com.mbien.opencl.impl.CLImpl;
+import com.sun.gluegen.runtime.PointerBuffer;
import java.nio.IntBuffer;
/**
@@ -62,10 +63,9 @@ public final class CLContext {
/**
* Gets the device with maximal FLOPS from this context.
*/
+ /*
public CLDevice getMaxFlopsDevice() {
- //TODO not finished
-
long[] longBuffer = new long[1];
// ByteBuffer bb = ByteBuffer.allocate(8);
// bb.order(ByteOrder.nativeOrder());
@@ -96,6 +96,12 @@ public final class CLContext {
return null;
}
+ public CLDevice[] getCLDevices() {
+
+ }
+*/
+
+
/**
* Lists all available OpenCL implementaitons.
* @throws CLException if something went wrong initializing OpenCL
diff --git a/src/com/mbien/opencl/CLException.java b/src/com/mbien/opencl/CLException.java
index e8ed771f..4539046d 100644
--- a/src/com/mbien/opencl/CLException.java
+++ b/src/com/mbien/opencl/CLException.java
@@ -125,7 +125,7 @@ public class CLException extends RuntimeException {
return "CL_INVALID_MIP_LEVEL";
default:
- return "unknown cause";
+ return "unknown cause: error "+error;
}
}
diff --git a/src/com/mbien/opencl/CreateContextCallback.java b/src/com/mbien/opencl/CreateContextCallback.java
index b25c05fd..e965370c 100644
--- a/src/com/mbien/opencl/CreateContextCallback.java
+++ b/src/com/mbien/opencl/CreateContextCallback.java
@@ -6,6 +6,7 @@ import java.nio.ByteBuffer;
*
* @author Michael Bien
*/
+// TODO implement callbacks
public interface CreateContextCallback {
public void createContextCallback(String errinfo, ByteBuffer private_info, long cb, Object user_data);