simndt2/src/SimNDT/gui/checkOpenCL.py

19 lines
406 B
Python

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