Reputation: 6753
Please see below code:
thrust::device_vector<int>::iterator whereToBegin = copyListOfNgramCounteachdoc.begin();
end = thrust::unique_by_key(end.first, end.first + numUniqueNgrams,end.second);
thrust::device_vector<int>::iterator end1 = end.first;
thrust::device_vector<int>::iterator iter;
for(iter = whereToBegin; iter!=end1; iter++){
//PRINT VALUE POINTED AT BY ITERATOR
}
The question is really simple. How do i print the value that iter
points at.
Upvotes: 0
Views: 633
Reputation: 37965
In your host code:
std::cout << *iter << std::endl;
Just like standard containers.
Upvotes: 3