aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLPlatform.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-06-27 23:44:56 +0200
committerMichael Bien <[email protected]>2010-06-27 23:44:56 +0200
commit467453f0752f162ce297de0db27d6a4fef67d15f (patch)
tree005e02f82b122dcfa3c54f7ccf5db0992e49422d /src/com/jogamp/opencl/CLPlatform.java
parentbe5f1d62838cd8709a1f4f881c08494246a8471f (diff)
minor refactorings and updates.
Diffstat (limited to 'src/com/jogamp/opencl/CLPlatform.java')
-rw-r--r--src/com/jogamp/opencl/CLPlatform.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/jogamp/opencl/CLPlatform.java b/src/com/jogamp/opencl/CLPlatform.java
index 84d6497f..c12fbd47 100644
--- a/src/com/jogamp/opencl/CLPlatform.java
+++ b/src/com/jogamp/opencl/CLPlatform.java
@@ -1,5 +1,6 @@
package com.jogamp.opencl;
+import com.jogamp.common.nio.Buffers;
import com.jogamp.common.os.DynamicLookupHelper;
import java.security.PrivilegedAction;
import com.jogamp.common.JogampRuntimeException;
@@ -11,7 +12,6 @@ import com.jogamp.opencl.impl.CLImpl;
import com.jogamp.opencl.impl.CLProcAddressTable;
import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
import java.nio.IntBuffer;
import java.util.ArrayList;
import java.util.Collections;
@@ -73,8 +73,8 @@ public final class CLPlatform {
cl = new CLImpl(table);
//load JOCL and init table
- doPrivileged(new PrivilegedAction<CLProcAddressTable>() {
- public CLProcAddressTable run() {
+ doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
NativeLibrary lib = JOCLJNILibLoader.loadJOCL();
@@ -114,7 +114,7 @@ public final class CLPlatform {
*/
public static CLPlatform[] listCLPlatforms() {
- IntBuffer ib = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
+ IntBuffer ib = Buffers.newDirectIntBuffer(1);
// find all available OpenCL platforms
int ret = cl.clGetPlatformIDs(0, null, ib);
checkForError(ret, "can not enumerate platforms");
@@ -161,7 +161,7 @@ public final class CLPlatform {
*/
public CLDevice[] listCLDevices(CLDevice.Type... types) {
- IntBuffer ib = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
+ IntBuffer ib = Buffers.newDirectIntBuffer(1);
List<CLDevice> list = new ArrayList<CLDevice>();
for(int t = 0; t < types.length; t++) {