◆ compare_greater()

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

This function object returns the return a bool that is the result of the lexicographic test for > on all elements of the entries.

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

Header <boost/simd/function/compare_greater.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_greater(pi, qi) = "
<< bs::compare_greater(pi, qi) << '\n';
return 0;
}
Possible output:
---- simd
<- pi = (1, 2, 5, 2)
<- qi = (0, 1, 2, 8)
-> bs::compare_greater(pi, qi) = 1