For instance:
thrust::device_vector<float> vec(...);
thrust::device_vector<float>::iterator i = vec.begin();
vec.resize(...); // vec may get reallocated and moved in memory here
Now, has vec.begin()
also updated and still point validly to the start of vec
?
Upon resizing, if the vector originally did not have enough space, your iterator will be invalidated, so you'd have to recall vec.begin()
to get a new, valid iterator.