This contains code that works with all OpenCL versions.