summaryrefslogtreecommitdiff
path: root/debian/patches/0006-Tests-if-openCL-can-be-used.patch
blob: 499ee78b86fd343500914c1260e8e5cca77d0ea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Alexandre Marie <alexandre.marie@synchrotron-soleil.fr>
Date: Fri, 5 Jul 2019 16:52:20 +0200
Subject: Tests if openCL can be used

---
 silx/opencl/common.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/silx/opencl/common.py b/silx/opencl/common.py
index 002c15d..e1409f2 100644
--- a/silx/opencl/common.py
+++ b/silx/opencl/common.py
@@ -74,6 +74,8 @@ if pyopencl is None:
         WRITE_ONLY = 1
         READ_ONLY = 1
         READ_WRITE = 1
+else:
+    mf = pyopencl.mem_flags
 
 FLOP_PER_CORE = {"GPU": 64,  # GPU, Fermi at least perform 64 flops per cycle/multicore, G80 were at 24 or 48 ...
                  "CPU": 4,  # CPU, at least intel's have 4 operation per cycle