aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLCommandQueue.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-01-13 00:16:50 +0100
committerMichael Bien <[email protected]>2010-01-13 00:16:50 +0100
commit9343c3ef5829f74207a8d220cb3b082211b910f2 (patch)
treece01d1a4a0dfbbbdf763fa3b6883e525a47e0e74 /src/com/mbien/opencl/CLCommandQueue.java
parent4aebe5715b7d61591c8e0b677e452b3905e5ecd6 (diff)
refactored HighLevelBindingTest into seperate tests.
added CLConcurrencyTest and fixed some bugs in CLEvent codepaths.
Diffstat (limited to 'src/com/mbien/opencl/CLCommandQueue.java')
-rw-r--r--src/com/mbien/opencl/CLCommandQueue.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/mbien/opencl/CLCommandQueue.java b/src/com/mbien/opencl/CLCommandQueue.java
index dd2ab075..38ec7274 100644
--- a/src/com/mbien/opencl/CLCommandQueue.java
+++ b/src/com/mbien/opencl/CLCommandQueue.java
@@ -177,7 +177,7 @@ public class CLCommandQueue implements CLResource {
}
public CLCommandQueue putWaitForEvent(CLEventList list, int index) {
- int marker = list.IDs.position();
+ int marker = list.IDs.position()-1;
list.IDs.position(index);
int ret = cl.clWaitForEvents(1, list.IDs);
list.IDs.position(marker);
@@ -186,6 +186,7 @@ public class CLCommandQueue implements CLResource {
}
public CLCommandQueue putWaitForEvents(CLEventList list) {
+ list.IDs.rewind();
int ret = cl.clWaitForEvents(list.size, list.IDs);
checkForError(ret, "error while waiting for events");
return this;
@@ -217,7 +218,7 @@ public class CLCommandQueue implements CLResource {
locWS = bufferC.put(1, localWorkSize).position(1);
}
- this.putNDRangeKernel(kernel, 1, globWO, globWS, locWS);
+ this.putNDRangeKernel(kernel, events, 1, globWO, globWS, locWS);
return this;
}