diff options
author | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2017-08-11 10:15:26 +0200 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@debian.org> | 2018-01-21 09:32:38 +0100 |
commit | bf5dafcd79addfc4f9cb2a1f8f32dcfec766e3cc (patch) | |
tree | 79dce4a8af00a2f70c21d874bd16e5f09a3a0dc3 | |
parent | be91f473272426fcbf972e88b6106aa6eec732b3 (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 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 |