diff options
author | Wade Walker <[email protected]> | 2014-02-08 14:00:41 -0600 |
---|---|---|
committer | Wade Walker <[email protected]> | 2014-02-08 14:00:41 -0600 |
commit | 0874fa955c0401dba9f54816a9654bb4380abed8 (patch) | |
tree | 6495ec3de88f7fafe7d49bcfbf62c9915ff045bf /test | |
parent | 10f9ddfad21c8ab1d4287742d1b524ae11e916c8 (diff) |
Fix unit test bugs on Mac OS X 64-bit.
This commit fixes bugs 959 (local work size set incorrectly),
960 (concurrencyTest() throws ConcurrentModificationException)
963 (programBinariesTest() causes SIGSEGV) and 964 (builderTest()
cases CL_INVALID_VALUE). After this commit, all JOCL tests should
pass on 64-bit Mac OS X.
Diffstat (limited to 'test')
-rw-r--r-- | test/com/jogamp/opencl/CLCommandQueueTest.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/com/jogamp/opencl/CLCommandQueueTest.java b/test/com/jogamp/opencl/CLCommandQueueTest.java index c9b1b56..672cc8b 100644 --- a/test/com/jogamp/opencl/CLCommandQueueTest.java +++ b/test/com/jogamp/opencl/CLCommandQueueTest.java @@ -474,7 +474,9 @@ public class CLCommandQueueTest extends UITestCase { @Override public void run() { - int groupSize = queue2.getDevice().getMaxWorkItemSizes()[0]; + int maxWorkItemSize = queue2.getDevice().getMaxWorkItemSizes()[0]; + int kernelWorkGroupSize = (int)vectorAddKernel2.getWorkGroupSize( queue2.getDevice() ); + int localWorkSize = Math.min( maxWorkItemSize, kernelWorkGroupSize ); fillBuffer(clBufferA2.buffer, 12345); fillBuffer(clBufferB2.buffer, 67890); @@ -488,7 +490,7 @@ public class CLCommandQueueTest extends UITestCase { // System.out.println("D kernels"); CLEventList events2 = new CLEventList(2); - queue2.put1DRangeKernel(vectorAddKernel2, 0, elements, groupSize, events2); + queue2.put1DRangeKernel(vectorAddKernel2, 0, elements, localWorkSize, events2); queue2.putReadBuffer(clBufferD, false, events2); barrier.waitFor(queue2, events2); |