Mojo function
ballot
ballot[dtype: DType](value: Bool) -> SIMD[dtype, 1]
Returns a bitfield(Int32 or Int64) containing the result of its Bool argument in all active lanes, and zero in all inactive lanes. For example, ballot(True) returns EXEC mask.
Parameters:
- dtype (
DType
): The DType of the return type.
Args:
- value (
Bool
): The value to place across the mask.
Returns:
A bitfield(Int32 or Int64) containing the result of its Bool argument in all active lanes.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!