Fix some typos that were only visible in sm_35 code.
Make thrust::cuda::par visible in __device__ code.
Make thrust::for_each callable from __device__ code.