Fix compilation errors and opencl