diff options
Diffstat (limited to 'test/com/jogamp/opencl/CLCommandQueueTest.java')
-rw-r--r-- | test/com/jogamp/opencl/CLCommandQueueTest.java | 11 |
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); |