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