Deeploy.TilingExtension.TilingCodegen.calculateFlatOffsetInBytes
- Deeploy.TilingExtension.TilingCodegen.calculateFlatOffsetInBytes(tile: HyperRectangle, referenceBuffer: VariableBuffer) int
Calculate the flat memory offset in bytes for a hyperrectangle tile.
Computes the byte offset in memory for the starting position of a hyperrectangle tile within a reference buffer. This accounts for both the multi-dimensional positioning and the data type size.
- Parameters:
tile (HyperRectangle) – The hyperrectangle tile whose offset should be calculated.
referenceBuffer (VariableBuffer) – The reference buffer containing the tile, used for shape and type info.
- Returns:
The flat memory offset in bytes from the buffer start to the tile start.
- Return type:
int
Notes
The calculation combines multi-dimensional offset computation with data type width to produce a byte-level memory offset.