aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jogamp/opencl')
-rw-r--r--src/com/jogamp/opencl/BuildProgramCallback.java13
-rw-r--r--src/com/jogamp/opencl/CLContext.java4
-rw-r--r--src/com/jogamp/opencl/CLProgram.java2
-rw-r--r--src/com/jogamp/opencl/CreateContextCallback.java2
4 files changed, 15 insertions, 6 deletions
diff --git a/src/com/jogamp/opencl/BuildProgramCallback.java b/src/com/jogamp/opencl/BuildProgramCallback.java
index fe2b29b9..9969c918 100644
--- a/src/com/jogamp/opencl/BuildProgramCallback.java
+++ b/src/com/jogamp/opencl/BuildProgramCallback.java
@@ -1,10 +1,19 @@
package com.jogamp.opencl;
/**
+ * A callback an application can register to be called when the program executable
+ * has been built (successfully or unsuccessfully).<br/>
+ * Note1: registering a build callback can make {@link CL#clBuildProgram} non blocking (OpenCL implementation dependent).<br/>
+ * Note2: the thread which calls this method is unspecified. The Application should ensure propper synchronization.
* @author Michael Bien
+ * @see CL#clBuildProgram(long, int, com.jogamp.common.nio.PointerBuffer, java.lang.String, com.jogamp.opencl.BuildProgramCallback)
*/
-// TODO implement callbacks
public interface BuildProgramCallback {
+
+ /**
+ * Called when the program executable
+ * has been built (successfully or unsuccessfully).
+ */
+ public void buildProgramCallback(long cl_program);
- public void buildProgramCallback(long cl_program, Object user_data);
}
diff --git a/src/com/jogamp/opencl/CLContext.java b/src/com/jogamp/opencl/CLContext.java
index 4e172630..e9e0a8a8 100644
--- a/src/com/jogamp/opencl/CLContext.java
+++ b/src/com/jogamp/opencl/CLContext.java
@@ -146,7 +146,7 @@ public class CLContext extends CLObject implements CLResource {
protected static long createContextFromType(PointerBuffer properties, long deviceType) {
IntBuffer status = IntBuffer.allocate(1);
- long context = CLPlatform.getLowLevelCLInterface().clCreateContextFromType(properties, deviceType, null, null, status);
+ long context = CLPlatform.getLowLevelCLInterface().clCreateContextFromType(properties, deviceType, null, status);
checkForError(status.get(), "can not create CL context");
@@ -167,7 +167,7 @@ public class CLContext extends CLObject implements CLResource {
pb.put(i, device.ID);
}
}
- long context = CLPlatform.getLowLevelCLInterface().clCreateContext(properties, pb, null, null, status);
+ long context = CLPlatform.getLowLevelCLInterface().clCreateContext(properties, pb, null, status);
checkForError(status.get(), "can not create CL context");
diff --git a/src/com/jogamp/opencl/CLProgram.java b/src/com/jogamp/opencl/CLProgram.java
index ce2b9dff..43fd9665 100644
--- a/src/com/jogamp/opencl/CLProgram.java
+++ b/src/com/jogamp/opencl/CLProgram.java
@@ -256,7 +256,7 @@ public class CLProgram extends CLObject implements CLResource {
int ret = 0;
// building programs is not threadsafe
// synchronized(buildLock) {
- ret = cl.clBuildProgram(ID, count, deviceIDs, options, null, null);
+ ret = cl.clBuildProgram(ID, count, deviceIDs, options, null);
// }
if(ret != CL_SUCCESS) {
diff --git a/src/com/jogamp/opencl/CreateContextCallback.java b/src/com/jogamp/opencl/CreateContextCallback.java
index dc25860a..a73b6298 100644
--- a/src/com/jogamp/opencl/CreateContextCallback.java
+++ b/src/com/jogamp/opencl/CreateContextCallback.java
@@ -9,6 +9,6 @@ import java.nio.ByteBuffer;
// TODO implement callbacks
public interface CreateContextCallback {
- public void createContextCallback(String errinfo, ByteBuffer private_info, long cb, Object user_data);
+ public void createContextCallback(String errinfo, ByteBuffer private_info, long cb);
}