Proper casting of OpenCL types