generating proper tasking function for nvptx