summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLKernel.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-03-30 17:19:15 +0200
committerMichael Bien <[email protected]>2010-03-30 17:19:15 +0200
commit9ec0937d729faade497a3d2a394f76992dcdaa45 (patch)
tree5ae54ffaf676f988609e66f6a88858f468f296bf /src/com/mbien/opencl/CLKernel.java
parent8b6228d7978c515d1d8de160c45fe52b77874779 (diff)
refactorings due to newly introduced Int64Buffer in gluegen.
Diffstat (limited to 'src/com/mbien/opencl/CLKernel.java')
-rw-r--r--src/com/mbien/opencl/CLKernel.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/mbien/opencl/CLKernel.java b/src/com/mbien/opencl/CLKernel.java
index 12d1047b..31315531 100644
--- a/src/com/mbien/opencl/CLKernel.java
+++ b/src/com/mbien/opencl/CLKernel.java
@@ -2,8 +2,8 @@ package com.mbien.opencl;
import com.mbien.opencl.util.CLUtil;
import com.jogamp.gluegen.runtime.Buffers;
-import com.jogamp.gluegen.runtime.CPU;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.gluegen.runtime.Platform;
+import com.jogamp.gluegen.runtime.Int64Buffer;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@@ -39,13 +39,13 @@ public class CLKernel extends CLObject implements CLResource, Cloneable {
this.program = program;
this.buffer = Buffers.newDirectByteBuffer(8);
- PointerBuffer pb = PointerBuffer.allocateDirect(1);
+ Int64Buffer size = Int64Buffer.allocateDirect(1);
// get function name
- int ret = cl.clGetKernelInfo(ID, CL_KERNEL_FUNCTION_NAME, 0, null, pb);
+ int ret = cl.clGetKernelInfo(ID, CL_KERNEL_FUNCTION_NAME, 0, null, size);
checkForError(ret, "error while asking for kernel function name");
- ByteBuffer bb = ByteBuffer.allocateDirect((int)pb.get(0)).order(ByteOrder.nativeOrder());
+ ByteBuffer bb = ByteBuffer.allocateDirect((int)size.get(0)).order(ByteOrder.nativeOrder());
ret = cl.clGetKernelInfo(ID, CL_KERNEL_FUNCTION_NAME, bb.capacity(), bb, null);
checkForError(ret, "error while asking for kernel function name");
@@ -112,7 +112,7 @@ public class CLKernel extends CLObject implements CLResource, Cloneable {
// }
public CLKernel setArg(int argumentIndex, CLMemory<?> value) {
- setArgument(argumentIndex, CPU.is32Bit()?4:8, wrap(value.ID));
+ setArgument(argumentIndex, Platform.is32Bit()?4:8, wrap(value.ID));
return this;
}