added utility functions for opencl kernel generation