summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-02-13 11:39:44 +0100
committerMichael Bien <[email protected]>2011-02-13 11:39:44 +0100
commit8cc4dacf765452fb10c3f16076b26955994f2b80 (patch)
treece1f93351dc97c5a26260fdb7a43b68b0a019bb6 /test
parent08fe29a8696a2c77c1d24a637dfb54af2537afe7 (diff)
minimal wgs requirement for kernelTest.
Diffstat (limited to 'test')
-rw-r--r--test/com/jogamp/opencl/CLProgramTest.java22
1 files changed, 7 insertions, 15 deletions
diff --git a/test/com/jogamp/opencl/CLProgramTest.java b/test/com/jogamp/opencl/CLProgramTest.java
index 07d3f1d0..49c25180 100644
--- a/test/com/jogamp/opencl/CLProgramTest.java
+++ b/test/com/jogamp/opencl/CLProgramTest.java
@@ -268,21 +268,14 @@ public class CLProgramTest {
@Test
public void kernelTest() {
- String source = "__attribute__((reqd_work_group_size(256, 256, 256))) kernel void foo(void) { }\n";
+ String source = "__attribute__((reqd_work_group_size(1, 1, 1))) kernel void foo(void) { }\n";
- // to workaround "Internal error: Link failed." on AMD platform + GPU device
- final CLPlatform platform = CLPlatform.getDefault();
- CLDevice.Type type = CLDevice.Type.DEFAULT;
- if(platform.getVendor().toLowerCase().contains("amd")) {
- type = CLDevice.Type.CPU;
- }
-
- CLContext context = CLContext.create(platform, type);
+ CLContext context = CLContext.create();
try{
CLProgram program = context.createProgram(source).build();
assertTrue(program.isExecutable());
-
+
CLKernel kernel = program.createCLKernel("foo");
assertNotNull(kernel);
@@ -290,16 +283,15 @@ public class CLProgramTest {
out.println("compile workgroup size: " + wgs[0]+" "+wgs[1]+" "+wgs[2]);
- assertEquals(256, wgs[0]);
- assertEquals(256, wgs[1]);
- assertEquals(256, wgs[2]);
-
+ assertEquals(1, wgs[0]);
+ assertEquals(1, wgs[1]);
+ assertEquals(1, wgs[2]);
}finally{
context.release();
}
- }
+ }
@Test
public void createAllKernelsTest() {