Annotate thrust::for_each and thrust::for_each_n as __host__ __device__ functions.