Suppose that I have the following code
float *raw_data;
cudaMalloc(&raw_data, 100*sizeof(float));
thrust::device_vector <float> vec(raw_data, raw_data+100);
When executing the last line, does thrust copy the memory from raw_data to that of the device_vector, or does it just set the corresponding range of the vector?
Thanks.
vec
variable is filled with data copied from pointer variableraw_data
of range 0 to 100.It is using the following constructor to initialize the variable vec.