Skip to main content
Version: Nightly

int

Implements the Int class.

These are Mojo built-ins, so you don't need to import them.

comptime values

SIMDSize

comptime SIMDSize = Int

The size of a SIMD type. This will be distinct from the Int type in the future and should be used as parameter types when inferring parameter values from the width of a simd argument.

Structs

  • Int: This type represents an integer value.

Traits

  • Indexer: The Indexer trait is used for types that can index into a collection or pointer. The type returned is the underlying __mlir_type.index, enabling types like SIMD to not have to be converted to an Int first.
  • Intable: The Intable trait describes a type that can be converted to an Int.
  • IntableRaising: The IntableRaising trait describes a type can be converted to an Int, but the conversion might raise an error.

Functions

  • index: Returns the value of __mlir_index__ for the given value.