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>2019-12-11 09:10:31 +0100
commitc17d0a691fa671c7c0d8fa1ea3696d4f834af9d2 (patch)
tree3c4c1697f18d87272611ccf98246ecb32c27f9c5
parent2050ab68d94ef7fd2befd3e83bffa4e4cf1ca4a4 (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 8d31c8a..1f9df50 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