For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
make_layout
def make_layout[l1: Layout, l2: Layout, /, *, linear_idx_type: DType = DType.uint64](a: RuntimeLayout[l1, element_type=a.element_type, linear_idx_type=a.linear_idx_type], b: RuntimeLayout[l2, element_type=b.element_type, linear_idx_type=b.linear_idx_type]) -> RuntimeLayout[make_layout(l1, l2), element_type=b.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[l1, element_type=a.element_type, linear_idx_type=a.linear_idx_type]): The firstRuntimeLayoutto combine. - βb (
RuntimeLayout[l2, element_type=b.element_type, linear_idx_type=b.linear_idx_type]): The secondRuntimeLayoutto combine.
Returns:
RuntimeLayout[make_layout(l1, l2), element_type=b.element_type, linear_idx_type=linear_idx_type]: A new RuntimeLayout with dimensions from both input layouts.