summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLEvent.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-06-15 16:32:27 +0200
committerMichael Bien <[email protected]>2011-06-15 16:32:27 +0200
commit4373f933333ecee50dea9686403b6f81759e3b07 (patch)
treebc3883f431a7e2581c80189c466362bb5d6b31f3 /src/com/jogamp/opencl/CLEvent.java
parent841d04d5716cbd7ce98a482060c656b1d5050949 (diff)
internal refactoring to use new binding interfaces in highlevel api impl.
Diffstat (limited to 'src/com/jogamp/opencl/CLEvent.java')
-rw-r--r--src/com/jogamp/opencl/CLEvent.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/jogamp/opencl/CLEvent.java b/src/com/jogamp/opencl/CLEvent.java
index 0b2c1eb7..95b82ab8 100644
--- a/src/com/jogamp/opencl/CLEvent.java
+++ b/src/com/jogamp/opencl/CLEvent.java
@@ -29,6 +29,7 @@
package com.jogamp.opencl;
import com.jogamp.opencl.impl.CLTLInfoAccessor;
+import com.jogamp.opencl.llb.CLEventBinding;
import com.jogamp.opencl.llb.impl.CLEventCallback;
import com.jogamp.common.nio.NativeSizeBuffer;
import java.nio.Buffer;
@@ -48,9 +49,11 @@ public class CLEvent extends CLObject implements CLResource {
private final CLEventInfoAccessor eventInfo;
private final CLEventProfilingInfoAccessor eventProfilingInfo;
+ private final CLEventBinding binding;
CLEvent(CLContext context, long id) {
super(context, id);
+ binding = context.getPlatform().getEventBinding();
this.eventInfo = new CLEventInfoAccessor();
this.eventProfilingInfo = new CLEventProfilingInfoAccessor();
}
@@ -64,7 +67,7 @@ public class CLEvent extends CLObject implements CLResource {
// apparently only ExecutionStatus.COMPLETE is allowed -> private
private void registerCallback(final CLEventListener callback, ExecutionStatus trigger) {
- cl.clSetEventCallback(ID, trigger.STATUS, new CLEventCallback() {
+ binding.clSetEventCallback(ID, trigger.STATUS, new CLEventCallback() {
@Override public void eventStateChanged(long event, int status) {
callback.eventStateChanged(CLEvent.this, status);
}
@@ -73,7 +76,7 @@ public class CLEvent extends CLObject implements CLResource {
@Override
public void release() {
- int ret = cl.clReleaseEvent(ID);
+ int ret = binding.clReleaseEvent(ID);
checkForError(ret, "can not release event");
}
@@ -144,7 +147,7 @@ public class CLEvent extends CLObject implements CLResource {
@Override
protected int getInfo(int name, long valueSize, Buffer value, NativeSizeBuffer valueSizeRet) {
- return cl.clGetEventInfo(ID, name, valueSize, value, valueSizeRet);
+ return binding.clGetEventInfo(ID, name, valueSize, value, valueSizeRet);
}
}
@@ -153,7 +156,7 @@ public class CLEvent extends CLObject implements CLResource {
@Override
protected int getInfo(int name, long valueSize, Buffer value, NativeSizeBuffer valueSizeRet) {
- return cl.clGetEventProfilingInfo(ID, name, valueSize, value, valueSizeRet);
+ return binding.clGetEventProfilingInfo(ID, name, valueSize, value, valueSizeRet);
}
}