Skip to main content
Log in

Mojo function

eval_composed

eval_composed[composed_layout: ComposedLayout[Layout, Swizzle]](idx: UInt, offset: UInt = UInt(0)) -> UInt

Evaluate a composed layout with swizzle.

Evaluates a ComposedLayout[Layout, Swizzle]. Applies the base layout, adds an optional offset, and then applies the swizzle.

Parameters:

  • composed_layout (ComposedLayout[Layout, Swizzle]): The composed layout to evaluate, consisting of a base Layout and a Swizzle transformation.

Args:

  • idx (UInt): The input index to transform.
  • offset (UInt): Optional offset to apply between layouts (default: 0).

Returns:

The transformed index after applying both layouts.