Mojo function
coord
coord[dtype: DType, *element_types: Movable](var values: Tuple[element_types]) -> Coord[#kgen.variadic.splat(RuntimeInt[dtype], Tuple.__len__()._mlir_value)] where #kgen.variadic.reduce(element_types, base=False, reducer=[PrevV: Variadic[Bool], VA: Variadic[AnyType], idx: __mlir_type.index] PrevV[0] if PrevV[0] else (idx == 0) if _type_is_eq_parse_time[VA[idx], Int]()._mlir_value else _type_is_eq_parse_time[VA[idx], Int]())[0]
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:
- βvalues (
Tuple): The runtime integer values.
Returns:
Coord: A Coord instance containing RuntimeInt elements for each value.
coord[*values: Int]() -> Coord[#kgen.variadic.reduce(values, base=, reducer=[PrevV: Variadic[CoordLike], VA: Variadic[Int], idx: __mlir_type.index] #kgen.variadic.concat(PrevV, ComptimeInt[VA[idx]]))]
Create a Coord from compile-time integer values.
Parameters:
- β*values (
Int): The compile-time integer values.
Returns:
Coord: A Coord instance containing ComptimeInt elements for each value.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!