summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jogamp')
-rw-r--r--src/com/jogamp/opencl/CLCommandQueue.java3
-rw-r--r--src/com/jogamp/opencl/CLEventList.java4
-rw-r--r--src/com/jogamp/opencl/CLProgram.java5
-rw-r--r--src/com/jogamp/opencl/impl/CLTLAccessorFactory.java4
4 files changed, 11 insertions, 5 deletions
diff --git a/src/com/jogamp/opencl/CLCommandQueue.java b/src/com/jogamp/opencl/CLCommandQueue.java
index f95576b6..7e78be4a 100644
--- a/src/com/jogamp/opencl/CLCommandQueue.java
+++ b/src/com/jogamp/opencl/CLCommandQueue.java
@@ -43,6 +43,7 @@ import java.util.Arrays;
import java.util.EnumSet;
import java.util.List;
+import com.jogamp.common.nio.AbstractBuffer;
import com.jogamp.common.nio.CachedBufferFactory;
import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.opencl.gl.CLGLObject;
@@ -82,7 +83,7 @@ public class CLCommandQueue extends CLObjectResource {
this.properties = properties;
this.cl = context.getPlatform().getCLBinding();
- final int pbsize = PointerBuffer.ELEMENT_SIZE;
+ final int pbsize = AbstractBuffer.POINTER_SIZE;
final CachedBufferFactory factory = CachedBufferFactory.create(9*pbsize + 4, true);
this.ibA = PointerBuffer.wrap(factory.newDirectByteBuffer(3*pbsize));
diff --git a/src/com/jogamp/opencl/CLEventList.java b/src/com/jogamp/opencl/CLEventList.java
index 806a0661..f890558a 100644
--- a/src/com/jogamp/opencl/CLEventList.java
+++ b/src/com/jogamp/opencl/CLEventList.java
@@ -28,6 +28,7 @@
package com.jogamp.opencl;
+import com.jogamp.common.nio.AbstractBuffer;
import com.jogamp.common.nio.CachedBufferFactory;
import com.jogamp.common.nio.PointerBuffer;
import java.util.Iterator;
@@ -85,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.ELEMENT_SIZE));
+ return PointerBuffer.wrap(factory.newDirectByteBuffer(size*AbstractBuffer.POINTER_SIZE));
}
}
@@ -175,6 +176,7 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL
return events.length;
}
+ @Override
public boolean isReleased() {
return size == 0;
}
diff --git a/src/com/jogamp/opencl/CLProgram.java b/src/com/jogamp/opencl/CLProgram.java
index 3c68fa35..401c547a 100644
--- a/src/com/jogamp/opencl/CLProgram.java
+++ b/src/com/jogamp/opencl/CLProgram.java
@@ -28,6 +28,7 @@
package com.jogamp.opencl;
+import com.jogamp.common.nio.AbstractBuffer;
import com.jogamp.common.nio.CachedBufferFactory;
import com.jogamp.opencl.util.CLProgramConfiguration;
import com.jogamp.opencl.util.CLUtil;
@@ -109,7 +110,7 @@ public class CLProgram extends CLObjectResource {
binarySize += entry.getValue().length;
}
- final int pbSize = PointerBuffer.ELEMENT_SIZE;
+ final int pbSize = AbstractBuffer.POINTER_SIZE;
final int deviceCount = binaries.size();
final CachedBufferFactory bf = CachedBufferFactory.create(binarySize + pbSize*deviceCount*3 + 4, true);
@@ -373,7 +374,7 @@ public class CLProgram extends CLObjectResource {
{
try {
buildLock.acquire();
- } catch(InterruptedException e) {
+ } catch(final InterruptedException e) {
throw newException(ret, "\nInterrupted while waiting to get build lock");
}
diff --git a/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java b/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java
index 7195d592..b32636bf 100644
--- a/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java
+++ b/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java
@@ -33,6 +33,8 @@
package com.jogamp.opencl.impl;
import java.nio.IntBuffer;
+
+import com.jogamp.common.nio.AbstractBuffer;
import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.opencl.llb.CL;
import com.jogamp.opencl.spi.CLAccessorFactory;
@@ -103,7 +105,7 @@ public class CLTLAccessorFactory implements CLAccessorFactory {
}else{
checkForError(ret, "error while enumerating devices");
- final PointerBuffer deviceIDs = PointerBuffer.wrap(getBB(count*PointerBuffer.ELEMENT_SIZE));
+ final PointerBuffer deviceIDs = PointerBuffer.wrap(getBB(count*AbstractBuffer.POINTER_SIZE));
ret = cl.clGetDeviceIDs(ID, type, count, deviceIDs, null);
checkForError(ret, "error while enumerating devices");