E.V.E
v2022.09.01

◆ bit_notand

eve::bit_notand = {}
inlineconstexpr

Computes the bitwise NOTAND of its arguments.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T, eve::value Ts... >
T bit_notand(T x, Ts... xs) noexcept;
}
Definition: value.hpp:31
constexpr callable_bit_notand_ bit_notand
Computes the bitwise NOTAND of its arguments.
Definition: bit_notand.hpp:66
Definition: all_of.hpp:22

Parameters

Return value

  • For two parameters it computes the bitwise NOTAND of the two parameters
  • For more than two parameters the call is semantically equivalent to to bit_notand(a0, bit_and(xs...))
  • The value returned is in the type of the first parameter

Example

#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
w_t pi = {3, 2, 3, 4}, qi = {4, 1, 1, ~0};
std::uint32_t z = 5;
std::cout << "---- simd" << '\n'
<< " <- pi = " << pi << '\n'
<< " <- qi = " << qi << '\n'
<< " <- z = " << z << '\n'
<< " -> bit_notand(pi, qi) = " << eve::bit_notand(pi, qi) << '\n'
<< " -> bit_notand(z, qi) = " << eve::bit_notand(z, qi) << '\n'
<< " -> bit_notand(pi, z ) = " << eve::bit_notand(pi, z) << '\n';
std::uint32_t mask = 1 >> 31;
float xi = -3.4565;
std::cout << "---- scalar" << '\n'
<< " <- xi = " << xi << '\n'
<< " <- mask = " << mask << '\n'
<< " -> bit_notand(xi, mask) = " << eve::bit_notand(xi, mask) << '\n';
return 0;
}
constexpr callable_pi_ pi
Callable object computing the constant .
Definition: pi.hpp:49
Wrapper for SIMD registers.
Definition: wide.hpp:65

Semantic Modifiers

  • Masked Call

    The call eve::bit_notand[mask](x, ...) provides a masked version of bit_notand which is equivalent to if_else(mask, bit_notand(x, ...), x)

    Example

    #include <eve/module/core.hpp>
    #include <eve/wide.hpp>
    #include <iostream>
    int main()
    {
    w_t pi = {3, 2, 3, 4}, qi = {4, 1, 1, ~0};
    std::cout << "---- simd" << '\n'
    << " <- pi = " << pi << '\n'
    << " <- qi = " << qi << '\n'
    << " -> bit_notand[pi < qi](pi, qi) = " << eve::bit_notand[pi < qi](pi, qi) << '\n';
    return 0;
    }