By default unrolls by 4 and aligned all memory accesses.
namespace eve::algo
{
template<relaxed_range Rng, typename Less>
auto min_element(Rng&& rng, Less less) -> unaligned_iterator_t<Rng>;
template<relaxed_range Rng>
auto min_element(Rng&& rng) -> unaligned_iterator_t<Rng>;
}
constexpr auto min_element
SIMD version of std::min_element
Definition: min_element.hpp:92
iterator to min element (end if the range is empty).
#include <eve/module/core.hpp>
#include <eve/algo.hpp>
#include <tts/tts.hpp>
#include <vector>
int main()
{
std::vector<int> v{ 2, -1, 4, -1, 0 };
std::cout << " -> v = "
<< tts::as_string(v)
<< "\n";
std::cout << " -> eve::algo::min_value(v) = "
std::cout << " -> eve::algo::min_element(v) - v.begin() = "
std::cout << " -> eve::algo::min_value(v, eve::is_greater) = "
std::cout << " -> eve::algo::min_value(v, eve::is_greater) - v.begin() = "
}
constexpr auto min_value
SIMD algorithm that returns minimum value in the range.
Definition: min_value.hpp:100
constexpr callable_is_greater_ is_greater
Returns a logical true if and only if the element value of the first parameter is greater than the se...
Definition: is_greater.hpp:80