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-12-01 11:06:15 +0100
commit50a834891b22cde6f609a6c987e7024de1a1ad2f (patch)
treee287f0c71f07ed6aba1ea3451cf57b5d9f633e57
parent1f4e11b6a762f294479f45270ae6698f03819828 (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