summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLContext.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-05-18 03:51:10 +0200
committerSven Gothel <[email protected]>2011-05-18 03:51:10 +0200
commit773060662ef81707f70c447b71e664635ac45e2a (patch)
treef52c9e24b80902b08422005192df5b525f85489b /src/com/jogamp/opencl/CLContext.java
parenteceed6e10c7d6cb19e8ad3c1bf5ea20450d6fae1 (diff)
parentf12e3a9d7ac644abc98a51dc51786cf7c5b67851 (diff)
resolve conflicts
Diffstat (limited to 'src/com/jogamp/opencl/CLContext.java')
-rw-r--r--src/com/jogamp/opencl/CLContext.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/com/jogamp/opencl/CLContext.java b/src/com/jogamp/opencl/CLContext.java
index c8a847a2..850f6c0e 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.PointerBuffer;
+import com.jogamp.common.nio.NativeSizeBuffer;
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) {
- PointerBuffer deviceCount = PointerBuffer.allocateDirect(1);
+ NativeSizeBuffer deviceCount = NativeSizeBuffer.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);
- PointerBuffer properties = setupContextProperties(platform);
+ NativeSizeBuffer 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();
- PointerBuffer properties = setupContextProperties(platform);
+ NativeSizeBuffer 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, PointerBuffer properties, long deviceType) {
+ protected static long createContextFromType(CLErrorHandler handler, NativeSizeBuffer 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, PointerBuffer properties, CLDevice... devices) {
+ protected static long createContext(CLErrorHandler handler, NativeSizeBuffer properties, CLDevice... devices) {
IntBuffer status = newDirectIntBuffer(1);
- PointerBuffer pb = null;
+ NativeSizeBuffer pb = null;
if(devices != null && devices.length != 0) {
- pb = PointerBuffer.allocateDirect(devices.length);
+ pb = NativeSizeBuffer.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 PointerBuffer setupContextProperties(CLPlatform platform) {
+ private static NativeSizeBuffer setupContextProperties(CLPlatform platform) {
if(platform == null) {
throw new RuntimeException("no OpenCL installation found");
}
- return PointerBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM)
+ return NativeSizeBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM)
.put(platform.ID).put(0) // 0 terminated array
.rewind();
}