IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

readfirstlane

def readfirstlane[T: AnyType, //](value: Pointer[T, address_space=value.address_space]) -> Pointer[T, value.origin, address_space=value.address_space]

Gets the value in the lowest active lane of the input operand.

Parameters:

  • ​T (AnyType): The type the pointer points to.

Args:

Returns:

Pointer[T, value.origin, address_space=value.address_space]: The value in the lowest active lane of the input operand.

def readfirstlane[dtype: DType](value: Scalar[dtype]) -> Scalar[dtype]

Gets the value in the lowest active lane of the input operand.

Constraints:

The scalar type must be 2, 4, or 8 bytes wide.

Parameters:

  • ​dtype (DType): The element type.

Args:

Returns:

Scalar[dtype]: The value in the lowest active lane of the input operand.

Was this page helpful?