I am new to using Thrust, and there is one thing that I do not understand. Is Thrust asynchronous or synchronous?
If I write the following code, there will be no time 0. But in other tags, other users report the result 0. What is the truth?
clock_t start,end;
start=clock();
thrust::sort_by_key(vettore.begin(), vettore.end(), counter.begin());
end=clock();
double time=((double)(end-start))/CLOCKS_PER_SEC;
cout<<"execution time"<<time<<endl;
source
share