IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: 1.0
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).

coalesce_nested_tuple

coalesce_nested_tuple[t: IntTuple, out_t: IntTuple = _int_tuple_product_flatten[t]()](tuple: RuntimeTuple[t, element_type=tuple.element_type]) -> RuntimeTuple[out_t]

Coalesces a nested RuntimeTuple into a single-level RuntimeTuple, by multiplying all the values together.

Parameters:

  • t (IntTuple): The underlying Compile-time IntTuple backing the RuntimeTuple.
  • out_t (IntTuple): The flattened Compile-time IntTuple.

Args:

Returns:

RuntimeTuple[out_t]: A new IntTuple containing the products of each top level tuple, in a flat structure.