summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLBuffer.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-10-22 13:03:53 +0200
committerMichael Bien <[email protected]>2009-10-22 13:03:53 +0200
commit503845224a820c0b9ce9204aa6215519f6b93c36 (patch)
treeb675747824468377685a4e6408a269b43b78c9f1 /src/com/mbien/opencl/CLBuffer.java
parentb3881a0924ecbe17cf27cededeae8df40b2d6933 (diff)
32bit compatibility.
Diffstat (limited to 'src/com/mbien/opencl/CLBuffer.java')
-rw-r--r--src/com/mbien/opencl/CLBuffer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/mbien/opencl/CLBuffer.java b/src/com/mbien/opencl/CLBuffer.java
index 7dcd2928..185389c3 100644
--- a/src/com/mbien/opencl/CLBuffer.java
+++ b/src/com/mbien/opencl/CLBuffer.java
@@ -77,12 +77,14 @@ public class CLBuffer {
}
static int flagsToInt(MEM[] flags) {
- int clFlags = CL.CL_MEM_READ_WRITE;
+ int clFlags = 0;
if(flags != null) {
for (int i = 0; i < flags.length; i++) {
clFlags |= flags[i].CL_FLAG;
}
}
+ if(clFlags == 0)
+ clFlags = CL.CL_MEM_READ_WRITE;
return clFlags;
}