Added a SAFE( call) macro and fixed OpenCL on CUDA only devices