summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jogamp/opencl/impl')
-rw-r--r--src/com/jogamp/opencl/impl/CLEventCallback.java15
-rw-r--r--src/com/jogamp/opencl/impl/CLImpl.java11
2 files changed, 26 insertions, 0 deletions
diff --git a/src/com/jogamp/opencl/impl/CLEventCallback.java b/src/com/jogamp/opencl/impl/CLEventCallback.java
new file mode 100644
index 00000000..db4d5b35
--- /dev/null
+++ b/src/com/jogamp/opencl/impl/CLEventCallback.java
@@ -0,0 +1,15 @@
+/*
+ * Created on Tuesday, July 06 2010 00:46
+ */
+
+package com.jogamp.opencl.impl;
+
+/**
+ * A callback for a specific command execution status.
+ * @author Michael Bien
+ */
+public interface CLEventCallback {
+
+ public void eventStateChanged(long event, int status);
+
+}
diff --git a/src/com/jogamp/opencl/impl/CLImpl.java b/src/com/jogamp/opencl/impl/CLImpl.java
index abec3597..b9dd9835 100644
--- a/src/com/jogamp/opencl/impl/CLImpl.java
+++ b/src/com/jogamp/opencl/impl/CLImpl.java
@@ -123,6 +123,17 @@ public class CLImpl extends CLAbstractImpl {
/** Entry point to C language function: <code> int32_t clBuildProgram(cl_program, uint32_t, cl_device_id * , const char * , void * ); </code> */
private native int clBuildProgram0(long program, int deviceCount, Object deviceList, int deviceListOffset, String options, BuildProgramCallback cb, long address);
+
+ public int clSetEventCallback(long event, int trigger, CLEventCallback callback) {
+ final long address = addressTable._addressof_clSetEventCallback;
+ if (address == 0) {
+ throw new UnsupportedOperationException("Method not available");
+ }
+ return clSetEventCallback0(event, trigger, callback, address);
+ }
+
+ private native int clSetEventCallback0(long event, int type, CLEventCallback cb, long address);
+
/** Interface to C language function: <br> <code> void * {@native clEnqueueMapImage}(cl_command_queue command_queue, cl_mem image, uint32_t blocking_map, uint64_t map_flags, const size_t * , const size_t * , size_t * image_row_pitch, size_t * image_slice_pitch, uint32_t num_events_in_wait_list, cl_event * event_wait_list, cl_event * event, int32_t * errcode_ret); </code>
@param origin a direct {@link com.jogamp.common.nio.PointerBuffer}
@param range a direct {@link com.jogamp.common.nio.PointerBuffer}