diff options
author | Sven Gothel <[email protected]> | 2023-06-16 03:17:28 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-06-16 03:17:28 +0200 |
commit | dc1424050e47cd239ad26c4f12fb3a0e4289d682 (patch) | |
tree | f357d7494b49e64ae154ab5aa3363d8ae2598933 | |
parent | 5e957ba84836011400d9664785797ba6bdef449c (diff) |
Adopt to GlueGen change: Drop ManualStaticInitCall, PointerBuffer.ELEMENT_SIZE -> AbstractBuffer.POINTER_SIZE
-rw-r--r-- | make/config/cl-impl-11.cfg | 1 | ||||
-rw-r--r-- | make/config/cl-impl-12.cfg | 1 | ||||
-rw-r--r-- | make/config/cl-impl-20.cfg | 1 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLCommandQueue.java | 3 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLEventList.java | 4 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLProgram.java | 5 | ||||
-rw-r--r-- | src/com/jogamp/opencl/impl/CLTLAccessorFactory.java | 4 |
7 files changed, 11 insertions, 8 deletions
diff --git a/make/config/cl-impl-11.cfg b/make/config/cl-impl-11.cfg index 961492a3..dbda1c09 100644 --- a/make/config/cl-impl-11.cfg +++ b/make/config/cl-impl-11.cfg @@ -105,6 +105,5 @@ ForceProcAddressGen clEnqueueMapImage #include custom code IncludeAs CustomJavaCode CLImpl11 clImplCustomCode11.java IncludeAs CustomJavaCode CLImpl11 clImplCustomCode.java -ManualStaticInitCall CLImpl11 IncludeAs CustomCCode clImplCustomCode11.c diff --git a/make/config/cl-impl-12.cfg b/make/config/cl-impl-12.cfg index c8b0c839..467df7d3 100644 --- a/make/config/cl-impl-12.cfg +++ b/make/config/cl-impl-12.cfg @@ -112,7 +112,6 @@ ForceProcAddressGen clEnqueueMapImage #include custom code IncludeAs CustomJavaCode CLImpl12 clImplCustomCode12.java IncludeAs CustomJavaCode CLImpl12 clImplCustomCode.java -ManualStaticInitCall CLImpl12 IncludeAs CustomCCode clImplCustomCode.c IncludeAs CustomCCode clImplCustomCode12.c diff --git a/make/config/cl-impl-20.cfg b/make/config/cl-impl-20.cfg index d446da19..69a6e57f 100644 --- a/make/config/cl-impl-20.cfg +++ b/make/config/cl-impl-20.cfg @@ -112,7 +112,6 @@ ForceProcAddressGen clEnqueueMapImage #include custom code IncludeAs CustomJavaCode CLImpl20 clImplCustomCode20.java IncludeAs CustomJavaCode CLImpl20 clImplCustomCode.java -ManualStaticInitCall CLImpl20 IncludeAs CustomCCode clImplCustomCode.c IncludeAs CustomCCode clImplCustomCode20.c 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"); |