Mojo struct
TileCoordinates
struct TileCoordinates
Helper struct for managing tile coordinate offsets.
This struct encapsulates corner and split coordinates used in epilogue processing and provides a clean interface for coordinate transformations.
Fieldsβ
- βcorner (
IndexList[2]): - βsplit (
IndexList[2]):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TrivialRegisterPassable
Methodsβ
__init__β
__init__(corner: IndexList[2], split: IndexList[2]) -> Self
Initialize tile coordinates.
Args:
- βcorner (
IndexList[2]): Corner coordinates offset. - βsplit (
IndexList[2]): Split coordinates offset.
adjustβ
adjust(self, base_coords: IndexList[2]) -> IndexList[2]
Add corner and split offsets to base coordinates.
Args:
- βbase_coords (
IndexList[2]): Base tile coordinates.
Returns:
IndexList[2]: Adjusted coordinates with corner and split offsets applied.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!