thrust::copy doesn't work for device_vectors [duplicate]
问题 This question already has an answer here : cuda thrust::remove_if throws “thrust::system::system_error” for device_vector? (1 answer) Closed 3 years ago . I copied this code from the Thrust documentation: #include <thrust/copy.h> #include <thrust/device_vector.h> #include <thrust/host_vector.h> int main() { thrust::device_vector<int> vec0(100); thrust::device_vector<int> vec1(100); thrust::copy(vec0.begin(), vec0.end(), vec1.begin()); return 0; } When I run this in Debug mode (VS2012), my