summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLPlatform.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jogamp/opencl/CLPlatform.java')
-rw-r--r--src/com/jogamp/opencl/CLPlatform.java40
1 files changed, 37 insertions, 3 deletions
diff --git a/src/com/jogamp/opencl/CLPlatform.java b/src/com/jogamp/opencl/CLPlatform.java
index 46715feb..84d6497f 100644
--- a/src/com/jogamp/opencl/CLPlatform.java
+++ b/src/com/jogamp/opencl/CLPlatform.java
@@ -39,6 +39,11 @@ public final class CLPlatform {
*/
public final long ID;
+ /**
+ * Version of this OpenCL platform.
+ */
+ public final CLVersion version;
+
private static final CL cl;
private Set<String> extensions;
@@ -90,6 +95,7 @@ public final class CLPlatform {
private CLPlatform(long id) {
this.ID = id;
+ this.version = new CLVersion(getInfoString(CL_PLATFORM_VERSION));
}
/**
@@ -248,10 +254,31 @@ public final class CLPlatform {
}
/**
- * Returns the platform version.
+ * Returns the OpenCL version supported by this platform.
+ */
+ public CLVersion getVersion() {
+ return version;
+ }
+
+ /**
+ * Returns the OpenCL Specification version supported by this platform.
*/
- public String getVersion() {
- return getInfoString(CL_PLATFORM_VERSION);
+ public String getSpecVersion() {
+ return version.getSpecVersion();
+ }
+
+ /**
+ * @see CLVersion#isAtLeast(com.jogamp.opencl.CLVersion)
+ */
+ public boolean isAtLeast(CLVersion other) {
+ return version.isAtLeast(other);
+ }
+
+ /**
+ * @see CLVersion#isAtLeast(int, int)
+ */
+ public boolean isAtLeast(int major, int minor) {
+ return version.isAtLeast(major, minor);
}
/**
@@ -269,6 +296,13 @@ public final class CLPlatform {
}
/**
+ * Returns the ICD suffix.
+ */
+ public String getICDSuffix() {
+ return getInfoString(CL_PLATFORM_ICD_SUFFIX_KHR);
+ }
+
+ /**
* Returns true if the extension is supported on this platform.
*/
public boolean isExtensionAvailable(String extension) {