◆ logical_notor
Callable object computing the logical NOTOR operation. Required header: Members Functions
template< value T, value U > auto operator()( T x, U y ) const noexcept requires compatible< T, U >;
Parameters
Return value Computes logical NOTOR of the two parameters following the logical operations semantic. the call Supported decoratorsno decorators are supported ExampleSee it live on Compiler Explorer #include <eve/function/logical_notor.hpp>
#include <eve/function/is_odd.hpp>
#include <eve/function/is_even.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float, eve::fixed<4>>;
int main()
{
using eve::is_even;
using eve::is_odd;
wide_ft pf = {3.0f, -2.0f, -3.0f, 51.04f};
wide_ft qf = {4.0f, -1.0f, -3.0f, 0.0f};
std::cout << "---- simd" << '\n'
<< " <- pf = " << pf << '\n'
<< " <- qf = " << qf << '\n'
<< " -> eve::logical_notor(is_odd(pf), is_even(qf)) = " << eve::logical_notor(is_odd(pf), is_even(qf)) << '\n';
float xf = 3.0f, yf = 4.5f;
std::cout << "---- scalar" << '\n'
<< " xf = " << xf << '\n'
<< " yf = " << yf << '\n'
<< " -> eve::logical_notor(is_odd(xf), is_even(yf)) = " << eve::logical_notor(is_odd(xf), is_even(yf)) << '\n'
<< " -> eve::logical_notor(xf == 3, is_even(yf)) = " << eve::logical_notor(xf == 3 , is_even(yf)) << '\n' ;
return 0;
}
constexpr callable_logical_notor_ logical_notor Callable object computing the logical NOTOR operation. Definition: logical_notor.hpp:63 constexpr callable_is_odd_ is_odd Callable object computing the is_odd logical value. Definition: is_odd.hpp:84 constexpr callable_is_even_ is_even Callable object computing the is_even logical value. Definition: is_even.hpp:84 |