summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/spi
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-05-25 00:21:37 +0200
committerMichael Bien <[email protected]>2011-05-25 00:21:37 +0200
commit10c82cf73a2c2e4a944d10294b7d51f4575e0f6e (patch)
treedbdcda2a5a663cce2d3e4b58af06385bdef6d4d5 /src/com/jogamp/opencl/spi
parenta0b006f60512e30e362fbe8a15d4b40cc72609e2 (diff)
CLAccessor SPI - initial refactorings.
Diffstat (limited to 'src/com/jogamp/opencl/spi')
-rw-r--r--src/com/jogamp/opencl/spi/CLInfoAccessor.java25
-rw-r--r--src/com/jogamp/opencl/spi/CLPlatformInfoAccessor.java14
2 files changed, 39 insertions, 0 deletions
diff --git a/src/com/jogamp/opencl/spi/CLInfoAccessor.java b/src/com/jogamp/opencl/spi/CLInfoAccessor.java
new file mode 100644
index 00000000..0ff0aeac
--- /dev/null
+++ b/src/com/jogamp/opencl/spi/CLInfoAccessor.java
@@ -0,0 +1,25 @@
+/*
+ * Created on Thursday, May 19 2011 16:43
+ */
+package com.jogamp.opencl.spi;
+
+/**
+ * Internal utility for common OpenCL clGetFooInfo calls.
+ * Provides common accessors to CL objects.
+ * @author Michael Bien
+ */
+public interface CLInfoAccessor {
+
+ int[] getInts(int key, int n);
+
+ /**
+ * Returns the long value for the given key.
+ */
+ long getLong(int key);
+
+ /**
+ * Returns the String value for the given key.
+ */
+ String getString(int key);
+
+}
diff --git a/src/com/jogamp/opencl/spi/CLPlatformInfoAccessor.java b/src/com/jogamp/opencl/spi/CLPlatformInfoAccessor.java
new file mode 100644
index 00000000..eb97fb56
--- /dev/null
+++ b/src/com/jogamp/opencl/spi/CLPlatformInfoAccessor.java
@@ -0,0 +1,14 @@
+/*
+ * Created on Thursday, May 19 2011 16:47
+ */
+package com.jogamp.opencl.spi;
+
+/**
+ *
+ * @author Michael Bien
+ */
+public interface CLPlatformInfoAccessor extends CLInfoAccessor {
+
+ long[] getDeviceIDs(long type);
+
+}