diff options
author | Michael Bien <[email protected]> | 2011-01-22 04:37:02 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-01-22 04:37:02 +0100 |
commit | 5941ad870810c3957d55750641e6424f91b4612f (patch) | |
tree | 4cbc3d1c39aa6120a249fe2363cbf38d105428b0 /test/com | |
parent | 716ff1945e229fbb358a1f1b2131933a8c37ce20 (diff) |
using lower wgs in LLB test.
increased timeout in CLGLTest.
Diffstat (limited to 'test/com')
-rw-r--r-- | test/com/jogamp/opencl/LowLevelBindingTest.java | 11 | ||||
-rw-r--r-- | test/com/jogamp/opencl/gl/CLGLTest.java | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/test/com/jogamp/opencl/LowLevelBindingTest.java b/test/com/jogamp/opencl/LowLevelBindingTest.java index 524743b..27f7155 100644 --- a/test/com/jogamp/opencl/LowLevelBindingTest.java +++ b/test/com/jogamp/opencl/LowLevelBindingTest.java @@ -255,12 +255,17 @@ public class LowLevelBindingTest { out.println("using device# " + offset); offset *= (is32Bit() ? 4 : 8); long device = is32Bit()?bb.getInt(offset):bb.getLong(offset); + + ret = cl.clGetDeviceInfo(device, CL.CL_DEVICE_MAX_WORK_GROUP_SIZE, bb.capacity(), bb, null); + checkError("on clGetDeviceInfo", ret); + int maxWGS = bb.getInt(); + out.println("max WGS: " + maxWGS); // Create a command-queue long commandQueue = cl.clCreateCommandQueue(context, device, 0, intBuffer); checkError("on clCreateCommandQueue", intBuffer.get(0)); - int localWorkSize = 128; // set and log Global and Local work size dimensions + int localWorkSize = Math.min(128, maxWGS); // 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); @@ -448,11 +453,11 @@ public class LowLevelBindingTest { return (ByteBuffer) newDirectByteBuffer(8).putLong(value).rewind(); } - private final void checkForError(int ret) { + private void checkForError(int ret) { this.checkError("", ret); } - private final void checkError(String msg, int ret) { + private void checkError(String msg, int ret) { if(ret != CL.CL_SUCCESS) throw CLException.newException(ret, msg); } diff --git a/test/com/jogamp/opencl/gl/CLGLTest.java b/test/com/jogamp/opencl/gl/CLGLTest.java index 0f075cc..01fd467 100644 --- a/test/com/jogamp/opencl/gl/CLGLTest.java +++ b/test/com/jogamp/opencl/gl/CLGLTest.java @@ -59,7 +59,7 @@ import static java.lang.System.*; public class CLGLTest { @Rule - public MethodRule methodTimeout= new Timeout(5000); + public MethodRule methodTimeout= new Timeout(15000); private static GLContext glcontext; private static GLWindow glWindow; |