http://gpuray.blogspot.com/2009/06/cudathreadsynchronize.html
THURSDAY, JUNE 25, 2009
cudaThreadSynchronize
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.
Calling cudaThreadSynchronize() will make the CPU wait till all previously launched kernels terminate.
대강 정리하면.. CPU가 GPU 의 커널이 모두 처리 될때까지 CPU 를 기다리게 한다는것 =>
CPU 와 GPU 같의 동기화를 수행한다
반응형
'그래픽스(Graphics) > CUDA' 카테고리의 다른 글
CUDA 4.1 visual studio 2010 설정 (윈도우 7) (1) | 2012.10.27 |
---|---|
그래픽카드 인터페이스 - PCI 익스프레스 (0) | 2012.10.27 |
atomicAdd vs2010 에서 정의도지 않았다고 할때.. (0) | 2012.10.27 |
쿠다 변수 특성 (0) | 2012.10.27 |
CUDA Event로 시간측정 (1) | 2012.10.27 |
No comments:
Post a Comment