tilus.ir.layout.flatten¶
- tilus.ir.layout.flatten(layout, start_dim=0, end_dim=-1)[source]¶
Flatten the layout over the dimensions between start_dim and end_dim, inclusive.
- Parameters:
layout (RegisterLayout) – The layout to flatten.
start_dim (int) – The start dimension to flatten over. The dimension is inclusive.
end_dim (int) – The end dimension to flatten over. The dimension is inclusive. If end_dim is -1, it will be set to the last dimension of the layout.
- Returns:
ret – The flattened layout.
- Return type: