summaryrefslogtreecommitdiffstats
path: root/test/com/mbien/opencl
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-11-01 01:05:08 +0100
committerMichael Bien <[email protected]>2009-11-01 01:05:08 +0100
commit0c2be38282bbba718f41895e43b057c87036d363 (patch)
tree86cb119af4ac60616e24aac8ddb4b4d3e047b314 /test/com/mbien/opencl
parent905a38eb0a435a31ba5a4a9091dfc67350fc8fa8 (diff)
added remaining utility getters to CLDevice.
Diffstat (limited to 'test/com/mbien/opencl')
-rw-r--r--test/com/mbien/opencl/HighLevelBindingTest.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/com/mbien/opencl/HighLevelBindingTest.java b/test/com/mbien/opencl/HighLevelBindingTest.java
index 85dbda1d..915a5ce2 100644
--- a/test/com/mbien/opencl/HighLevelBindingTest.java
+++ b/test/com/mbien/opencl/HighLevelBindingTest.java
@@ -1,8 +1,11 @@
package com.mbien.opencl;
import com.mbien.opencl.CLBuffer.Mem;
+import com.mbien.opencl.CLCommandQueue.Mode;
+import com.mbien.opencl.CLDevice.SingleFPConfig;
import java.io.IOException;
import java.nio.ByteBuffer;
+import java.util.EnumSet;
import java.util.Map;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -29,6 +32,18 @@ public class HighLevelBindingTest {
out.println(" - - - highLevelTest; contextless - - - ");
+ // enum tests
+ final EnumSet<SingleFPConfig> singleFPConfig = SingleFPConfig.valuesOf(CL.CL_FP_DENORM | CL.CL_FP_ROUND_TO_INF);
+ assertEquals(0, SingleFPConfig.valuesOf(0).size());
+ assertTrue(singleFPConfig.contains(SingleFPConfig.DENORM));
+ assertTrue(singleFPConfig.contains(SingleFPConfig.ROUND_TO_INF));
+
+ final EnumSet<Mode> queueMode = Mode.valuesOf(CL.CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL.CL_QUEUE_PROFILING_ENABLE);
+ assertEquals(0, Mode.valuesOf(0).size());
+ assertTrue(queueMode.contains(Mode.OUT_OF_ORDER_EXEC_MODE));
+ assertTrue(queueMode.contains(Mode.PROFILING_MODE));
+
+ // platform/device info tests
CLPlatform[] clPlatforms = CLPlatform.listCLPlatforms();
for (CLPlatform platform : clPlatforms) {
@@ -49,7 +64,14 @@ public class HighLevelBindingTest {
out.println(" type: "+device.getType());
out.println(" global mem: "+device.getGlobalMemSize()/(1024*1024)+" MB");
out.println(" local mem: "+device.getLocalMemSize()/1024+" KB");
+ out.println(" local mem type: "+device.getLocalMemType());
+ out.println(" global mem cache size: "+device.getGlobalMemCachSize());
+ out.println(" global mem cache type: "+device.getGlobalMemCacheType());
+ out.println(" constant buffer size: "+device.getMaxConstantBufferSize());
+ out.println(" queue properties: "+device.getQueueProperties());
out.println(" clock: "+device.getMaxClockFrequency()+" MHz");
+ out.println(" timer res: "+device.getProfilingTimerResolution()+" ns");
+ out.println(" single FP config: "+device.getSingleFPConfig());
out.println(" max work group size: "+device.getMaxWorkGroupSize());
out.println(" max compute units: "+device.getMaxComputeUnits());
out.println(" extensions: "+device.getExtensions());