Mojo function
make_layout
make_layout[l1: Layout, l2: Layout, /, *, linear_idx_type: DType = DType.uint64](a: RuntimeLayout[l1, element_type=element_type, linear_idx_type=linear_idx_type], b: RuntimeLayout[l2, element_type=element_type, linear_idx_type=linear_idx_type]) -> RuntimeLayout[make_layout(l1, l2), element_type=element_type, linear_idx_type=linear_idx_type]
Combine two runtime layouts into a single composite layout.
This creates a new layout by concatenating the dimensions and strides of the input layouts.
Parameters:
- l1 (
Layout): The static layout type ofa. - l2 (
Layout): The static layout type ofb. - linear_idx_type (
DType): The integer type of the all index calculated by the returned runtime layout.
Args:
- a (
RuntimeLayout): The firstRuntimeLayoutto combine. - b (
RuntimeLayout): The secondRuntimeLayoutto combine.
Returns:
RuntimeLayout: A new RuntimeLayout with dimensions from both input layouts.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!