I am wondering if this code might pose a possible deadlock:
__global__ void
compute(...)
{
// do some computation for val
if( val > threshold )
return;
__syncthreads();
// do some computation with val & store it
return;
}
So does __syncthreads() try to wait for terminated threads or did I just get lucky with my if branch never executing?