Development Reference Guides



Represent an integer based offset whose value is a multiple of an IndexAlignment specified at compile time.
#include <sdlt/aligned_offset.h>


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.
static const int IndexAlignment = IndexAlignmentT;
The alignment the offset is a multiple of
explicit aligned_offset(const int offset)
Construct instance based on offset
static aligned_offset from_block_count(int aligned_block_count);
Returns: Instance based on aligned_block_count, where the offset value = IndexAlignment*aligned_block_count
int aligned_block_count() const;
Returns: number of blocks of IndexAlignment it takes to represent the offset value.
int value() const;
Returns: offset value

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at