Portable OpenCL implementation
