Infer the directionality of trivial_copy_n dynamically
Infer the directionality of trivial_copy_n dynamically

Because the user may have explicitly passed an execution policy such as thrust::cuda::par.on(stream), trivial_copy_n could be cross-space. Dynamically infer the directionality of the copy using cudaMemcpyDefault.

Fixes #651

raygit/thrust,egaburov/thrust,sdalton1/thrust,thrust/thrust,xiongzhanblake/thrust,dachziegel/thrust,zeryx/thrust,sarvex/thrust,thvasilo/thrust,mohamed-ali/thrust,egaburov/thrust,mohamed-ali/thrust,arnabgho/thrust,marksantos/thrust,Ricardo666666/thrust,Ricardo666666/thrust,egaburov/thrust,dachziegel/thrust,andrewcorrigan/thrust-multi-permutation-iterator,xiongzhanblake/thrust_src,arnabgho/thrust,GrimDerp/thrust,arnabgho/thrust,thrust/thrust,raygit/thrust,thrust/thrust,GrimDerp/thrust,andrewcorrigan/thrust-multi-permutation-iterator,sarvex/thrust,zhenglaizhang/thrust,xiongzhanblake/thrust_src,Ricardo666666/thrust,sdalton1/thrust,sarvex/thrust,xiongzhanblake/thrust,jaredhoberock/thrust,zeryx/thrust,zhenglaizhang/thrust,jaredhoberock/thrust,thrust/thrust,zeryx/thrust,thvasilo/thrust,zhenglaizhang/thrust,raygit/thrust,jaredhoberock/thrust,dachziegel/thrust,xiongzhanblake/thrust_src,jaredhoberock/thrust,jaredhoberock/thrust,thvasilo/thrust,sdalton1/thrust,xiongzhanblake/thrust,marksantos/thrust,thrust/thrust,mohamed-ali/thrust,andrewcorrigan/thrust-multi-permutation-iterator,marksantos/thrust,GrimDerp/thrust