summaryrefslogtreecommitdiffstats
path: root/test/com
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-09-15 18:33:21 +0200
committerMichael Bien <[email protected]>2010-09-15 18:33:21 +0200
commit91938387529fe220323e0c7472f788c78e1ace72 (patch)
treeff843ed5b9c26359aa2319d21f2ef60b0dcd216b /test/com
parent39d98824e916487ae838e3ade8230a3193db1ee9 (diff)
removed CLContext factory methods with CLPlatform + CLDevice list combinations.
justification: - information is now no longer needed since every CLDevice knows its CLPlatform - OpenCL device IDs are not portable between CLPlatforms changes: - Context factories will throw CLInvalidPlatformException if the platform of all CLDevices does not match related changes: - [persistance] CLProgramBuilder stores now the ICD suffix to be later able to map binaries back to the platform + device
Diffstat (limited to 'test/com')
-rw-r--r--test/com/jogamp/opencl/HighLevelBindingTest.java25
1 files changed, 8 insertions, 17 deletions
diff --git a/test/com/jogamp/opencl/HighLevelBindingTest.java b/test/com/jogamp/opencl/HighLevelBindingTest.java
index e927f1fa..3755221b 100644
--- a/test/com/jogamp/opencl/HighLevelBindingTest.java
+++ b/test/com/jogamp/opencl/HighLevelBindingTest.java
@@ -169,8 +169,8 @@ public class HighLevelBindingTest {
out.println(" - - - highLevelTest; create context - - - ");
CLPlatform platform = CLPlatform.getDefault();
- int deviceCount = platform.listCLDevices().length;
- CLDevice firstDevice = platform.listCLDevices()[0];
+ CLDevice[] devices = platform.listCLDevices();
+ int deviceCount = devices.length;
CLContext c = CLContext.create();
assertNotNull(c);
@@ -182,21 +182,18 @@ public class HighLevelBindingTest {
assertEquals(deviceCount, c.getDevices().length);
c.release();
- c = CLContext.create(firstDevice);
- assertNotNull(c);
- assertEquals(1, c.getDevices().length);
- c.release();
+ for (CLDevice device : devices) {
+ c = CLContext.create(device);
+ assertNotNull(c);
+ assertEquals(1, c.getDevices().length);
+ c.release();
+ }
c = CLContext.create(CLDevice.Type.ALL);
assertNotNull(c);
assertEquals(deviceCount, c.getDevices().length);
c.release();
- c = CLContext.create(platform, firstDevice);
- assertNotNull(c);
- assertEquals(1, c.getDevices().length);
- c.release();
-
c = CLContext.create(platform, CLDevice.Type.ALL);
assertNotNull(c);
assertEquals(deviceCount, c.getDevices().length);
@@ -217,12 +214,6 @@ public class HighLevelBindingTest {
// expected
}
try{
- CLContext.create((CLPlatform)null, (CLDevice)null);
- fail("create with null device");
- }catch(IllegalArgumentException ex) {
- // expected
- }
- try{
CLContext.create((CLPlatform)null, (CLDevice.Type)null);
fail("create with null CLDevice.Type");
}catch(IllegalArgumentException ex) {