cuda util functions reordered