【发布时间】:2012-06-20 09:39:06
【问题描述】:
我刚开始使用 Thrust,有一点我不明白。 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
【问题讨论】:
-
注意:NVIDIA论坛here的相关问题。