For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
ballot
ballot[dtype: DType](value: Bool) -> Scalar[dtype]
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:
Scalar[dtype]: A bitfield(Int32 or Int64) containing the result of its Bool argument in all active lanes.