aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/mbien/opencl/CLUtils.java')
-rw-r--r--src/com/mbien/opencl/CLUtils.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/mbien/opencl/CLUtils.java b/src/com/mbien/opencl/CLUtils.java
index 03fb559c..0f948175 100644
--- a/src/com/mbien/opencl/CLUtils.java
+++ b/src/com/mbien/opencl/CLUtils.java
@@ -25,6 +25,20 @@ class CLUtils {
}
}
+ /**
+ * Returns true if clBoolean == CL.CL_TRUE.
+ */
+ public static boolean clBoolean(int clBoolean) {
+ return clBoolean == CL.CL_TRUE;
+ }
+
+ /**
+ * Returns b ? CL.CL_TRUE : CL.CL_FALSE
+ */
+ public static int clBoolean(boolean b) {
+ return b ? CL.CL_TRUE : CL.CL_FALSE;
+ }
+
public static Map<String, String> obtainPlatformProperties(CLPlatform platform) {
Map<String, String> map = new LinkedHashMap<String, String>();