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>2018-07-31 16:24:57 +0200
commit84af43affc1a257fd14a73ea101d7ef362237455 (patch)
tree5cb4417e8d8d4272b45128c69339b55af7d47a9d
parent38e34cddc323084e6bfc4979ba79bd4502989a40 (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 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