aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLProgram.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-03-29 04:09:24 +0200
committerMichael Bien <[email protected]>2010-03-29 04:09:24 +0200
commit1c0265824a1a86e758abf7f0a0b1d1e43c5ef167 (patch)
tree369232785f03fd4844ae073ef063dd5a09576173 /src/com/mbien/opencl/CLProgram.java
parent9dab3d93ffaa04f9cf370648c67219694c58555a (diff)
changes due to BufferFactory -> Buffers renaming in gluegen.
Diffstat (limited to 'src/com/mbien/opencl/CLProgram.java')
-rw-r--r--src/com/mbien/opencl/CLProgram.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/mbien/opencl/CLProgram.java b/src/com/mbien/opencl/CLProgram.java
index ced89720..79195f78 100644
--- a/src/com/mbien/opencl/CLProgram.java
+++ b/src/com/mbien/opencl/CLProgram.java
@@ -2,7 +2,7 @@ package com.mbien.opencl;
import com.mbien.opencl.util.CLProgramConfiguration;
import com.mbien.opencl.util.CLUtil;
-import com.jogamp.gluegen.runtime.BufferFactory;
+import com.jogamp.gluegen.runtime.Buffers;
import com.jogamp.gluegen.runtime.CPU;
import com.jogamp.gluegen.runtime.PointerBuffer;
import java.nio.ByteBuffer;
@@ -43,7 +43,7 @@ public class CLProgram extends CLObject implements CLResource {
static CLProgram create(CLContext context, String src) {
- IntBuffer status = BufferFactory.newDirectByteBuffer(4).asIntBuffer();
+ IntBuffer status = Buffers.newDirectByteBuffer(4).asIntBuffer();
// Create the program
long id = context.cl.clCreateProgramWithSource(context.ID, 1, new String[] {src},
PointerBuffer.allocateDirect(1).put(src.length()), status);
@@ -68,15 +68,15 @@ public class CLProgram extends CLObject implements CLResource {
devices.put(device.ID);
lengths.put(bytes.length);
- codeBuffers[i] = BufferFactory.newDirectByteBuffer(bytes.length).put(bytes);
+ codeBuffers[i] = Buffers.newDirectByteBuffer(bytes.length).put(bytes);
codeBuffers[i].rewind();
i++;
}
devices.rewind();
lengths.rewind();
- IntBuffer err = BufferFactory.newDirectByteBuffer(4).asIntBuffer();
-// IntBuffer status = BufferFactory.newDirectByteBuffer(binaries.size()*4).asIntBuffer();
+ IntBuffer err = Buffers.newDirectByteBuffer(4).asIntBuffer();
+// IntBuffer status = Buffers.newDirectByteBuffer(binaries.size()*4).asIntBuffer();
long id = context.cl.clCreateProgramWithBinary(context.ID, devices.capacity(), devices, lengths, codeBuffers, /*status*/null, err);
// while(status.remaining() != 0) {
@@ -293,7 +293,7 @@ public class CLProgram extends CLObject implements CLResource {
HashMap<String, CLKernel> newKernels = new HashMap<String, CLKernel>();
- IntBuffer numKernels = BufferFactory.newDirectByteBuffer(4).asIntBuffer();
+ IntBuffer numKernels = Buffers.newDirectByteBuffer(4).asIntBuffer();
int ret = cl.clCreateKernelsInProgram(ID, 0, null, numKernels);
checkForError(ret, "can not create kernels for program");