Utility functions for OpenCL.