summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>2017-08-11 10:15:26 +0200
committerPicca Frédéric-Emmanuel <picca@debian.org>2017-11-25 17:02:19 +0100
commit0fbb2555d5ec11cbcbcfd465633ecfee7922c908 (patch)
tree9b76b32cea72edc6fa53771ccaba0874bc02c1ee
parent0539996250fced86134aa3011d65f426c35589d8 (diff)
fix unit test
Gbp-Pq: Name 0003-fix-unit-test.patch
-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 ebf50c7..5661530 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