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

coord

coord[dtype: DType, *element_types: Movable](var values: Tuple[element_types]) -> Coord[*#kgen.param_list.tabulate(Tuple.__len__(), [idx: __mlir_type.index] RuntimeInt[dtype])] where TypeList.all_satisfies[comptime[Type: AnyType] _type_is_eq_parse_time[Int, Type]()]()

Create a Coord from a tuple of integers with specified dtype.

Parameters:

  • dtype (DType): The data type for the runtime integer values.
  • *element_types (Movable): The types of elements in the input tuple.

Args:

Returns:

Coord[*#kgen.param_list.tabulate(Tuple.__len__(), [idx: __mlir_type.index] RuntimeInt[dtype])]: A Coord instance containing RuntimeInt elements for each value.

coord[*values: Int]() -> Coord[*#kgen.param_list.tabulate(ParameterList[values.values], [idx: __mlir_type.index] ComptimeInt[values.values[idx]])]

Create a Coord from compile-time integer values.

Parameters:

  • *values (Int): The compile-time integer values.

Returns:

Coord[*#kgen.param_list.tabulate(ParameterList[values.values], [idx: __mlir_type.index] ComptimeInt[values.values[idx]])]: A Coord instance containing ComptimeInt elements for each value.