A set of useful functions implemented in OpenCL