fixed_offset

Represent an integer based offset whose value specified at compile time. #include <sdlt/fixed_offset.h>

Syntax

template <int OffsetT> fixed_offset;

Arguments

int OffsetT

The value the fixed_offset will represent

Description

fixed_offset is a deprecated feature.

If we can tell the compiler that we know an offset at compile time, then when combined with a loop index inside a SIMD loop, the compiler can use that information to maintain aligned access (should the offset be aligned) when accessing underlying data layout. When multiple accesses are happening near each other, the compiler will have the opportunity to detect which accesses occur in the same cache lines and potentially avoid prefetching the same cache line repeatedly. Whenever possible, a fixed_offset should be used over an aligned_offset or integer based offset.

Member

Description

static constexpr int value = OffsetT

The offset value known at compile

Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.