◆ find_if_not()

template<typename T , typename Pred >
T const* boost::simd::find_if_not ( T const *  first,
T const *  last,
Pred const &  pred 
)

Returns an iterator to the first element in the range [first,last) for which pred returns false.

If no such element is found, the function returns last.

Parameters
firstBeginning of the range of elements
lastEnd of the range of elements
predPredicate to apply to each element in the range.
Requirement
Example:
#include <boost/simd/algorithm/find_if_not.hpp>
#include <boost/simd/function/is_gez.hpp>
#include <boost/simd/function/is_lez.hpp>
#include <iostream>
#include <vector>
int main()
{
namespace bs = boost::simd;
std::vector<float> d{ 0.0f, 2.0f, 0.0f, 0.0f, -1.0f, 2.0f, 0.0f};
auto r1 = bs::find_if_not( d.data(), d.data()+7, bs::is_gez );
std::cout << "r1 " << r1 << " *r1 " << *r1 << "\n";
auto r2 = bs::find_if_not( d.data(), d.data()+7, bs::is_lez );
std::cout << "r2 " << r2 << " *r2 " << *r2 << "\n";
return 0;
}
possible output:
r1 0x1510c30 *r1 -1
r2 0x1510c24 *r2 2