diff options
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/jogamp/opencl/CLBuffer.java | 4 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLCommandQueue.java | 100 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLContext.java | 20 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLDevice.java | 4 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLEvent.java | 6 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLEventList.java | 10 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLImage.java | 4 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLInfoAccessor.java | 14 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLKernel.java | 4 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLMemory.java | 2 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLPlatform.java | 8 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLProgram.java | 22 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLSampler.java | 4 | ||||
-rw-r--r-- | src/com/jogamp/opencl/gl/CLGLContext.java | 18 | ||||
-rw-r--r-- | src/com/jogamp/opencl/impl/CLImpl.java | 38 | ||||
-rw-r--r-- | src/com/jogamp/opencl/util/CLBuildListener.java | 2 |
16 files changed, 130 insertions, 130 deletions
diff --git a/src/com/jogamp/opencl/CLBuffer.java b/src/com/jogamp/opencl/CLBuffer.java index 6f00247..57fba46 100644 --- a/src/com/jogamp/opencl/CLBuffer.java +++ b/src/com/jogamp/opencl/CLBuffer.java @@ -30,7 +30,7 @@ package com.jogamp.opencl; import com.jogamp.common.nio.Buffers; import java.util.List; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import com.jogamp.opencl.CLMemory.Mem; import java.nio.Buffer; import java.util.ArrayList; @@ -108,7 +108,7 @@ public class CLBuffer<B extends Buffer> extends CLMemory<B> { size *= elemSize; } - NativeSizeBuffer info = NativeSizeBuffer.allocateDirect(2); + PointerBuffer info = PointerBuffer.allocateDirect(2); info.put(offset).put(size).rewind(); int bitset = Mem.flagsToInt(flags); diff --git a/src/com/jogamp/opencl/CLCommandQueue.java b/src/com/jogamp/opencl/CLCommandQueue.java index cbdd59f..7f3a429 100644 --- a/src/com/jogamp/opencl/CLCommandQueue.java +++ b/src/com/jogamp/opencl/CLCommandQueue.java @@ -30,7 +30,7 @@ package com.jogamp.opencl; import com.jogamp.common.nio.CachedBufferFactory; import com.jogamp.opencl.gl.CLGLI; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import com.jogamp.opencl.gl.CLGLObject; import java.nio.Buffer; import java.nio.ByteBuffer; @@ -66,9 +66,9 @@ public class CLCommandQueue extends CLObject implements CLResource { * Those direct memory buffers are used to move data between the JVM and OpenCL. */ private final IntBuffer pbA; - private final NativeSizeBuffer ibA; - private final NativeSizeBuffer ibB; - private final NativeSizeBuffer ibC; + private final PointerBuffer ibA; + private final PointerBuffer ibB; + private final PointerBuffer ibC; private CLCommandQueue(CLContext context, long id, CLDevice device, long properties) { super(context, id); @@ -79,9 +79,9 @@ public class CLCommandQueue extends CLObject implements CLResource { int pbsize = PointerBuffer.ELEMENT_SIZE; CachedBufferFactory factory = CachedBufferFactory.create(9*pbsize + 4, true); - this.ibA = NativeSizeBuffer.wrap(factory.newDirectByteBuffer(3*pbsize)); - this.ibB = NativeSizeBuffer.wrap(factory.newDirectByteBuffer(3*pbsize)); - this.ibC = NativeSizeBuffer.wrap(factory.newDirectByteBuffer(3*pbsize)); + this.ibA = PointerBuffer.wrap(factory.newDirectByteBuffer(3*pbsize)); + this.ibB = PointerBuffer.wrap(factory.newDirectByteBuffer(3*pbsize)); + this.ibC = PointerBuffer.wrap(factory.newDirectByteBuffer(3*pbsize)); this.pbA = factory.newDirectIntBuffer(1); @@ -117,7 +117,7 @@ public class CLCommandQueue extends CLObject implements CLResource { */ public CLCommandQueue putWriteBuffer(CLBuffer<?> writeBuffer, boolean blockingWrite, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -161,7 +161,7 @@ public class CLCommandQueue extends CLObject implements CLResource { */ public CLCommandQueue putReadBuffer(CLBuffer<?> readBuffer, boolean blockingRead, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -210,7 +210,7 @@ public class CLCommandQueue extends CLObject implements CLResource { */ public CLCommandQueue putCopyBuffer(CLBuffer<?> src, CLBuffer<?> dest, int srcOffset, int destOffset, long bytesToCopy, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -280,7 +280,7 @@ public class CLCommandQueue extends CLObject implements CLResource { long rowPitch, long slicePitch, long hostRowPitch, long hostSlicePitch, boolean blockingWrite, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -358,7 +358,7 @@ public class CLCommandQueue extends CLObject implements CLResource { long rowPitch, long slicePitch, long hostRowPitch, long hostSlicePitch, boolean blockingRead, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -439,7 +439,7 @@ public class CLCommandQueue extends CLObject implements CLResource { long srcRowPitch, long srcSlicePitch, long destRowPitch, long destSlicePitch, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -507,7 +507,7 @@ public class CLCommandQueue extends CLObject implements CLResource { public CLCommandQueue putWriteImage(CLImage2d<?> writeImage, int inputRowPitch, int originX, int originY, int rangeX, int rangeY, boolean blockingWrite, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -569,7 +569,7 @@ public class CLCommandQueue extends CLObject implements CLResource { public CLCommandQueue putWriteImage(CLImage3d<?> writeImage, int inputRowPitch, int inputSlicePitch, int originX, int originY, int originZ, int rangeX, int rangeY, int rangeZ, boolean blockingWrite, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -630,7 +630,7 @@ public class CLCommandQueue extends CLObject implements CLResource { public CLCommandQueue putReadImage(CLImage2d<?> readImage, int inputRowPitch, int originX, int originY, int rangeX, int rangeY, boolean blockingRead, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -692,7 +692,7 @@ public class CLCommandQueue extends CLObject implements CLResource { public CLCommandQueue putReadImage(CLImage3d<?> readImage, int inputRowPitch, int inputSlicePitch, int originX, int originY, int originZ, int rangeX, int rangeY, int rangeZ, boolean blockingRead, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -756,7 +756,7 @@ public class CLCommandQueue extends CLObject implements CLResource { int dstOriginX, int dstOriginY, int rangeX, int rangeY, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -825,7 +825,7 @@ public class CLCommandQueue extends CLObject implements CLResource { int dstOriginX, int dstOriginY, int dstOriginZ, int rangeX, int rangeY, int rangeZ, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -889,7 +889,7 @@ public class CLCommandQueue extends CLObject implements CLResource { long srcOffset, int dstOriginX, int dstOriginY, int rangeX, int rangeY, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -956,7 +956,7 @@ public class CLCommandQueue extends CLObject implements CLResource { long srcOffset, int dstOriginX, int dstOriginY, int dstOriginZ, int rangeX, int rangeY, int rangeZ, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -1020,7 +1020,7 @@ public class CLCommandQueue extends CLObject implements CLResource { int srcOriginX, int srcOriginY, int rangeX, int rangeY, long dstOffset, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -1087,7 +1087,7 @@ public class CLCommandQueue extends CLObject implements CLResource { int srcOriginX, int srcOriginY, int srcOriginZ, int rangeX, int rangeY, int rangeZ, long dstOffset, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -1145,7 +1145,7 @@ public class CLCommandQueue extends CLObject implements CLResource { */ public ByteBuffer putMapBuffer(CLBuffer<?> buffer, CLMemory.Map flag, long offset, long length, boolean blockingMap, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -1205,7 +1205,7 @@ public class CLCommandQueue extends CLObject implements CLResource { int offsetX, int offsetY, int rangeX, int rangeY, boolean blockingMap, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -1271,7 +1271,7 @@ public class CLCommandQueue extends CLObject implements CLResource { int offsetX, int offsetY, int offsetZ, int rangeX, int rangeY, int rangeZ, boolean blockingMap, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -1315,7 +1315,7 @@ public class CLCommandQueue extends CLObject implements CLResource { */ public CLCommandQueue putUnmapMemory(CLMemory<?> memory, Buffer mapped, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -1407,7 +1407,7 @@ public class CLCommandQueue extends CLObject implements CLResource { */ public CLCommandQueue putTask(CLKernel kernel, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -1444,9 +1444,9 @@ public class CLCommandQueue extends CLObject implements CLResource { * Calls {@native clEnqueueNDRangeKernel}. */ public CLCommandQueue put1DRangeKernel(CLKernel kernel, long globalWorkOffset, long globalWorkSize, long localWorkSize, CLEventList condition, CLEventList events) { - NativeSizeBuffer globWO = null; - NativeSizeBuffer globWS = null; - NativeSizeBuffer locWS = null; + PointerBuffer globWO = null; + PointerBuffer globWS = null; + PointerBuffer locWS = null; if(globalWorkOffset != 0) { globWO = copy2NIO(ibA, globalWorkOffset); @@ -1495,9 +1495,9 @@ public class CLCommandQueue extends CLObject implements CLResource { public CLCommandQueue put2DRangeKernel(CLKernel kernel, long globalWorkOffsetX, long globalWorkOffsetY, long globalWorkSizeX, long globalWorkSizeY, long localWorkSizeX, long localWorkSizeY, CLEventList condition, CLEventList events) { - NativeSizeBuffer globalWorkOffset = null; - NativeSizeBuffer globalWorkSize = null; - NativeSizeBuffer localWorkSize = null; + PointerBuffer globalWorkOffset = null; + PointerBuffer globalWorkSize = null; + PointerBuffer localWorkSize = null; if(globalWorkOffsetX != 0 || globalWorkOffsetY != 0) { globalWorkOffset = copy2NIO(ibA, globalWorkOffsetX, globalWorkOffsetY); @@ -1545,9 +1545,9 @@ public class CLCommandQueue extends CLObject implements CLResource { public CLCommandQueue put3DRangeKernel(CLKernel kernel, long globalWorkOffsetX, long globalWorkOffsetY, long globalWorkOffsetZ, long globalWorkSizeX, long globalWorkSizeY, long globalWorkSizeZ, long localWorkSizeX, long localWorkSizeY, long localWorkSizeZ, CLEventList condition, CLEventList events) { - NativeSizeBuffer globalWorkOffset = null; - NativeSizeBuffer globalWorkSize = null; - NativeSizeBuffer localWorkSize = null; + PointerBuffer globalWorkOffset = null; + PointerBuffer globalWorkSize = null; + PointerBuffer localWorkSize = null; if(globalWorkOffsetX != 0 || globalWorkOffsetY != 0 || globalWorkOffsetZ != 0) { globalWorkOffset = copy2NIO(ibA, globalWorkOffsetX, globalWorkOffsetY, globalWorkOffsetZ); @@ -1565,7 +1565,7 @@ public class CLCommandQueue extends CLObject implements CLResource { /** * Calls {@native clEnqueueNDRangeKernel}. */ - public CLCommandQueue putNDRangeKernel(CLKernel kernel, int workDimension, NativeSizeBuffer globalWorkOffset, NativeSizeBuffer globalWorkSize, NativeSizeBuffer localWorkSize) { + public CLCommandQueue putNDRangeKernel(CLKernel kernel, int workDimension, PointerBuffer globalWorkOffset, PointerBuffer globalWorkSize, PointerBuffer localWorkSize) { this.putNDRangeKernel(kernel, workDimension, globalWorkOffset, globalWorkSize, localWorkSize, null, null); return this; } @@ -1573,7 +1573,7 @@ public class CLCommandQueue extends CLObject implements CLResource { /** * Calls {@native clEnqueueNDRangeKernel}. */ - public CLCommandQueue putNDRangeKernel(CLKernel kernel, int workDimension, NativeSizeBuffer globalWorkOffset, NativeSizeBuffer globalWorkSize, NativeSizeBuffer localWorkSize, CLEventList events) { + public CLCommandQueue putNDRangeKernel(CLKernel kernel, int workDimension, PointerBuffer globalWorkOffset, PointerBuffer globalWorkSize, PointerBuffer localWorkSize, CLEventList events) { this.putNDRangeKernel(kernel, workDimension, globalWorkOffset, globalWorkSize, localWorkSize, null, events); return this; } @@ -1581,10 +1581,10 @@ public class CLCommandQueue extends CLObject implements CLResource { /** * Calls {@native clEnqueueNDRangeKernel}. */ - public CLCommandQueue putNDRangeKernel(CLKernel kernel, int workDimension, NativeSizeBuffer globalWorkOffset, - NativeSizeBuffer globalWorkSize, NativeSizeBuffer localWorkSize, CLEventList condition, CLEventList events) { + public CLCommandQueue putNDRangeKernel(CLKernel kernel, int workDimension, PointerBuffer globalWorkOffset, + PointerBuffer globalWorkSize, PointerBuffer localWorkSize, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -1657,9 +1657,9 @@ public class CLCommandQueue extends CLObject implements CLResource { /** * Calls {@native clEnqueueAcquireGLObjects}. */ - public CLCommandQueue putAcquireGLObjects(NativeSizeBuffer glObjectIDs, CLEventList condition, CLEventList events) { + public CLCommandQueue putAcquireGLObjects(PointerBuffer glObjectIDs, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -1726,9 +1726,9 @@ public class CLCommandQueue extends CLObject implements CLResource { /** * Calls {@native clEnqueueReleaseGLObjects}. */ - public CLCommandQueue putReleaseGLObjects(NativeSizeBuffer glObjectIDs, CLEventList condition, CLEventList events) { + public CLCommandQueue putReleaseGLObjects(PointerBuffer glObjectIDs, CLEventList condition, CLEventList events) { - NativeSizeBuffer conditionIDs = null; + PointerBuffer conditionIDs = null; int conditions = 0; if(condition != null) { conditionIDs = condition.IDsView; @@ -1792,19 +1792,19 @@ public class CLCommandQueue extends CLObject implements CLResource { } } - private static NativeSizeBuffer copy2NIO(NativeSizeBuffer buffer, long a) { + private static PointerBuffer copy2NIO(PointerBuffer buffer, long a) { return buffer.put(2, a).position(2); } - private static NativeSizeBuffer copy2NIO(NativeSizeBuffer buffer, long a, long b) { + private static PointerBuffer copy2NIO(PointerBuffer buffer, long a, long b) { return buffer.position(1).put(a).put(b).position(1); } - private static NativeSizeBuffer copy2NIO(NativeSizeBuffer buffer, long a, long b, long c) { + private static PointerBuffer copy2NIO(PointerBuffer buffer, long a, long b, long c) { return buffer.rewind().put(a).put(b).put(c).rewind(); } - private static String toStr(NativeSizeBuffer buffer) { + private static String toStr(PointerBuffer buffer) { if(buffer == null) { return null; } diff --git a/src/com/jogamp/opencl/CLContext.java b/src/com/jogamp/opencl/CLContext.java index 850f6c0..c8a847a 100644 --- a/src/com/jogamp/opencl/CLContext.java +++ b/src/com/jogamp/opencl/CLContext.java @@ -32,7 +32,7 @@ import com.jogamp.common.nio.Buffers; import com.jogamp.opencl.CLDevice.Type; import com.jogamp.opencl.CLSampler.AddressingMode; import com.jogamp.opencl.CLSampler.FilteringMode; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import com.jogamp.opencl.impl.CLImageFormatImpl; import java.io.BufferedReader; import java.io.IOException; @@ -119,7 +119,7 @@ public class CLContext extends CLObject implements CLResource { if (devices == null) { - NativeSizeBuffer deviceCount = NativeSizeBuffer.allocateDirect(1); + PointerBuffer deviceCount = PointerBuffer.allocateDirect(1); int ret = cl.clGetContextInfo(ID, CL.CL_CONTEXT_DEVICES, 0, null, deviceCount); checkForError(ret, "can not enumerate devices"); @@ -170,7 +170,7 @@ public class CLContext extends CLObject implements CLResource { long type = toDeviceBitmap(deviceTypes); - NativeSizeBuffer properties = setupContextProperties(platform); + PointerBuffer properties = setupContextProperties(platform); ErrorDispatcher dispatcher = new ErrorDispatcher(); return new CLContext(platform, createContextFromType(dispatcher, properties, type), dispatcher); } @@ -188,7 +188,7 @@ public class CLContext extends CLObject implements CLResource { CLPlatform platform = devices[0].getPlatform(); - NativeSizeBuffer properties = setupContextProperties(platform); + PointerBuffer properties = setupContextProperties(platform); ErrorDispatcher dispatcher = new ErrorDispatcher(); CLContext context = new CLContext(platform, createContext(dispatcher, properties, devices), dispatcher); if(devices != null) { @@ -199,7 +199,7 @@ public class CLContext extends CLObject implements CLResource { return context; } - protected static long createContextFromType(CLErrorHandler handler, NativeSizeBuffer properties, long deviceType) { + protected static long createContextFromType(CLErrorHandler handler, PointerBuffer properties, long deviceType) { IntBuffer status = newDirectIntBuffer(1); long context = CLPlatform.getLowLevelCLInterface().clCreateContextFromType(properties, deviceType, handler, status); @@ -209,12 +209,12 @@ public class CLContext extends CLObject implements CLResource { return context; } - protected static long createContext(CLErrorHandler handler, NativeSizeBuffer properties, CLDevice... devices) { + protected static long createContext(CLErrorHandler handler, PointerBuffer properties, CLDevice... devices) { IntBuffer status = newDirectIntBuffer(1); - NativeSizeBuffer pb = null; + PointerBuffer pb = null; if(devices != null && devices.length != 0) { - pb = NativeSizeBuffer.allocateDirect(devices.length); + pb = PointerBuffer.allocateDirect(devices.length); for (int i = 0; i < devices.length; i++) { CLDevice device = devices[i]; if(device == null) { @@ -230,13 +230,13 @@ public class CLContext extends CLObject implements CLResource { return context; } - private static NativeSizeBuffer setupContextProperties(CLPlatform platform) { + private static PointerBuffer setupContextProperties(CLPlatform platform) { if(platform == null) { throw new RuntimeException("no OpenCL installation found"); } - return NativeSizeBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM) + return PointerBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM) .put(platform.ID).put(0) // 0 terminated array .rewind(); } diff --git a/src/com/jogamp/opencl/CLDevice.java b/src/com/jogamp/opencl/CLDevice.java index 0381038..95f9d1a 100644 --- a/src/com/jogamp/opencl/CLDevice.java +++ b/src/com/jogamp/opencl/CLDevice.java @@ -29,7 +29,7 @@ package com.jogamp.opencl; import com.jogamp.opencl.util.CLUtil; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import java.nio.Buffer; import java.nio.ByteOrder; import java.util.ArrayList; @@ -702,7 +702,7 @@ public final class CLDevice extends CLObject { } @Override - protected int getInfo(int name, long valueSize, Buffer value, NativeSizeBuffer valueSizeRet) { + protected int getInfo(int name, long valueSize, Buffer value, PointerBuffer valueSizeRet) { return cl.clGetDeviceInfo(ID, name, valueSize, value, valueSizeRet); } diff --git a/src/com/jogamp/opencl/CLEvent.java b/src/com/jogamp/opencl/CLEvent.java index 876be3d..4365fd6 100644 --- a/src/com/jogamp/opencl/CLEvent.java +++ b/src/com/jogamp/opencl/CLEvent.java @@ -29,7 +29,7 @@ package com.jogamp.opencl; import com.jogamp.opencl.impl.CLEventCallback; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import java.nio.Buffer; import static com.jogamp.opencl.CL.*; @@ -141,7 +141,7 @@ public class CLEvent extends CLObject implements CLResource { private class CLEventInfoAccessor extends CLInfoAccessor { @Override - protected int getInfo(int name, long valueSize, Buffer value, NativeSizeBuffer valueSizeRet) { + protected int getInfo(int name, long valueSize, Buffer value, PointerBuffer valueSizeRet) { return cl.clGetEventInfo(ID, name, valueSize, value, valueSizeRet); } @@ -150,7 +150,7 @@ public class CLEvent extends CLObject implements CLResource { private class CLEventProfilingInfoAccessor extends CLInfoAccessor { @Override - protected int getInfo(int name, long valueSize, Buffer value, NativeSizeBuffer valueSizeRet) { + protected int getInfo(int name, long valueSize, Buffer value, PointerBuffer valueSizeRet) { return cl.clGetEventProfilingInfo(ID, name, valueSize, value, valueSizeRet); } diff --git a/src/com/jogamp/opencl/CLEventList.java b/src/com/jogamp/opencl/CLEventList.java index fe6378b..1e88222 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.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import java.util.Iterator; /** @@ -44,12 +44,12 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL /** * stores event ids for fast access. */ - final NativeSizeBuffer IDs; + final PointerBuffer IDs; /** * Points always to the first element of the id buffer. */ - final NativeSizeBuffer IDsView; + final PointerBuffer IDsView; int size; @@ -82,9 +82,9 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL size = events.length; } - private NativeSizeBuffer initIDBuffer(CachedBufferFactory factory, int size) { + private PointerBuffer initIDBuffer(CachedBufferFactory factory, int size) { if(factory == null) { - return NativeSizeBuffer.allocateDirect(size); + return PointerBuffer.allocateDirect(size); }else{ return PointerBuffer.wrap(factory.newDirectByteBuffer(size*PointerBuffer.ELEMENT_SIZE)); } diff --git a/src/com/jogamp/opencl/CLImage.java b/src/com/jogamp/opencl/CLImage.java index 01dd6ea..acb36ae 100644 --- a/src/com/jogamp/opencl/CLImage.java +++ b/src/com/jogamp/opencl/CLImage.java @@ -28,7 +28,7 @@ package com.jogamp.opencl; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import java.nio.Buffer; import static com.jogamp.opencl.CL.*; @@ -110,7 +110,7 @@ public abstract class CLImage<B extends Buffer> extends CLMemory<B> { this.id = id; } @Override - public int getInfo(int name, long valueSize, Buffer value, NativeSizeBuffer valueSizeRet) { + public int getInfo(int name, long valueSize, Buffer value, PointerBuffer valueSizeRet) { return cl.clGetImageInfo(id, name, valueSize, value, valueSizeRet); } } diff --git a/src/com/jogamp/opencl/CLInfoAccessor.java b/src/com/jogamp/opencl/CLInfoAccessor.java index 08d7305..b005ec0 100644 --- a/src/com/jogamp/opencl/CLInfoAccessor.java +++ b/src/com/jogamp/opencl/CLInfoAccessor.java @@ -28,7 +28,7 @@ package com.jogamp.opencl; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import com.jogamp.common.os.Platform; import com.jogamp.opencl.util.CLUtil; import java.nio.Buffer; @@ -54,11 +54,11 @@ abstract class CLInfoAccessor { } }; - protected final static ThreadLocal<NativeSizeBuffer> localNSB = new ThreadLocal<NativeSizeBuffer>() { + protected final static ThreadLocal<PointerBuffer> localNSB = new ThreadLocal<PointerBuffer>() { @Override - protected NativeSizeBuffer initialValue() { - return NativeSizeBuffer.allocateDirect(1); + protected PointerBuffer initialValue() { + return PointerBuffer.allocateDirect(1); } }; @@ -74,7 +74,7 @@ abstract class CLInfoAccessor { public final String getString(int key) { - NativeSizeBuffer sizeBuffer = getNSB(); + PointerBuffer sizeBuffer = getNSB(); int ret = getInfo(key, 0, null, sizeBuffer); checkForError(ret, "error while asking for info string"); @@ -118,11 +118,11 @@ abstract class CLInfoAccessor { } } - protected NativeSizeBuffer getNSB() { + protected PointerBuffer getNSB() { return localNSB.get(); } - protected abstract int getInfo(int name, long valueSize, Buffer value, NativeSizeBuffer valueSizeRet); + protected abstract int getInfo(int name, long valueSize, Buffer value, PointerBuffer valueSizeRet); } diff --git a/src/com/jogamp/opencl/CLKernel.java b/src/com/jogamp/opencl/CLKernel.java index 4c898b4..b2d783e 100644 --- a/src/com/jogamp/opencl/CLKernel.java +++ b/src/com/jogamp/opencl/CLKernel.java @@ -30,7 +30,7 @@ package com.jogamp.opencl; import com.jogamp.opencl.util.CLUtil; import com.jogamp.common.nio.Buffers; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import java.nio.Buffer; import java.nio.ByteBuffer; @@ -73,7 +73,7 @@ public class CLKernel extends CLObject implements CLResource, Cloneable { if(name == null) { // get function name - NativeSizeBuffer size = NativeSizeBuffer.wrap(buffer); + PointerBuffer size = PointerBuffer.wrap(buffer); int ret = cl.clGetKernelInfo(ID, CL_KERNEL_FUNCTION_NAME, 0, null, size); checkForError(ret, "error while asking for kernel function name"); diff --git a/src/com/jogamp/opencl/CLMemory.java b/src/com/jogamp/opencl/CLMemory.java index db64f8a..a1ca484 100644 --- a/src/com/jogamp/opencl/CLMemory.java +++ b/src/com/jogamp/opencl/CLMemory.java @@ -30,7 +30,7 @@ package com.jogamp.opencl; import com.jogamp.opencl.gl.CLGLI; import com.jogamp.common.nio.Buffers; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import com.jogamp.opencl.impl.CLMemObjectDestructorCallback; import java.nio.Buffer; import java.nio.IntBuffer; diff --git a/src/com/jogamp/opencl/CLPlatform.java b/src/com/jogamp/opencl/CLPlatform.java index ee6a6bd..d9a258c 100644 --- a/src/com/jogamp/opencl/CLPlatform.java +++ b/src/com/jogamp/opencl/CLPlatform.java @@ -34,7 +34,7 @@ import java.nio.Buffer; import java.security.PrivilegedAction; import com.jogamp.common.JogampRuntimeException; import com.jogamp.common.os.NativeLibrary; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import com.jogamp.gluegen.runtime.FunctionAddressResolver; import com.jogamp.opencl.util.CLUtil; import com.jogamp.opencl.impl.CLImpl; @@ -229,7 +229,7 @@ public final class CLPlatform { checkForError(ret, "can not enumerate platforms"); // receive platform ids - NativeSizeBuffer platformId = NativeSizeBuffer.allocateDirect(ib.get(0)); + PointerBuffer platformId = PointerBuffer.allocateDirect(ib.get(0)); ret = cl.clGetPlatformIDs(platformId.capacity(), platformId, null); checkForError(ret, "can not enumerate platforms"); @@ -504,7 +504,7 @@ public final class CLPlatform { } @Override - protected int getInfo(int name, long valueSize, Buffer value, NativeSizeBuffer valueSizeRet) { + protected int getInfo(int name, long valueSize, Buffer value, PointerBuffer valueSizeRet) { return cl.clGetPlatformInfo(ID, name, valueSize, value, valueSizeRet); } @@ -520,7 +520,7 @@ public final class CLPlatform { }else{ checkForError(ret, "error while enumerating devices"); - NativeSizeBuffer deviceIDs = NativeSizeBuffer.wrap(getBB(count*NativeSizeBuffer.elementSize())); + PointerBuffer deviceIDs = PointerBuffer.wrap(getBB(count*PointerBuffer.ELEMENT_SIZE)); ret = cl.clGetDeviceIDs(ID, type, count, deviceIDs, null); checkForError(ret, "error while enumerating devices"); diff --git a/src/com/jogamp/opencl/CLProgram.java b/src/com/jogamp/opencl/CLProgram.java index 54d8cc1..53c2e1d 100644 --- a/src/com/jogamp/opencl/CLProgram.java +++ b/src/com/jogamp/opencl/CLProgram.java @@ -32,7 +32,7 @@ import com.jogamp.common.nio.CachedBufferFactory; import com.jogamp.opencl.util.CLProgramConfiguration; import com.jogamp.opencl.util.CLUtil; import com.jogamp.common.os.Platform; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import com.jogamp.common.nio.PointerBuffer; import com.jogamp.opencl.impl.BuildProgramCallback; import com.jogamp.opencl.util.CLBuildListener; @@ -78,7 +78,7 @@ public class CLProgram extends CLObject implements CLResource { IntBuffer status = newDirectIntBuffer(1); - NativeSizeBuffer length = NativeSizeBuffer.allocateDirect(1).put(0, src.length()); + PointerBuffer length = PointerBuffer.allocateDirect(1).put(0, src.length()); String[] srcArray = new String[] {src}; // Create the program @@ -106,9 +106,9 @@ public class CLProgram extends CLObject implements CLResource { int deviceCount = binaries.size(); CachedBufferFactory bf = CachedBufferFactory.create(binarySize + pbSize*deviceCount*3 + 4, true); - NativeSizeBuffer devices = NativeSizeBuffer.wrap(bf.newDirectByteBuffer(deviceCount*pbSize)); + PointerBuffer devices = PointerBuffer.wrap(bf.newDirectByteBuffer(deviceCount*pbSize)); PointerBuffer codeBuffers = PointerBuffer.wrap(bf.newDirectByteBuffer(deviceCount*pbSize)); - NativeSizeBuffer lengths = NativeSizeBuffer.wrap(bf.newDirectByteBuffer(deviceCount*pbSize)); + PointerBuffer lengths = PointerBuffer.wrap(bf.newDirectByteBuffer(deviceCount*pbSize)); int i = 0; for (Map.Entry<CLDevice, byte[]> entry : entries) { @@ -165,7 +165,7 @@ public class CLProgram extends CLObject implements CLResource { return ""; } - NativeSizeBuffer size = NativeSizeBuffer.allocateDirect(1); + PointerBuffer size = PointerBuffer.allocateDirect(1); int ret = cl.clGetProgramBuildInfo(ID, device.ID, flag, 0, null, size); if(ret != CL_SUCCESS) { @@ -188,7 +188,7 @@ public class CLProgram extends CLObject implements CLResource { return ""; } - NativeSizeBuffer size = NativeSizeBuffer.allocateDirect(1); + PointerBuffer size = PointerBuffer.allocateDirect(1); int ret = cl.clGetProgramInfo(ID, flag, 0, null, size); checkForError(ret, "on clGetProgramInfo"); @@ -329,10 +329,10 @@ public class CLProgram extends CLObject implements CLResource { releaseKernels(); } - NativeSizeBuffer deviceIDs = null; + PointerBuffer deviceIDs = null; int count = 0; if(devices != null && devices.length != 0) { - deviceIDs = NativeSizeBuffer.allocateDirect(devices.length); + deviceIDs = PointerBuffer.allocateDirect(devices.length); for (int i = 0; i < devices.length; i++) { deviceIDs.put(i, devices[i].ID); } @@ -431,7 +431,7 @@ public class CLProgram extends CLObject implements CLResource { if(numKernels.get(0) > 0) { - NativeSizeBuffer kernelIDs = NativeSizeBuffer.allocateDirect(numKernels.get(0)); + PointerBuffer kernelIDs = PointerBuffer.allocateDirect(numKernels.get(0)); ret = cl.clCreateKernelsInProgram(ID, kernelIDs.capacity(), kernelIDs, null); if(ret != CL_SUCCESS) { throw newException(ret, "can not create "+kernelIDs.capacity()+" kernels for "+this); @@ -495,7 +495,7 @@ public class CLProgram extends CLObject implements CLResource { if(released) { return new CLDevice[0]; } - NativeSizeBuffer size = NativeSizeBuffer.allocateDirect(1); + PointerBuffer size = PointerBuffer.allocateDirect(1); int ret = cl.clGetProgramInfo(ID, CL_PROGRAM_DEVICES, 0, null, size); if(ret != CL_SUCCESS) { throw newException(ret, "on clGetProgramInfo of "+this); @@ -620,7 +620,7 @@ public class CLProgram extends CLObject implements CLResource { long address = InternalBufferUtil.getDirectBufferAddress(binaries); - NativeSizeBuffer addresses = NativeSizeBuffer.allocateDirect(sizes.capacity()); + PointerBuffer addresses = PointerBuffer.allocateDirect(sizes.capacity()); sizes.rewind(); while(sizes.remaining() != 0) { addresses.put(address); diff --git a/src/com/jogamp/opencl/CLSampler.java b/src/com/jogamp/opencl/CLSampler.java index f215cab..73e153d 100644 --- a/src/com/jogamp/opencl/CLSampler.java +++ b/src/com/jogamp/opencl/CLSampler.java @@ -28,7 +28,7 @@ package com.jogamp.opencl; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import java.nio.Buffer; @@ -84,7 +84,7 @@ public class CLSampler extends CLObject implements CLResource { private class CLSamplerInfoAccessor extends CLInfoAccessor { @Override - protected int getInfo(int name, long valueSize, Buffer value, NativeSizeBuffer valueSizeRet) { + protected int getInfo(int name, long valueSize, Buffer value, PointerBuffer valueSizeRet) { return cl.clGetSamplerInfo(ID, name, valueSize, value, valueSizeRet); } diff --git a/src/com/jogamp/opencl/gl/CLGLContext.java b/src/com/jogamp/opencl/gl/CLGLContext.java index ee6c210..5f12d03 100644 --- a/src/com/jogamp/opencl/gl/CLGLContext.java +++ b/src/com/jogamp/opencl/gl/CLGLContext.java @@ -33,7 +33,7 @@ import com.jogamp.opencl.CLDevice; import java.nio.Buffer; import com.jogamp.opencl.CLMemory.Mem; import com.jogamp.opencl.CLPlatform; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import jogamp.opengl.GLContextImpl; import jogamp.opengl.egl.EGLContext; import jogamp.opengl.macosx.cgl.MacOSXCGLContext; @@ -96,7 +96,7 @@ public final class CLGLContext extends CLContext { } long[] glID = new long[1]; - NativeSizeBuffer properties = setupContextProperties(platform, glContext, glID); + PointerBuffer properties = setupContextProperties(platform, glContext, glID); ErrorDispatcher dispatcher = createErrorHandler(); long clID = createContextFromType(dispatcher, properties, toDeviceBitmap(deviceTypes)); @@ -120,7 +120,7 @@ public final class CLGLContext extends CLContext { CLPlatform platform = devices[0].getPlatform(); long[] glID = new long[1]; - NativeSizeBuffer properties = setupContextProperties(platform, glContext, glID); + PointerBuffer properties = setupContextProperties(platform, glContext, glID); ErrorDispatcher dispatcher = createErrorHandler(); long clID = createContext(dispatcher, properties, devices); @@ -134,7 +134,7 @@ public final class CLGLContext extends CLContext { } - private static NativeSizeBuffer setupContextProperties(CLPlatform platform, GLContext glContext, long[] glID) { + private static PointerBuffer setupContextProperties(CLPlatform platform, GLContext glContext, long[] glID) { if(platform == null) { throw new RuntimeException("no OpenCL installation found"); @@ -152,14 +152,14 @@ public final class CLGLContext extends CLContext { GLContextImpl ctxImpl = (GLContextImpl)glContext; glID[0] = glContext.getHandle(); - NativeSizeBuffer properties; + PointerBuffer properties; if(glContext instanceof X11GLXContext) { // spec: "When the GLX binding API is supported, the attribute // CL_GL_CONTEXT_KHR should be set to a GLXContext handle to an // OpenGL context, and the attribute CL_GLX_DISPLAY_KHR should be // set to the Display handle of the X Window System display used to // create the OpenGL context." - properties = NativeSizeBuffer.allocateDirect(7); + properties = PointerBuffer.allocateDirect(7); long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle(); properties.put(CL_GL_CONTEXT_KHR).put(glID[0]) .put(CL_GLX_DISPLAY_KHR).put(displayHandle) @@ -169,7 +169,7 @@ public final class CLGLContext extends CLContext { // CL_GL_CONTEXT_KHR should be set to an HGLRC handle to an OpenGL // context, and the attribute CL_WGL_HDC_KHR should be set to the // HDC handle of the display used to create the OpenGL context." - properties = NativeSizeBuffer.allocateDirect(7); + properties = PointerBuffer.allocateDirect(7); long surfaceHandle = ctxImpl.getDrawableImpl().getNativeSurface().getSurfaceHandle(); properties.put(CL_GL_CONTEXT_KHR).put(glID[0]) .put(CL_WGL_HDC_KHR).put(surfaceHandle) @@ -180,7 +180,7 @@ public final class CLGLContext extends CLContext { // a CGL share group object." long cgl = CGL.getCGLContext(glID[0]); long group = CGL.CGLGetShareGroup(cgl); - properties = NativeSizeBuffer.allocateDirect(5); + properties = PointerBuffer.allocateDirect(5); properties.put(CL_CGL_SHAREGROUP_KHR).put(group) .put(CL_CONTEXT_PLATFORM).put(platform.ID); }else if(glContext instanceof EGLContext) { @@ -190,7 +190,7 @@ public final class CLGLContext extends CLContext { // OpenGL ES or OpenGL context, and the attribute // CL_EGL_DISPLAY_KHR should be set to the EGLDisplay handle of the // display used to create the OpenGL ES or OpenGL context." - properties = NativeSizeBuffer.allocateDirect(7); + properties = PointerBuffer.allocateDirect(7); long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle(); properties.put(CL_GL_CONTEXT_KHR).put(glID[0]) .put(CL_EGL_DISPLAY_KHR).put(displayHandle) diff --git a/src/com/jogamp/opencl/impl/CLImpl.java b/src/com/jogamp/opencl/impl/CLImpl.java index 8ea4420..e7f034a 100644 --- a/src/com/jogamp/opencl/impl/CLImpl.java +++ b/src/com/jogamp/opencl/impl/CLImpl.java @@ -31,7 +31,7 @@ */ package com.jogamp.opencl.impl; -import com.jogamp.common.nio.NativeSizeBuffer; +import com.jogamp.common.nio.PointerBuffer; import com.jogamp.common.os.Platform; import com.jogamp.common.util.LongLongHashMap; import com.jogamp.opencl.CLErrorHandler; @@ -56,7 +56,7 @@ public class CLImpl extends CLAbstractImpl { this.contextCallbackMap.setKeyNotFoundValue(0); } - public long clCreateContext(NativeSizeBuffer properties, NativeSizeBuffer devices, CLErrorHandler pfn_notify, IntBuffer errcode_ret) { + public long clCreateContext(PointerBuffer properties, PointerBuffer devices, CLErrorHandler pfn_notify, IntBuffer errcode_ret) { if (properties != null && !properties.isDirect()) { throw new RuntimeException("Argument \"properties\" was not a direct buffer"); @@ -87,7 +87,7 @@ public class CLImpl extends CLAbstractImpl { private native long clCreateContext0(Object cl_context_properties, int props_offset, int numDevices, Object devices, int devices_offset, Object pfn_notify, long[] global, Object errcode_ret, int err_offset, long address); - public long clCreateContextFromType(NativeSizeBuffer properties, long device_type, CLErrorHandler pfn_notify, IntBuffer errcode_ret) { + public long clCreateContextFromType(PointerBuffer properties, long device_type, CLErrorHandler pfn_notify, IntBuffer errcode_ret) { if (properties != null && !properties.isDirect()) { throw new RuntimeException("Argument \"properties\" was not a direct buffer"); @@ -134,7 +134,7 @@ public class CLImpl extends CLAbstractImpl { public native int clReleaseContextImpl(long context, long global, long address); /** Interface to C language function: <br> <code> int32_t clBuildProgram(cl_program, uint32_t, cl_device_id * , const char * , void * ); </code> */ - public int clBuildProgram(long program, int deviceCount, NativeSizeBuffer deviceList, String options, BuildProgramCallback cb) { + public int clBuildProgram(long program, int deviceCount, PointerBuffer deviceList, String options, BuildProgramCallback cb) { if (deviceList != null && !deviceList.isDirect()) { throw new RuntimeException("Argument \"properties\" was not a direct buffer"); @@ -175,18 +175,18 @@ public class CLImpl extends CLAbstractImpl { /** Interface to C language function: <br> <code> void * {@native clEnqueueMapImage}(cl_command_queue command_queue, cl_mem image, uint32_t blocking_map, uint64_t map_flags, const size_t * , const size_t * , size_t * image_row_pitch, size_t * image_slice_pitch, uint32_t num_events_in_wait_list, cl_event * event_wait_list, cl_event * event, int32_t * errcode_ret); </code> - @param origin a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} - @param range a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} - @param image_row_pitch a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} - @param image_slice_pitch a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} - @param event_wait_list a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} - @param event a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} + @param origin a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} + @param range a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} + @param image_row_pitch a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} + @param image_slice_pitch a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} + @param event_wait_list a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} + @param event a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} @param errcode_ret a direct {@link java.nio.IntBuffer} */ public ByteBuffer clEnqueueMapImage(long command_queue, long image, int blocking_map, long map_flags, - NativeSizeBuffer origin, NativeSizeBuffer range, - NativeSizeBuffer image_row_pitch, NativeSizeBuffer image_slice_pitch, + PointerBuffer origin, PointerBuffer range, + PointerBuffer image_row_pitch, PointerBuffer image_slice_pitch, int num_events_in_wait_list, - NativeSizeBuffer event_wait_list, NativeSizeBuffer event, IntBuffer errcode_ret) { + PointerBuffer event_wait_list, PointerBuffer event, IntBuffer errcode_ret) { if (origin != null && !origin.isDirect()) { throw new CLException("Argument \"origin\" was not a direct buffer"); @@ -235,12 +235,12 @@ public class CLImpl extends CLAbstractImpl { } /** Entry point to C language function: <code> void * {@native clEnqueueMapImage}(cl_command_queue command_queue, cl_mem image, uint32_t blocking_map, uint64_t map_flags, const size_t * , const size_t * , size_t * image_row_pitch, size_t * image_slice_pitch, uint32_t num_events_in_wait_list, cl_event * event_wait_list, cl_event * event, int32_t * errcode_ret); </code> - @param origin a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} - @param range a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} - @param image_row_pitch a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} - @param image_slice_pitch a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} - @param event_wait_list a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} - @param event a direct {@link com.jogamp.gluegen.common.nio.NativeSizeBuffer} + @param origin a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} + @param range a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} + @param image_row_pitch a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} + @param image_slice_pitch a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} + @param event_wait_list a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} + @param event a direct {@link com.jogamp.gluegen.common.nio.PointerBuffer} @param errcode_ret a direct {@link java.nio.IntBuffer} */ private native ByteBuffer clEnqueueMapImage0(long command_queue, long image, int blocking_map, long map_flags, Object origin, int origin_byte_offset, Object range, int range_byte_offset, Object image_row_pitch, diff --git a/src/com/jogamp/opencl/util/CLBuildListener.java b/src/com/jogamp/opencl/util/CLBuildListener.java index 9a52058..cec4d39 100644 --- a/src/com/jogamp/opencl/util/CLBuildListener.java +++ b/src/com/jogamp/opencl/util/CLBuildListener.java @@ -40,7 +40,7 @@ import com.jogamp.opencl.CLProgram; * Note1: registering a build callback can make {@link com.jogamp.opencl.CL#clBuildProgram} non blocking (OpenCL implementation dependent).<br/> * Note2: the thread which calls this method is unspecified. The Application should ensure propper synchronization. * @author Michael Bien - * @see com.jogamp.opencl.CL#clBuildProgram(long, int, com.jogamp.common.nio.NativeSizeBuffer, java.lang.String, com.jogamp.opencl.impl.BuildProgramCallback) + * @see com.jogamp.opencl.CL#clBuildProgram(long, int, com.jogamp.common.nio.PointerBuffer, java.lang.String, com.jogamp.opencl.impl.BuildProgramCallback) */ public interface CLBuildListener { |