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

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:

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.