Mojo function
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:
True if the layout has row-major ordering for the specified rank, False otherwise.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!