|
inlineconstexpr |
#include <eve/module/algo/algo/min_element.hpp>
eve::is_less
defined for your type is total order. (this comes up when switching min with max)Alternative Header
less
is eve::is_less
Parameters
rng
: Relaxed input range to processless
: SIMD strict weak ordering.Return value
iterator to min element (end if the range is empty).
min_value
max_element
eve::algo::min_value
.Can be one of two algorithms: one pass and two pass (default).
Two pass finds a value and then does a linear search for the value. This proves to be faster on smaller simpler arrays. By default unrolls by 4 and aligned all memory accesses.
The one pass version keeps track of index and is better suited for complicated predicates. You can opt in by using single_pass
or expensive_callable
traits. The single_pass
opt-in will be aligning all data accesses