E.V.E
v2023.02.15
Loading...
Searching...
No Matches
eve::algo::traits< Settings > Struct Template Reference

Detailed Description

template<typename Settings>
struct eve::algo::traits< Settings >

Compile time set of tuning parameters an algorithm accepts.

Header file #include <eve/module/algo.hpp>
namespace eve::algo
{
template<typename Settings>
struct traits : Settings
{
template<rbr::concepts::option... Options>
constexpr explicit traits(Options&&... options);
template<typename... Options>
constexpr traits(rbr::settings<Options...> const& options);
};
}
constexpr traits(Options &&... options)
Builds a set from the traits named one by one.
Definition traits.hpp:114
Wrapper class around bundle of options passed to eve::callable.
Definition supports.hpp:44
Template Parameters
SettingsDeduced keyword settings, never spelled by hand.

Every algorithm carries a default set and accepts traits between brackets. Naming them one at a time builds the set as the call is written:

auto consider_types
Definition traits.hpp:256
constexpr auto expensive_callable
Definition traits.hpp:538
constexpr auto find_if
SIMD version of std::find_if.
Definition find.hpp:130

A set gathers several traits in a single pair of brackets, which several calls can share:

find_if[tr](r, p);
find_if[tr](q, p);

Traits a call passes override the algorithm's defaults. Those it leaves out keep their default value.

See also
Algorithm Traits to read a set from inside an algorithm.

Public Member Functions

template<rbr::concepts::option... Options>
constexpr traits (Options &&... options)
 Builds a set from the traits named one by one.
template<typename... Options>
constexpr traits (rbr::settings< Options... > const &options)
 Builds a set from an existing keyword settings object.