E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches

◆ logical_or

auto eve::logical_or = functor<logical_or_t>
inlineconstexpr

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
constexpr auto logical_or(auto logical_value x, auto logical_value y) noexcept;
}
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:132
constexpr auto logical_or
Computes the logical OR of its arguments.
Definition logical_or.hpp:81
EVE Main Namespace.
Definition abi.hpp:18

Parameters

Return value

Returns the 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.

Note
Although the infix notation with || is supported, the || operator on standard scalar types is the original one and so will return bool instead of eve::logical_value.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> logical_or(wu0 <= maximum(wu0)/2, wu0 >= maximum(wu0)/2) = " << eve::logical_or(wu0 <= eve::maximum(wu0)/2, wu0 >= eve::maximum(wu0)/2) << "\n";
}
constexpr callable_maximum_ maximum
Computes the maximal value in a simd vector.
Definition maximum.hpp:55
Wrapper for SIMD registers.
Definition wide.hpp:70