Thrust を使用するのは初めてで、理解できないことが 1 つあります。Thrust は非同期ですか、それとも同期ですか?
次のコードを書くと、かかった時間は0
. しかし、他のタグでは、他のユーザーが0
. 真実は何?
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;// the result is 0.327