some traits should just be replaced with a combination of different traits. do that replacement
returns eve::sparse or eve::dense (default is eve::dense)
removes a given key from traits if and only if the condition is true
removes a given key from traits.
returns specified if any, otherwise the default index type suggested by the library
returns expected_smaller_r if one is specificed
returns specified overflow
returns cardinal which should be used.
returns all types that should be considered for a given Traits and Range/Iterator (as a kumi::tuple)
returns extra types to consider requested by traits as a kumi::tuple
returns unrolling requested by traits (default 1)
Traits |
Traits |
Traits,RangeOrIterator |
Traits,RangeOrIterator |
Traits |
Traits |
Traits |
Traits |
Classes | |
struct | eve::algo::traits< Settings > |
A compile time set of all the tuning parameters passed to the algorithm. These allow you to fine-tune the loops and not being stuck with our defaults. More... | |
Variables | |
template<int N> | |
constexpr auto | eve::algo::unroll = (unroll_key = eve::index<N>) |
A trait that overrides how much algorithm should be unrolled. Keep in mind that by default we will unroll simple algorithms for you (see individual algorithms for default settings). So this is only useful if you want to override that default. Note that sometimes compilers can unroll loops as well, that has nothing to do with us. | |
template<int N> | |
constexpr auto | eve::algo::force_cardinal = (force_cardinal_key = eve::fixed<N>{}) |
A trait that overrides all other cardinal selection and just says to use a certain one. The main use-case for this is ease of interaction with native register code. | |
template<typename ... Ts> | |
auto | eve::algo::consider_types = ( consider_types_key = kumi::tuple<Ts...>{} ) |
A trait that tells the algorithm to take an extra type into account when selecting a cardinal. This is, for example, used by reduce algorithm to consider the sum type. | |
template<typename T > | |
auto | eve::algo::force_type = (force_type_key = std::type_identity<T>{}) |
A zip trait for converting all the types in a zip. You can get identical results with with views::convert but this is a convinience. | |
template<typename ... Ts> | |
constexpr auto | eve::algo::common_with_types = (common_with_types_key = eve::common_type<Ts...>{}) |
A zip trait for converting all the types in a zip. You can get identical results with with views::convert but this is a convinience. | |
constexpr auto | eve::algo::common_type = common_with_types<> |
============================================================================= | |
constexpr auto | eve::algo::divisible_by_cardinal = ::rbr::flag( divisible_by_cardinal_tag{} ) |
an trait to tell that the input data is strictly divisble by cardinal. | |
constexpr auto | eve::algo::no_aligning = ::rbr::flag( no_aligning_tag{} ) |
Traits for disabling alignment handling in algorithm. | |
constexpr auto | eve::algo::no_unrolling = unroll<1> |
Convinient equivalent to unroll<1>. | |
constexpr auto | eve::algo::expensive_callable = ::rbr::flag( expensive_callable_tag{} ) |
NOTE: equivalent to no_aligning + no_unrolling + single_pass By default eve algorithms will assume that the passed predicates/computation are failry simple and will unroll and align data accesses. | |
constexpr auto | eve::algo::single_pass = ::rbr::flag(single_pass_tag {}) |
Trait that changes the algorithm for min_element/max_element for index tracking. | |
constexpr auto | eve::algo::fuse_operations = ::rbr::flag( fuse_operations_tag{} ) |
Some algorithms (for example transform_reduce ) can be implemented more efficient if you fuse multiple operations provided in a single function. | |
template<int N> | |
constexpr auto | eve::algo::expect_smaller_range = (expect_smaller_range_key = eve::index<N>) |
some algorithms (for example set_intersection) have a better implementation if we know that one of the input ranges is smaller. Then you can give the library this information by passing [expect_smaller_range<idx>] (idx - base 0 index of the range that you expect to be smaller). | |
constexpr auto | eve::algo::allow_frequency_scaling = ::rbr::flag( allow_frequency_scaling_tag{} ) |
You can find more explanations in the 'frequency scaling tutorial'. On intel using 64 byte registers requires processor to scale down it's frequency. This is only benefitial if you have a very large set of data to process. Otherwise it will likely degrade performance not only of the SIMD code but also of the code that follows. | |
template<std::ptrdiff_t N> | |
constexpr auto | eve::algo::overflow = (overflow_key = eve::index<N>) |
A trait for advanced usage only as parameter for for_each_iteration_fixed_overflow. | |
template<std::unsigned_integral T> | |
constexpr auto | eve::algo::index_type = (index_type_key = std::type_identity<T>{}) |
A trait that allows to override the default index type for algorithms that require to keep track of an index. | |
constexpr auto | eve::algo::sparse_output = (density_key = eve::sparse) |
for algorithms that output data based on input (eve::algo::copy_if, eve::algo::remove_if, eve::algo::set_intersection etc), tells the algorithm to optimize for the case where there will be fairly few elements per iteration. eve::algo::dense_output is default since it's better in most cases measured. | |
constexpr auto | eve::algo::dense_output = (density_key = eve::dense) |
for algorithms that output data based on input (eve::algo::copy_if, eve::algo::remove_if, eve::algo::set_intersection etc), tells the algorithm to optimize for the case where there will be many elements per iteration. eve::algo::dense_output is default since it's better in most cases measured. | |