elect_one_sync_with_mask
elect_one_sync_with_mask(mask: UInt32 = UInt32(4294967295)) -> Bool
Elects a single thread within a warp to perform an operation.
Note:
- Only supported on NVIDIA SM90+ GPUs.
- Maps directly to the
elect.syncinstruction in CUDA PTX. - Useful for having a single thread perform an operation while maintaining warp synchronization.
Args:
- mask (
UInt32): The mask to use for the election. Defaults to 0xFFFFFFFF.
Returns:
Bool: True for the elected thread, False for all other threads in the warp.