From a5efe050242d1d6a45e03fcac1763ff90877e322 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sat, 2 Jan 2010 00:15:55 +0100 Subject: introduced CLGLContext, refactored dependencies, cleanup in opencl code. --- src/com/mbien/opencl/CLCommandQueue.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/com/mbien/opencl/CLCommandQueue.java') diff --git a/src/com/mbien/opencl/CLCommandQueue.java b/src/com/mbien/opencl/CLCommandQueue.java index d488d1c4..737e8c81 100644 --- a/src/com/mbien/opencl/CLCommandQueue.java +++ b/src/com/mbien/opencl/CLCommandQueue.java @@ -154,6 +154,16 @@ public class CLCommandQueue implements CLResource { localWorkSize ==0 ? null : new long[] {localWorkSize } ); } + public CLCommandQueue put2DRangeKernel(CLKernel kernel, long globalWorkOffsetX, long globalWorkOffsetY, + long globalWorkSizeX, long globalWorkSizeY, + long localWorkSizeX, long localWorkSizeY) { + return this.putNDRangeKernel( + kernel, 2, + globalWorkOffsetX==0 && globalWorkOffsetY==0 ? null : new long[] {globalWorkOffsetX, globalWorkOffsetY}, + globalWorkSizeX ==0 && globalWorkSizeY ==0 ? null : new long[] {globalWorkSizeX, globalWorkSizeY }, + localWorkSizeX ==0 && localWorkSizeY ==0 ? null : new long[] {localWorkSizeX, localWorkSizeY } ); + } + public CLCommandQueue putNDRangeKernel(CLKernel kernel, int workDimension, long[] globalWorkOffset, long[] globalWorkSize, long[] localWorkSize) { int ret = cl.clEnqueueNDRangeKernel( -- cgit v1.2.3