Hi All,

What happend if I’m put “cudaThreadSynchronize()” before and after the kernel-lauching line?

CUDA will returning control to main programm after executing all threads?

Otherwise, I’m getting control as soon as possible?

cudaThreadSynchronize() function does not return until all previous kernel invocations have finished executing and the device is ready for another task.