◆ lo()

as_integer_t<Value> boost::simd::lo ( Value const &  x)

This function object returns the low part of the entry as an unsigned integer of the size of the input.

Header <boost/simd/function/lo.hpp>
See also
hi
Header <boost/simd/function/lo.hpp>
Example:
#include <boost/simd/bitwise.hpp>
#include <boost/simd/pack.hpp>
#include <iostream>
namespace bs = boost::simd;
using iT = std::int32_t;
using pack_it = bs::pack<iT, 4>;
int main() {
pack_it pi = {1, 2, -1, 32769};
std::cout << "---- simd" << '\n'
<< "<- pi = " << pi << '\n'
<< "-> bs::lo(pi) = " << bs::lo(pi) << '\n';
iT xi = 2;
std::cout << "---- scalar" << '\n'
<< "<- xi = " << xi << '\n'
<< "-> bs::lo(xi) = " << bs::lo(xi) << '\n';
return 0;
}
Possible output:
---- simd
<- pi = (1, 2, -1, 32769)
-> bs::lo(pi) = (1, 2, 65535, 32769)
---- scalar
<- xi = 2
-> bs::lo(xi) = 2