Fixed the problem. The issue was with double type with opencl. #pragma OPENCL EXTENSION cl_khr_fp64 : enable, has to be added, however details unknown. Double support to be added in the future