Mojo function
is_contiguous_dim
is_contiguous_dim(layout: Layout, dim: Int) -> Bool
Checks if a flat layout is contiguous in a specific dimension.
This function checks if a flat layout is contiguous in a specified dimension, considering both positive strides and zero strides with a single element. The latter case is necessary for coalesced layouts.
Args:
Returns:
Bool: True if the layout is contiguous in the specified dimension,
False otherwise.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!