Skip to main content
Log in

Mojo function

simdwidthof

simdwidthof[type: AnyTrivialRegType, target: target = current_target()]() -> IntLiteral

Returns the vector size of the type on the host system.

Parameters:

  • type (AnyTrivialRegType): The type in question.
  • target (target): The target architecture.

Returns:

The vector size of the type on the host system.

simdwidthof[type: DType, target: target = current_target()]() -> IntLiteral

Returns the vector size of the type on the host system.

Parameters:

  • type (DType): The DType in question.
  • target (target): The target architecture.

Returns:

The vector size of the dtype on the host system.