aligned_offset
Represent an integer based offset whose
value is a multiple of an IndexAlignment specified at compile time.
#include
<sdlt/aligned_offset.h>
Syntax
template<int IndexAlignmentT> class aligned_offset;
Arguments
- int IndexAlignmentT
- The index alignment the user is stating that the offset have.
Description
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.
Member
| Description
|
---|---|
| 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
|