summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLEventList.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jogamp/opencl/CLEventList.java')
-rw-r--r--src/com/jogamp/opencl/CLEventList.java10
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)