◆ compare_not_equal()

bool boost::simd::compare_not_equal ( Value const &  x,
Value const &  y 
)

This function object returns true if and only if two corresponding entries elements are not equal.

It is probably not what you wish. Have a look to is_not_equal

Header <boost/simd/function/compare_not_equal.hpp>
Example:
#include <boost/simd/pack.hpp>
#include <boost/simd/reduction.hpp>
#include <iostream>
namespace bs = boost::simd;
using pack_it = bs::pack<std::int32_t, 4>;
int main() {
pack_it pi = {1, 2, 5, 2};
pack_it qi = {0, 1, 2, 8};
std::cout << "---- simd" << '\n'
<< "<- pi = " << pi << '\n'
<< "<- qi = " << qi << '\n'
<< "-> bs::compare_not_equal(pi, pi) = "
<< bs::compare_not_equal(pi, pi) << '\n'
<< "-> bs::compare_not_equal(pi, qi) = "
<< bs::compare_not_equal(pi, qi) << '\n';
return 0;
}
Possible output:
---- simd
<- pi = (1, 2, 5, 2)
<- qi = (0, 1, 2, 8)
-> bs::compare_not_equal(pi, pi) = 0
-> bs::compare_not_equal(pi, qi) = 1