Mojo function
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:
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:
A new layout representing the hierarchical division.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!