Path Divergence

Yes, you’re right. _any should be used instead of _all. However, after thinking more about this, I think it’s still not guaranteed that __syncthread is reached by all threads. It’d be reached by all threads within a warp, but not within a block. I’m not sure if that’s going to be a problem (in the programming guide, it’s said that __syncthread must be reached by all threads in a block).