index.scale
← index dialect
Scale a logical coordinate by a physical byte stride to produce a physical byte offset. This is the address-domain boundary for packed payload layouts: logical indices stay index values, byte strides stay offset values, and the result feeds byte-addressed buffer/view bases.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, DistributionTransfer |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
index |
index |
required |
Logical coordinate to scale. |
| Operand |
stride |
offset |
required |
Physical byte stride for one coordinate step. |
| Result |
result |
offset |
required |
— |
Examples
%bytes = index.scale %lane, %byte_stride : index, offset -> offset