summaryrefslogtreecommitdiffstats
path: root/test/com/jogamp/opencl/CLCommandQueueTest.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-05-02 22:55:02 +0200
committerMichael Bien <[email protected]>2010-05-02 22:55:02 +0200
commit3b3dc4591d3690f61b9488ed74e7c9248def1fd5 (patch)
treec7c30c0a51d9a1dc22e9c52bb239b1ea96df3b07 /test/com/jogamp/opencl/CLCommandQueueTest.java
parent59148a192446ddfefb13516d7ada72e6fa1661c7 (diff)
CLBuildListener functionality for high level bindings.
- uses low level BuildProgramCallback internally - updated tests, testing async builds
Diffstat (limited to 'test/com/jogamp/opencl/CLCommandQueueTest.java')
-rw-r--r--test/com/jogamp/opencl/CLCommandQueueTest.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/com/jogamp/opencl/CLCommandQueueTest.java b/test/com/jogamp/opencl/CLCommandQueueTest.java
index e2da5665..9070b268 100644
--- a/test/com/jogamp/opencl/CLCommandQueueTest.java
+++ b/test/com/jogamp/opencl/CLCommandQueueTest.java
@@ -172,6 +172,7 @@ public class CLCommandQueueTest {
CLDevice[] devices = context.getDevices();
+ // ignore this test if we can't test in parallel
if (devices.length < 2) {
out.println("aborting test... need at least 2 devices");
context.release();
@@ -188,22 +189,18 @@ public class CLCommandQueueTest {
CLProgram program = context.createProgram(getClass().getResourceAsStream("testkernels.cl")).build();
+ //two independent kernel instances
final CLKernel vectorAddKernel1 = program.createCLKernel("VectorAddGM").setArg(3, elements);
final CLKernel vectorAddKernel2 = program.createCLKernel("VectorAddGM").setArg(3, elements);
- int secondDevice = devices.length > 1 ? 1 : 0;
-
- final CLCommandQueue queue1 = devices[0 ].createCommandQueue();
- final CLCommandQueue queue2 = devices[secondDevice].createCommandQueue();
+ final CLCommandQueue queue1 = devices[0].createCommandQueue();
+ final CLCommandQueue queue2 = devices[1].createCommandQueue();
out.println(queue1);
out.println(queue2);
fillBuffer(clBufferC.buffer, 12345);
- if (secondDevice > 0) {
- System.out.println("using two devices");
- }
final MultiQueueBarrier barrier = new MultiQueueBarrier(2);