E.V.E  0.1-beta

◆ logical_notor

eve::logical_notor = {}
inlineconstexpr

Callable object computing the logical NOTOR operation.

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

Members Functions

Member Effect
operator() the logical NOTOR operation

template< value T, value U > auto operator()( T x, U y ) const noexcept requires compatible< T, U >;

Parameters

x, y: values.

Return value

Computes logical NOTOR of the two parameters following the logical operations semantic.

the call logical_notor(x, y) is semantically equivalent to !x || y if x or y is an simd value.


Supported decorators

no decorators are supported

Example

See 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>
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
Wrapper for SIMD registers.
Definition: wide.hpp:65