Skip to main content

Mojo function

eval_composed

eval_composed[composed_layout: ComposedLayout[composed_layout.offset]](idx: Int, offset: Int = 0) -> Int

Evaluate a composed layout with swizzle.

Applies the base layout, adds an optional offset, and then applies the swizzle.

Parameters:

  • โ€‹composed_layout (ComposedLayout): The composed layout to evaluate.

Args:

  • โ€‹idx (Int): The input index to transform.
  • โ€‹offset (Int): Optional offset to apply between layouts (default: 0).

Returns:

Int: The transformed index after applying both layouts.

Was this page helpful?