diff options
author | Michael Bien <[email protected]> | 2009-10-20 00:53:50 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2009-10-20 00:53:50 +0200 |
commit | 7f2db980b303fa75f3830679ce65fe4ae41c30dc (patch) | |
tree | a22f4ad2a068ff0816ebc2a4ca71bb2426ee46e4 /src/com/mbien/opencl/CLCommandQueue.java | |
parent | 224985638b2a1486e4b7da1642a4f2cc22fc8644 (diff) |
added CLCommandQueue to CLContext's resource management code, minor fixes...
Diffstat (limited to 'src/com/mbien/opencl/CLCommandQueue.java')
-rw-r--r-- | src/com/mbien/opencl/CLCommandQueue.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/mbien/opencl/CLCommandQueue.java b/src/com/mbien/opencl/CLCommandQueue.java index ff91131b..b0a6980f 100644 --- a/src/com/mbien/opencl/CLCommandQueue.java +++ b/src/com/mbien/opencl/CLCommandQueue.java @@ -10,11 +10,13 @@ public class CLCommandQueue { public final long ID; private final CLContext context; + private final CLDevice device; private final CL cl; CLCommandQueue(CLContext context, CLDevice device, long properties) { this.context = context; this.cl = context.cl; + this.device = device; int[] status = new int[1]; this.ID = cl.clCreateCommandQueue(context.ID, device.ID, properties, status, 0); @@ -55,7 +57,7 @@ public class CLCommandQueue { int ret = cl.clEnqueueNDRangeKernel( ID, kernel.ID, 1, - null, 0, + globalWorkOffset, 0, globalWorkSize, 0, localWorkSize, 0, 0, @@ -70,6 +72,7 @@ public class CLCommandQueue { public void release() { int ret = cl.clReleaseCommandQueue(ID); + context.commandQueueReleased(device, this); checkForError(ret, "can not release command queue"); } |