http://developer.download.nvidia.com/CUDA/training/introductiontothrust.pdf
// list container on host
std::list<int> h_list;
h_list.push_back(13);
h_list.push_back(27);
// copy list to device vector
thrust::device_vector<int> d_vec(h_list.size());
thrust::copy(h_list.begin(), h_list.end(), d_vec.begin());
// alternative method
thrust::device_vector<int> d_vec(h_list.begin(), h_list.end());
No comments:
Post a Comment