From 3df34e3ff0c86bf3c9a17a7dd62fcf73d8594477 Mon Sep 17 00:00:00 2001 From: sbosse Date: Fri, 29 Nov 2024 16:32:19 +0100 Subject: [PATCH] Fri 29 Nov 2024 04:30:50 PM CET --- src/SimNDT/run_setup/checkOpenCL.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/SimNDT/run_setup/checkOpenCL.py diff --git a/src/SimNDT/run_setup/checkOpenCL.py b/src/SimNDT/run_setup/checkOpenCL.py new file mode 100644 index 0000000..c5751b7 --- /dev/null +++ b/src/SimNDT/run_setup/checkOpenCL.py @@ -0,0 +1,18 @@ +__author__ = 'Miguel Molero' + +from PySide.QtGui import * + +global ErrorImportCL +try: + import pyopencl as cl + + ErrorImportCL = False +except ImportError: + ErrorImportCL = True + + +def isOpenCL(openclIcon, openclLabel): + global ErrorImportCL + if not ErrorImportCL: + openclIcon.setToolTip(("OpenCL actived")) + openclLabel.setPixmap(QPixmap(":/circle_green.png").scaled(10, 10))