Generic OpenCL Implementation