summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLEventList.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-04-23 16:10:47 +0200
committerMichael Bien <[email protected]>2011-04-23 16:10:47 +0200
commit557a0a94f42cb2d3d1fa77933af19a422d2f681c (patch)
tree677adaf96b96acfcd95401a25ea42918ba1a8895 /src/com/jogamp/opencl/CLEventList.java
parent3eb0c9892253220a44e43dc1619f548007e6a17f (diff)
switched from PointerBuffer to NativeSizeBuffer.
Diffstat (limited to 'src/com/jogamp/opencl/CLEventList.java')
-rw-r--r--src/com/jogamp/opencl/CLEventList.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/com/jogamp/opencl/CLEventList.java b/src/com/jogamp/opencl/CLEventList.java
index e2294b45..3642d915 100644
--- a/src/com/jogamp/opencl/CLEventList.java
+++ b/src/com/jogamp/opencl/CLEventList.java
@@ -30,7 +30,7 @@ package com.jogamp.opencl;
import com.jogamp.common.AutoCloseable;
import com.jogamp.common.nio.CachedBufferFactory;
-import com.jogamp.common.nio.PointerBuffer;
+import com.jogamp.common.nio.NativeSizeBuffer;
import java.util.Iterator;
/**
@@ -44,12 +44,12 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL
/**
* stores event ids for fast access.
*/
- final PointerBuffer IDs;
+ final NativeSizeBuffer IDs;
/**
* Points always to the first element of the id buffer.
*/
- final PointerBuffer IDsView;
+ final NativeSizeBuffer IDsView;
int size;
@@ -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 = NativeSizeBuffer.wrap(IDs.getBuffer().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 = NativeSizeBuffer.wrap(IDs.getBuffer().duplicate());
for (CLEvent event : events) {
if(event == null) {
@@ -82,11 +82,11 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL
size = events.length;
}
- private PointerBuffer initIDBuffer(CachedBufferFactory factory, int size) {
+ private NativeSizeBuffer initIDBuffer(CachedBufferFactory factory, int size) {
if(factory == null) {
- return PointerBuffer.allocateDirect(size);
+ return NativeSizeBuffer.allocateDirect(size);
}else{
- return PointerBuffer.wrap(factory.newDirectByteBuffer(size*PointerBuffer.elementSize()));
+ return NativeSizeBuffer.wrap(factory.newDirectByteBuffer(size*NativeSizeBuffer.elementSize()));
}
}