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).
pcchen
21
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Shared mem atomics Repeat topic | 47 | 9515 | December 1, 2009 | |
| order of execution in a divergent warp | 27 | 5155 | January 17, 2012 | |
| Syncthreads and Stalling Kernels | 16 | 4316 | August 26, 2010 | |
| global to shared mem loads and sync | 26 | 12095 | February 21, 2008 | |
| Branch Divergence Serialization (Threads/hardware stalls ?) Performance Impact ? Branch divergence s | 3 | 1855 | June 15, 2011 | |
| how to avoid race condition? | 7 | 5796 | October 23, 2009 | |
| __syncthreads and shared memory | 21 | 4961 | June 15, 2011 | |
| Global thread barrier | 78 | 87626 | December 23, 2011 | |
| Back to SIMD | 21 | 1068 | November 12, 2024 | |
| How is this kernel locking with __syncthreads()? | 2 | 661 | April 23, 2018 |