summaryrefslogtreecommitdiffstats
path: root/test/com/jogamp/opencl/HighLevelBindingTest.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-09-18 05:59:46 +0200
committerMichael Bien <[email protected]>2010-09-18 05:59:46 +0200
commit7b1d60f59c1e6e5b2c7f5f18eb9dabf1d85876e5 (patch)
treea79dd0496d61339a5f9568415d6bf9661b924a48 /test/com/jogamp/opencl/HighLevelBindingTest.java
parent08ecaceb0798f7f2917a3d916aa155e2682e5dbf (diff)
adjusted remaining work group sizes in tests.
Diffstat (limited to 'test/com/jogamp/opencl/HighLevelBindingTest.java')
-rw-r--r--test/com/jogamp/opencl/HighLevelBindingTest.java5
1 files changed, 3 insertions, 2 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)