diff options
author | Michael Bien <[email protected]> | 2010-06-16 20:23:33 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-06-16 20:23:33 +0200 |
commit | 4b96c9539e7b31bbfd5b349d16b51dd5eb556707 (patch) | |
tree | a08563d3fb71af931181823a1f4eee6fc4981ac9 /src/com/jogamp/opencl/CLEventList.java | |
parent | 35c9254adf4448c5eb86239118c5fb1dd6db88b8 (diff) |
implemented OpenCL 1.1 user events + JUnit test.
Diffstat (limited to 'src/com/jogamp/opencl/CLEventList.java')
-rw-r--r-- | src/com/jogamp/opencl/CLEventList.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/jogamp/opencl/CLEventList.java b/src/com/jogamp/opencl/CLEventList.java index b9b4cd4b..43f2b36b 100644 --- a/src/com/jogamp/opencl/CLEventList.java +++ b/src/com/jogamp/opencl/CLEventList.java @@ -19,6 +19,16 @@ public final class CLEventList implements CLResource, Iterable<CLEvent> { this.IDs = PointerBuffer.allocateDirect(capacity); } + public CLEventList(CLEvent... events) { + this.events = events; + this.IDs = PointerBuffer.allocateDirect(events.length); + for (CLEvent event : events) { + IDs.put(event.ID); + } + IDs.rewind(); + size = events.length; + } + void createEvent(CLContext context) { if(events[size] != null) |