summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jogamp/opencl')
-rw-r--r--src/com/jogamp/opencl/CLCommandQueue.java2
-rw-r--r--src/com/jogamp/opencl/CLEventList.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/com/jogamp/opencl/CLCommandQueue.java b/src/com/jogamp/opencl/CLCommandQueue.java
index 6ceed82d..ae279fa6 100644
--- a/src/com/jogamp/opencl/CLCommandQueue.java
+++ b/src/com/jogamp/opencl/CLCommandQueue.java
@@ -1350,7 +1350,7 @@ public class CLCommandQueue extends CLObject implements CLResource {
*/
public CLCommandQueue putWaitForEvent(CLEventList list, int index, boolean blockingWait) {
- PointerBuffer ids = PointerBuffer.wrap(list.IDs.getBuffer().duplicate()).position(index);
+ PointerBuffer ids = list.IDs.duplicate().position(index);
int ret = blockingWait ? cl.clWaitForEvents(1, ids)
: cl.clEnqueueWaitForEvents(ID, 1, ids);
diff --git a/src/com/jogamp/opencl/CLEventList.java b/src/com/jogamp/opencl/CLEventList.java
index e2294b45..1e882221 100644
--- a/src/com/jogamp/opencl/CLEventList.java
+++ b/src/com/jogamp/opencl/CLEventList.java
@@ -64,13 +64,13 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL
public CLEventList(CachedBufferFactory factory, int capacity) {
this.events = new CLEvent[capacity];
this.IDs = initIDBuffer(factory, capacity);
- this.IDsView = PointerBuffer.wrap(IDs.getBuffer().duplicate());
+ this.IDsView = IDs.duplicate();
}
public CLEventList(CachedBufferFactory factory, CLEvent... events) {
this.events = events;
this.IDs = initIDBuffer(factory, events.length);
- this.IDsView = PointerBuffer.wrap(IDs.getBuffer().duplicate());
+ this.IDsView = IDs.duplicate();
for (CLEvent event : events) {
if(event == null) {
@@ -86,7 +86,7 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL
if(factory == null) {
return PointerBuffer.allocateDirect(size);
}else{
- return PointerBuffer.wrap(factory.newDirectByteBuffer(size*PointerBuffer.elementSize()));
+ return PointerBuffer.wrap(factory.newDirectByteBuffer(size*PointerBuffer.ELEMENT_SIZE));
}
}