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

is_row_major

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

Was this page helpful?