summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-02-13 16:20:34 +0100
committerMichael Bien <[email protected]>2010-02-13 16:20:34 +0100
commit62d9a63caad9d614a4a4ca90956b38ff623242a5 (patch)
treee90d8726cbd815bc7bfadea1c91ac4f6cb63bbd4 /src/com
parenta93e4532f9515f5b2c0d2c67a45db1236a29ab12 (diff)
added a few tests for event profiling and enums.
fixed bug in LocalMemType and Mem enum valueOf(int foo) methods.
Diffstat (limited to 'src/com')
-rw-r--r--src/com/mbien/opencl/CLDevice.java4
-rw-r--r--src/com/mbien/opencl/CLMemory.java2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/com/mbien/opencl/CLDevice.java b/src/com/mbien/opencl/CLDevice.java
index d6013166..cd569586 100644
--- a/src/com/mbien/opencl/CLDevice.java
+++ b/src/com/mbien/opencl/CLDevice.java
@@ -746,9 +746,9 @@ public final class CLDevice {
*/
public static LocalMemType valueOf(int clLocalCacheType) {
if(clLocalCacheType == CL_GLOBAL)
- return LOCAL;
- else if(clLocalCacheType == CL_LOCAL)
return GLOBAL;
+ else if(clLocalCacheType == CL_LOCAL)
+ return LOCAL;
return null;
}
diff --git a/src/com/mbien/opencl/CLMemory.java b/src/com/mbien/opencl/CLMemory.java
index 2b7e847a..296f16f5 100644
--- a/src/com/mbien/opencl/CLMemory.java
+++ b/src/com/mbien/opencl/CLMemory.java
@@ -202,6 +202,8 @@ public abstract class CLMemory <B extends Buffer> implements CLResource {
return Mem.READ_WRITE;
case CL_MEM_READ_ONLY:
return Mem.READ_ONLY;
+ case CL_MEM_WRITE_ONLY:
+ return Mem.WRITE_ONLY;
case CL_MEM_USE_HOST_PTR:
return Mem.USE_BUFFER;
case(CL_MEM_ALLOC_HOST_PTR):