E.V.E
v2023.02.15
Loading...
Searching...
No Matches

Detailed Description

Stops an algorithm from aligning its accesses.

Variables

constexpr auto eve::algo::no_aligning = ::rbr::flag( no_aligning_tag{} )

Variable Documentation

◆ no_aligning

auto eve::algo::no_aligning = ::rbr::flag( no_aligning_tag{} )
inlineconstexpr
Header file #include <eve/module/algo.hpp>
namespace eve::algo
{
inline constexpr auto no_aligning = eve_implementation_defined;
}
constexpr auto no_aligning
Definition traits.hpp:465

Disables the alignment of memory accesses. By default a partial first register is read so that every following register is at an aligned address, and the loads are faster. With the trait the loop is started at the first element and the accesses are not aligned, which is cheaper on a short range, where the partial register is not repaid.

std::vector<float> data(24);
// A range this short does not repay the partial first register an aligned loop reads.
auto found = find_if[no_aligning](data, [](auto x) { return x > 0.f; });
constexpr auto find_if
SIMD version of std::find_if.
Definition find.hpp:130
See also
divisible_by_cardinal, expensive_callable