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

eval_composed

def eval_composed[composed_layout: ComposedLayout[composed_layout.offset]](idx: Int, offset: Int = 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.

Was this page helpful?