diff options
author | Michael Bien <[email protected]> | 2010-02-22 23:38:56 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-02-22 23:38:56 +0100 |
commit | d78faf0ef678cc87f5220d2cb8eccbe173449541 (patch) | |
tree | 8a4dcff14f70c88869d6bdc095817474ae729311 /src/com/mbien/opencl/CLUtils.java | |
parent | 7c83da1d2e3e8d122e562408a63a13928cc97c83 (diff) |
introduced CLObject as common superclass for all OpenCL objects.
Diffstat (limited to 'src/com/mbien/opencl/CLUtils.java')
-rw-r--r-- | src/com/mbien/opencl/CLUtils.java | 14 |
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>(); |