Although both options are the same in terms of performance, you should consider that the former is not recommended.
Returning the thread inside the kernel may lead to unexpected behavior in the rest of your code.
, , . , if / else, , , , .
CUDA , 5, :
__syncthreads() . CUDA , __syncthreads(), __syncthreads()
, . / : __syncthreads() ?
, , , . ,