◆ isincluded()

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

This function object returns true is only if all bits set in x are also set in y.

The two arguments must share the same bit size.

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