【发布时间】:2013-10-12 04:11:35
【问题描述】:
__global__ void helloCUDA(float f)
{
printf("Hello thread %d, f=%f\n", threadIdx.x, f);
}
int main()
{
helloCUDA<<<1, 5>>>(1.2345f);
cudaDeviceSynchronize();
return 0;
}
为什么是 cudaDeviceSynchronize();在很多地方,例如here 内核调用后不需要?
【问题讨论】: