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

row_stride

def row_stride[dtype: DType, //, alignment: Int](t: TileTensor[dtype, Engine=t.Engine, address_space=t.address_space, linear_idx_type=t.linear_idx_type], name: StaticString) -> Int

Returns the row stride of a matrix whose rows are contiguous.

Parameters:

  • ​dtype (DType): The element type.
  • ​alignment (Int): The byte alignment every row must start at.

Args:

Returns:

Int: The distance between rows, in elements.

Raises:

If a row is not contiguous or does not start at alignment bytes.

Was this page helpful?