Mojo function
vote
vote[ret_type: DType](val: Bool) -> Scalar[ret_type]
Creates a 32 or 64 bit mask among all threads in the warp, where each bit is set to 1 if the corresponding thread voted True, and 0 otherwise.
This function takes a boolean value which represents the cooresponding threads vote.
Nvidia only supports 32 bit masks, while AMD supports 32 and 64 bit masks.
Args:
- val (
Bool
): The boolean vote.
Returns:
Scalar
: A mask containing the vote of all threads in the warp.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!