How to control warps?

Hi all,

I'm confused by how to control threads in a warp. I want to determine whether values of thread register in a warp are all less than a value, say 1.0e-20. How to code this if atomic operations are avoided?

Thanks in advance!

Hi,
you may want to take a look at warp voting functions.

__all_sync(unsigned mask, predicate):
    Evaluate predicate for all non-exited threads in mask and return non-zero if and only if predicate evaluates to non-zero for all of them.

Thanks for your help! It works!!