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: Nightly
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).

coord_to_int_tuple

coord_to_int_tuple[element_types: TypeList[element_types.values], //](value: Coord[element_types]) -> IntTuple

Convert a Coord to an IntTuple, preserving the nested structure.

This function recursively traverses the Coord and converts each element:

  • Value elements (ComptimeInt, RuntimeInt) become integer values in the IntTuple
  • Tuple elements (nested Coord) become nested IntTuples

Parameters:

Args:

Returns:

IntTuple: An IntTuple with the same structure and values as the input Coord.

coord_to_int_tuple[*element_types: CoordLike]() -> IntTuple

Convert a Coord to an IntTuple, preserving the nested structure.

This function recursively traverses the Coord and converts each element:

  • Value elements (ComptimeInt, RuntimeInt) become integer values in the IntTuple
  • Tuple elements (nested Coord) become nested IntTuples

Parameters:

  • *element_types (CoordLike): The list of element types in the Coord.

Returns:

IntTuple: An IntTuple with the same structure and values as the input Coord.