E.V.E  0.1-beta

◆ logical_or

eve::logical_or = {}
inlineconstexpr

Callable object computing the logical OR operation.

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

Members Functions

Member Effect
operator() the logical OR 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 OR of the two parameters following the logical operations semantic.

the call logical_or(x, y) is semantically equivalent to x || y if x or y is an simd value and does not shortcut.


Supported decorators

no decorators are supported

Example

See it live on Compiler Explorer

#include <eve/function/logical.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {true,true,false,false};
wide_ft qf = {true,false,true,false};
std::cout << "---- simd" << '\n'
<< " <- pf = " << pf << '\n'
<< " <- qf = " << qf << '\n'
<< " -> eve::logical_or(pf, qf) = " << eve::logical_or(pf, qf) << '\n';
eve::logical<float> xf = false, yf = true;
std::cout << "---- scalar" << '\n'
<< " xf = " << xf << '\n'
<< " yf = " << yf << '\n'
<< " -> eve::logical_or(xf, yf) = " << eve::logical_or(xf, yf) << '\n';
return 0;
}
constexpr callable_logical_or_ logical_or
Callable object computing the logical OR operation.
Definition: logical_or.hpp:65
Wrapper for SIMD compatible logical types.
Definition: logical.hpp:36