Represent an integer based offset whose value is a multiple of an IndexAlignment specified at compile time.
template<int IndexAlignmentT> class aligned_offset;
- int IndexAlignmentT
- The index alignment the user is stating that the offset have.
aligned_offset is a deprecated feature.
If we can tell the compiler that we know an offset will be a multiple of known value, then when combined with a loop index inside a SIMD loop, the compiler can use that information to maintain aligned access when accessing underlying data layout.
Internally, the offset value is converted to a block count.
Block Count = offsetValue/IndexAlignmentT;
Indices can then use that aligned block count as needed.
The alignment the offset is a multiple of
Construct instance based on offset
Returns: Instance based on aligned_block_count, where the offset value = IndexAlignment*aligned_block_count
Returns: number of blocks of IndexAlignment it takes to represent the offset value.
Returns: offset value