Port launch_closure to work in __host__ or __device__ code.