namespace eve::algo
{
template <eve::algo::relaxed_range Rng, typename P>
}
unaligned_t< iterator_t< R > > unaligned_iterator_t
Unaligned iterator for a relaxed range.
Definition ranges_types.hpp:68
constexpr auto find_if
SIMD version of std::find_if.
Definition find.hpp:130
#include <eve/module/core.hpp>
#include <eve/module/algo.hpp>
#include <tts/tts.hpp>
#include <iostream>
#include <vector>
int main()
{
std::vector<int> v{12, 0, 5, -9, 3, 0, 5};
std::cout << " -> v = "
<< tts::as_string(v)
<< "\n";
std::cout << " <- eve::algo::find_if(v, eve::is_eqz) - v.begin() = " << pos - v.begin() << "\n";
std::cout << " <- eve::algo::find_if_not(v, x < 0) - v.begin() = " << posn - v.begin() << "\n";
std::cout << " <- eve::algo::find(v, 5) - v.begin() = " << pos_v - v.begin() << "\n";
return 0;
}
constexpr auto find
a version of find_if with a value to find instead of a predicate to test.
Definition find.hpp:182
constexpr auto find_if_not
a version of eve::algo::find_if where the preicate is negated
Definition find.hpp:233
constexpr auto is_eqz
elementwise callable returning a logical true if and only if the element value is zero.
Definition is_eqz.hpp:72