summaryrefslogtreecommitdiffstats
path: root/test/com
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-09-21 00:48:32 +0200
committerMichael Bien <[email protected]>2010-09-21 00:48:32 +0200
commitd2f1955832dda891cb6d711c43bcb59e7199a38c (patch)
treec1f4087ec751de624ff50e5812dddeeb1e1e478b /test/com
parenta5b0d5948765a1695d9c02a30be599f905152668 (diff)
initial import of utility API for filtering platforms.
Diffstat (limited to 'test/com')
-rw-r--r--test/com/jogamp/opencl/HighLevelBindingTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/com/jogamp/opencl/HighLevelBindingTest.java b/test/com/jogamp/opencl/HighLevelBindingTest.java
index 0c0aa63d..695da7b2 100644
--- a/test/com/jogamp/opencl/HighLevelBindingTest.java
+++ b/test/com/jogamp/opencl/HighLevelBindingTest.java
@@ -22,6 +22,9 @@ import org.junit.Test;
import static org.junit.Assert.*;
import static java.lang.System.*;
import static com.jogamp.opencl.TestUtils.*;
+import static com.jogamp.opencl.util.CLPlatformFilters.*;
+import static com.jogamp.opencl.CLVersion.*;
+import static com.jogamp.opencl.CLDevice.Type.*;
import static com.jogamp.common.nio.Buffers.*;
/**
@@ -164,6 +167,21 @@ public class HighLevelBindingTest {
}
@Test
+ public void platformTest() {
+
+ CLPlatform platformGPU = CLPlatform.getDefault(version(CL_1_0), type(GPU));
+ CLPlatform platformCPU = CLPlatform.getDefault(version(CL_1_0), type(CPU));
+
+ if(platformGPU != null) {
+ assertTrue(platformGPU.listCLDevices(GPU).length > 0);
+ }else if(platformCPU != null) {
+ assertTrue(platformCPU.listCLDevices(CPU).length > 0);
+ }else{
+ fail("please tell us about your hardware");
+ }
+ }
+
+ @Test
public void createContextTest() {
out.println(" - - - highLevelTest; create context - - - ");