summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jogamp/opencl/impl')
-rw-r--r--src/com/jogamp/opencl/impl/CLImpl.java38
-rw-r--r--src/com/jogamp/opencl/impl/CLTLAccessorFactory.java8
-rw-r--r--src/com/jogamp/opencl/impl/CLTLInfoAccessor.java16
3 files changed, 31 insertions, 31 deletions
diff --git a/src/com/jogamp/opencl/impl/CLImpl.java b/src/com/jogamp/opencl/impl/CLImpl.java
index 8ea44201..e7f034af 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/impl/CLTLAccessorFactory.java b/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java
index 1c7f9526..2f34fec5 100644
--- a/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java
+++ b/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java
@@ -4,7 +4,7 @@
package com.jogamp.opencl.impl;
import java.nio.IntBuffer;
-import com.jogamp.common.nio.NativeSizeBuffer;
+import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.opencl.CL;
import com.jogamp.opencl.spi.CLAccessorFactory;
import com.jogamp.opencl.spi.CLInfoAccessor;
@@ -40,7 +40,7 @@ public class CLTLAccessorFactory implements CLAccessorFactory {
}
@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.clGetDeviceInfo(ID, name, valueSize, value, valueSizeRet);
}
@@ -57,7 +57,7 @@ public class CLTLAccessorFactory implements CLAccessorFactory {
}
@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.clGetPlatformInfo(ID, name, valueSize, value, valueSizeRet);
}
@@ -74,7 +74,7 @@ public class CLTLAccessorFactory implements CLAccessorFactory {
}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/impl/CLTLInfoAccessor.java b/src/com/jogamp/opencl/impl/CLTLInfoAccessor.java
index ee5d0e47..c31b22a6 100644
--- a/src/com/jogamp/opencl/impl/CLTLInfoAccessor.java
+++ b/src/com/jogamp/opencl/impl/CLTLInfoAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 - 2010 JogAmp Community. All rights reserved.
+ * Copyright (c) 2009 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
@@ -29,7 +29,7 @@
package com.jogamp.opencl.impl;
import com.jogamp.opencl.spi.CLInfoAccessor;
-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;
@@ -55,11 +55,11 @@ public abstract class CLTLInfoAccessor implements 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);
}
};
@@ -77,7 +77,7 @@ public abstract class CLTLInfoAccessor implements CLInfoAccessor {
@Override
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");
@@ -122,11 +122,11 @@ public abstract class CLTLInfoAccessor implements 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);
}