OpenCL kernel implementation v0.4