aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLEvent.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-06-16 20:23:33 +0200
committerMichael Bien <[email protected]>2010-06-16 20:23:33 +0200
commit4b96c9539e7b31bbfd5b349d16b51dd5eb556707 (patch)
treea08563d3fb71af931181823a1f4eee6fc4981ac9 /src/com/jogamp/opencl/CLEvent.java
parent35c9254adf4448c5eb86239118c5fb1dd6db88b8 (diff)
implemented OpenCL 1.1 user events + JUnit test.
Diffstat (limited to 'src/com/jogamp/opencl/CLEvent.java')
-rw-r--r--src/com/jogamp/opencl/CLEvent.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/jogamp/opencl/CLEvent.java b/src/com/jogamp/opencl/CLEvent.java
index bf4ac690..5b71cc29 100644
--- a/src/com/jogamp/opencl/CLEvent.java
+++ b/src/com/jogamp/opencl/CLEvent.java
@@ -40,6 +40,13 @@ public class CLEvent extends CLObject implements CLResource {
public ExecutionStatus getStatus() {
return ExecutionStatus.valueOf(getStatusCode());
}
+
+ /**
+ * Returns true only if {@link #getStatus} returns {@link ExecutionStatus#COMPLETE}.
+ */
+ public boolean isComplete() {
+ return ExecutionStatus.COMPLETE.equals(getStatus());
+ }
public int getStatusCode() {
return (int)eventInfo.getLong(CL_EVENT_COMMAND_EXECUTION_STATUS);
@@ -57,7 +64,7 @@ public class CLEvent extends CLObject implements CLResource {
@Override
public String toString() {
- return "CLEvent [id: " + ID
+ return getClass().getSimpleName()+" [id: " + ID
+ " name: " + getType()
+ " status: " + getStatus()+"]";
}
@@ -237,8 +244,13 @@ public class CLEvent extends CLObject implements CLResource {
MAP_IMAGE(CL_COMMAND_MAP_IMAGE),
UNMAP_MEM_OBJECT(CL_COMMAND_UNMAP_MEM_OBJECT),
MARKER(CL_COMMAND_MARKER),
+ READ_BUFFER_RECT(CL_COMMAND_READ_BUFFER_RECT),
+ WRITE_BUFFER_RECT(CL_COMMAND_WRITE_BUFFER_RECT),
+ COPY_BUFFER_RECT(CL_COMMAND_COPY_BUFFER_RECT),
+ USER(CL_COMMAND_USER),
ACQUIRE_GL_OBJECTS(CL_COMMAND_ACQUIRE_GL_OBJECTS),
- RELEASE_GL_OBJECTS(CL_COMMAND_RELEASE_GL_OBJECTS);
+ RELEASE_GL_OBJECTS(CL_COMMAND_RELEASE_GL_OBJECTS),
+ GL_FENCE_SYNC_OBJECT_KHR(CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR);
/**
* Value of wrapped OpenCL command type.