'ballot' behavior on inactive lanes

Saturday, May 10, 2014

Warp voting functions can be invoked within a diverging branch and its effects are considered only among active threads. However, I am unsure how ballot works in that case? Are inactive threads always contributing 0? Or maybe the result is undefined?




Similar question: Do warp vote functions synchronize threads in the warp?


One answer quotes PTX ISA, which contains a sentence



In the ballot form, vote.ballot.b32 simply copies the predicate from each thread in a warp into the corresponding bit position of destination register d, where the bit position corresponds to the thread's lane id.



but it does not explain how inactive threads are treated.







http://ift.tt/Quh3JB