From 7b1d60f59c1e6e5b2c7f5f18eb9dabf1d85876e5 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sat, 18 Sep 2010 05:59:46 +0200 Subject: adjusted remaining work group sizes in tests. --- test/com/jogamp/opencl/HighLevelBindingTest.java | 5 +++-- test/com/jogamp/opencl/LowLevelBindingTest.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'test') 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); -- cgit v1.2.3