This function is important for anyone who is launching a
kernel many times (example: from a for
loop). This is because a CUDA kernel launch is asynchronous, and
returns immediately. This means that your CPU side for loop will finish in an instant and try to launch everything at once.
Calling
cudaThreadSynchronize() will make the CPU wait till all previously launched
kernels terminate.
그래픽스(Graphics)/CUDA
cudaThreadSynchronize
3DMP
2012. 10. 27. 13:43
http://gpuray.blogspot.com/2009/06/cudathreadsynchronize.html
THURSDAY, JUNE 25, 2009
대강 정리하면.. CPU가 GPU 의 커널이 모두 처리 될때까지 CPU 를 기다리게 한다는것 =>
CPU 와 GPU 같의 동기화를 수행한다
반응형
No comments:
Post a Comment