bool
Implements the Bool class.
These are Mojo built-ins, so you don’t need to import them.
Bool
The primitive Bool scalar value used in Mojo.
Fields:
- value (
scalar<bool>
): The underlying storage of the boolean value.
Implemented traits:
AnyType
, Boolable
, CollectionElement
, Copyable
, EqualityComparable
, Movable
, Stringable
Methods:
__init__
__init__(value: i1) -> Self
Construct a Bool value given a __mlir_type.i1 value.
Args:
- value (
i1
): The initial __mlir_type.i1 value.
Returns:
The constructed Bool value.
__init__[width: Int](value: SIMD[bool, width]) -> Self
Construct a Bool value given a SIMD value.
If there is more than a single element in the SIMD value, then value is reduced using the and operator.
Parameters:
- width (
Int
): SIMD width.
Args:
- value (
SIMD[bool, width]
): The initial SIMD v