diff options
author | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2017-08-11 10:15:26 +0200 |
---|---|---|
committer | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2018-12-17 13:25:52 +0100 |
commit | a38311784184bdabde32e6b2d58ca092e8ae42cd (patch) | |
tree | f161517306552d3b5c386323d59fd2c07a18a297 | |
parent | d5e042bf71474ffe638e9aefd907c20df6587e9a (diff) |
fix unit test
Gbp-Pq: Name 0003-fix-unit-test.patch
-rw-r--r-- | silx/opencl/common.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/silx/opencl/common.py b/silx/opencl/common.py index 9a04035..17c67d1 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 |