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))