summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLKernel.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-01-08 00:11:55 +0100
committerMichael Bien <[email protected]>2010-01-08 00:11:55 +0100
commit286f94a7b148856666d7c05853ba9b2ba799b638 (patch)
treef7dc2acfaeb18d11979c58f3e40f5da923955da1 /src/com/mbien/opencl/CLKernel.java
parent14d666509596e5b954a5c20e0be9f5826a3ce733 (diff)
introduced CLSampler and CLEvent.
refactored code to use internal CLInfoAccessor utility where it makes sense. static imports.
Diffstat (limited to 'src/com/mbien/opencl/CLKernel.java')
-rw-r--r--src/com/mbien/opencl/CLKernel.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/mbien/opencl/CLKernel.java b/src/com/mbien/opencl/CLKernel.java
index 87474878..e7ac4b4d 100644
--- a/src/com/mbien/opencl/CLKernel.java
+++ b/src/com/mbien/opencl/CLKernel.java
@@ -5,7 +5,9 @@ import com.sun.gluegen.runtime.CPU;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+
import static com.mbien.opencl.CLException.*;
+import static com.mbien.opencl.CL.*;
/**
* High level abstraction for an OpenCL Kernel.
@@ -34,18 +36,18 @@ public class CLKernel implements CLResource {
long[] longArray = new long[1];
// get function name
- int ret = cl.clGetKernelInfo(ID, CL.CL_KERNEL_FUNCTION_NAME, 0, null, longArray, 0);
+ int ret = cl.clGetKernelInfo(ID, CL_KERNEL_FUNCTION_NAME, 0, null, longArray, 0);
checkForError(ret, "error while asking for kernel function name");
ByteBuffer bb = ByteBuffer.allocate((int)longArray[0]).order(ByteOrder.nativeOrder());
- ret = cl.clGetKernelInfo(ID, CL.CL_KERNEL_FUNCTION_NAME, bb.capacity(), bb, null, 0);
+ ret = cl.clGetKernelInfo(ID, CL_KERNEL_FUNCTION_NAME, bb.capacity(), bb, null, 0);
checkForError(ret, "error while asking for kernel function name");
this.name = CLUtils.clString2JavaString(bb.array(), bb.capacity());
// get number of arguments
- ret = cl.clGetKernelInfo(ID, CL.CL_KERNEL_NUM_ARGS, 0, null, longArray, 0);
+ ret = cl.clGetKernelInfo(ID, CL_KERNEL_NUM_ARGS, 0, null, longArray, 0);
checkForError(ret, "error while asking for number of function arguments.");
numArgs = (int)longArray[0];