summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLUserEvent.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/CLUserEvent.java
parent841d04d5716cbd7ce98a482060c656b1d5050949 (diff)
internal refactoring to use new binding interfaces in highlevel api impl.
Diffstat (limited to 'src/com/jogamp/opencl/CLUserEvent.java')
-rw-r--r--src/com/jogamp/opencl/CLUserEvent.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/jogamp/opencl/CLUserEvent.java b/src/com/jogamp/opencl/CLUserEvent.java
index 22839b0a..d1a9da70 100644
--- a/src/com/jogamp/opencl/CLUserEvent.java
+++ b/src/com/jogamp/opencl/CLUserEvent.java
@@ -34,6 +34,7 @@ package com.jogamp.opencl;
import static com.jogamp.opencl.CLException.*;
import static com.jogamp.opencl.llb.CL.*;
+import com.jogamp.opencl.llb.CLEventBinding;
/**
* Custom, user controlled event.
@@ -50,8 +51,9 @@ public class CLUserEvent extends CLEvent {
* Creates a new user event.
*/
public static CLUserEvent create(CLContext context) {
+ CLEventBinding binding = context.getPlatform().getEventBinding();
int[] error = new int[1];
- long ID = context.cl.clCreateUserEvent(context.ID, error, 0);
+ long ID = binding.clCreateUserEvent(context.ID, error, 0);
checkForError(error[0], "can not create user event.");
return new CLUserEvent(context, ID);
}
@@ -61,7 +63,8 @@ public class CLUserEvent extends CLEvent {
* Calls {@native clSetUserEventStatus}.
*/
public CLUserEvent setStatus(CLEvent.ExecutionStatus status) {
- int err = cl.clSetUserEventStatus(ID, status.STATUS);
+ CLEventBinding binding = getPlatform().getEventBinding();
+ int err = binding.clSetUserEventStatus(ID, status.STATUS);
if(err != CL_SUCCESS) {
newException(err, "can not set status "+status);
}