aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/com/jogamp/opencl/HighLevelBindingTest.java5
-rw-r--r--test/com/jogamp/opencl/LowLevelBindingTest.java2
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);