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).
logical_divide
logical_divide(layout_a: Layout, _layout_b: Layout) -> Layout
Divides a layout into blocks according to another layout.
This function creates a hierarchical layout by dividing the first layout according to the second layout. It's useful for creating blocked or tiled representations of tensors.
Args:
- layout_a (
Layout): The layout to be divided. - _layout_b (
Layout): The layout defining the division pattern.
Returns:
Layout: A new layout representing the hierarchical division.
logical_divide(layout_a: Layout, tiler: List[Layout]) -> Layout
Divides a layout into blocks according to a list of layouts.
This is a variant of logical_divide that works with a list of layouts for more complex tiling patterns.
Args:
- layout_a (
Layout): The layout to be divided. - tiler (
List[Layout]): A list of layouts defining the division patterns.
Returns:
Layout: A new layout representing the hierarchical division.