diff options
author | Michael Bien <[email protected]> | 2010-09-18 05:59:46 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-09-18 05:59:46 +0200 |
commit | 7b1d60f59c1e6e5b2c7f5f18eb9dabf1d85876e5 (patch) | |
tree | a79dd0496d61339a5f9568415d6bf9661b924a48 /test/com/jogamp/opencl | |
parent | 08ecaceb0798f7f2917a3d916aa155e2682e5dbf (diff) |
adjusted remaining work group sizes in tests.
Diffstat (limited to 'test/com/jogamp/opencl')
-rw-r--r-- | test/com/jogamp/opencl/HighLevelBindingTest.java | 5 | ||||
-rw-r--r-- | test/com/jogamp/opencl/LowLevelBindingTest.java | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/test/com/jogamp/opencl/HighLevelBindingTest.java b/test/com/jogamp/opencl/HighLevelBindingTest.java index 3755221b..0c0aa63d 100644 --- a/test/com/jogamp/opencl/HighLevelBindingTest.java +++ b/test/com/jogamp/opencl/HighLevelBindingTest.java @@ -242,6 +242,7 @@ public class HighLevelBindingTest { CLProgram program = context.createProgram(getClass().getResourceAsStream("testkernels.cl")).build(); CLDevice[] programDevices = program.getCLDevices(); + CLDevice device = programDevices[0]; assertEquals(contextDevices.length, programDevices.length); @@ -256,7 +257,7 @@ public class HighLevelBindingTest { assertFalse(binaries.isEmpty()); int elementCount = 11444777; // Length of float arrays to process (odd # for illustration) - int localWorkSize = 256; // set and log Global and Local work size dimensions + int localWorkSize = device.getMaxWorkItemSizes()[0]; // set and log Global and Local work size dimensions int globalWorkSize = roundUp(localWorkSize, elementCount); // rounded up to the nearest multiple of the LocalWorkSize out.println("allocateing buffers of size: "+globalWorkSize); @@ -279,7 +280,7 @@ public class HighLevelBindingTest { .setArg(2, clBufferC) .setArg(3, elementCount); - CLCommandQueue queue = programDevices[0].createCommandQueue(); + CLCommandQueue queue = device.createCommandQueue(); // Asynchronous write of data to GPU device, blocking read later queue.putWriteBuffer(clBufferA, false) diff --git a/test/com/jogamp/opencl/LowLevelBindingTest.java b/test/com/jogamp/opencl/LowLevelBindingTest.java index 9a102946..bd4a68e8 100644 --- a/test/com/jogamp/opencl/LowLevelBindingTest.java +++ b/test/com/jogamp/opencl/LowLevelBindingTest.java @@ -232,7 +232,7 @@ public class LowLevelBindingTest { long commandQueue = cl.clCreateCommandQueue(context, device, 0, intBuffer); checkError("on clCreateCommandQueue", intBuffer.get(0)); - int localWorkSize = 256; // set and log Global and Local work size dimensions + int localWorkSize = 128; // set and log Global and Local work size dimensions int globalWorkSize = roundUp(localWorkSize, ELEMENT_COUNT); // rounded up to the nearest multiple of the LocalWorkSize out.println("allocateing buffers of size: "+globalWorkSize); |