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

is_row_major

is_row_major[rank: Int](layout: Layout) -> Bool

Checks if a layout has row-major ordering for the specified rank.

A row-major layout has strides that decrease from left to right, with the rightmost dimension having a stride of 1.

Parameters:

  • rank (Int): The expected rank of the layout.

Args:

  • layout (Layout): The layout to check.

Returns:

Bool: True if the layout has row-major ordering for the specified rank, False otherwise.