summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--silx/opencl/common.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/silx/opencl/common.py b/silx/opencl/common.py
index e955f46..07159e2 100644
--- a/silx/opencl/common.py
+++ b/silx/opencl/common.py
@@ -61,7 +61,14 @@ else:
pyopencl = None
else:
import pyopencl.array as array
- mf = pyopencl.mem_flags
+
+if pyopencl is None:
+ class mf(object):
+ WRITE_ONLY = 1
+ READ_ONLY = 1
+ READ_WRITE = 1
+else:
+ mf = pyopencl.mem_flags
if pyopencl is None:
# Define default mem flags