|
inlineconstexpr |
#include <eve/module/algo/algo/min_value.hpp>
C++ standard only has std::min_element
that returns iterator to the minimum element. We have that too (see: eve::algo::min_element
) but it's slower then just getting the value. So we also provide min_value
for when you don't care about the position. By default unrolls by 4 and aligned all memory accesses.
eve::is_less
defined for your type is total order. (this comes up when switching min
with max
)Alternative Header
eve::is_less
Parameters
rng
: Relaxed input range to processless
: SIMD strict weak ordering.Return value
minimum value from the range. If the input range was empty, it's std::nullopt
.
max_value
min_element