while loop {
if condition then compute;
else exit();
...
__syncthreads( );
}
Is there a way in Cuda C to dismiss a thread so that __syncthreads (or another appropriate function) won't be waiting for it ? Thanks.
As far a I know there is no way to "exit" from a thread in Cuda.
By the way, in the pseudo-code that you posted isn't really needed to exit from the kill the thread, in fact if you rewrite it as in:
while loop {
if(condition) {
compute;
}
__syncthreads();
}
should work just fine.