From 8f255b0b9b3aa69581f216d8e7ba2d9a51afd19e Mon Sep 17 00:00:00 2001 From: sbosse Date: Wed, 28 Aug 2024 21:39:54 +0200 Subject: [PATCH] Wed 28 Aug 21:38:52 CEST 2024 --- src/SimNDT/gui/checkOpenCL.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/SimNDT/gui/checkOpenCL.py diff --git a/src/SimNDT/gui/checkOpenCL.py b/src/SimNDT/gui/checkOpenCL.py new file mode 100644 index 0000000..c5751b7 --- /dev/null +++ b/src/SimNDT/gui/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))