Replace call to DeviceThreadToShared with thrust::copy_n.