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

Detailed Description

Lets an algorithm use the widest registers, despite frequency scaling.

Variables

constexpr auto eve::algo::allow_frequency_scaling = ::rbr::flag( allow_frequency_scaling_tag{} )

Variable Documentation

◆ allow_frequency_scaling

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

Allows the algorithm to use the widest registers of the target. By default the cardinal stays clear of 512 bit registers, because some Intel cores lower their clock while AVX-512 instructions run and for a while after, which slows the scalar code that follows. With this trait the algorithm takes the full width, which is worth it on a long range only. The Frequency Scaling. tutorial measures the effect.

std::vector<float> data(1 << 20);
// A range this long amortises the clock drop, so the 512 bit registers win.
auto found = find_if[allow_frequency_scaling](data, [](auto x) { return x < 0.f; });
constexpr auto find_if
SIMD version of std::find_if.
Definition find.hpp:130

External references

See also
force_cardinal