E.V.E  0.1-beta

◆ bit_not

eve::bit_not = {}
inlineconstexpr

Callable object computing the ones' complement operation.

Required header: #include <eve/function/bit_not.hpp>

Members Functions

Member Effect
operator() the ones' complement operation
operator[] Construct a conditional version of current function object

auto operator()(value auto x) const noexcept;
Definition: value.hpp:31

Parameters

x: real value.

Return value

Computes the bitwise NOT of the parameter


auto operator[]( conditional_expression auto cond ) const noexcept;

Higher-order function generating a masked version of eve::bit_not

Parameters

cond : conditional expression

Return value

A Callable object so that the expression bit_not[cond](x, ...) is equivalent to if_else(cond,bit_not(x, ...),x)


Supported decorators

no decorators are supported

Example

See it live on Compiler Explorer

#include <eve/function/bit_not.hpp>
#include <eve/constant/inf.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_it pi = {14, 1, 3, 0};
std::cout << "---- simd" << '\n'
<< "<- pi = " << pi << '\n'
<< "-> bit_not(pi) = " << eve::bit_not(pi) << '\n';
std::uint32_t xf = 48;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> bit_not(xf) = " << eve::bit_not(xf) << '\n';
return 0;
}
constexpr callable_bit_not_ bit_not
Callable object computing the ones' complement operation.
Definition: bit_not.hpp:73
constexpr callable_pi_ pi
Callable object computing the value.
Definition: pi.hpp:54
Wrapper for SIMD registers.
Definition: wide.hpp:65