◆ is_lessgreater
Callable object computing the "less or greater to" predicate. Required header: Members Functions
template< value T, value U > auto operator()( T x, U y ) const noexcept requires compatible< T, U >;
Parameters
Return value Returns the logical value containing the elementwise comparison test result between The result type is the common compatible type of the two parameters. auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::is_lessgreater Parameters
Return value A Callable object so that the expression Supported decoratorsno decorators are supported ExampleSee it live on Compiler Explorer #include <eve/function/is_lessgreater.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float, eve::fixed<4>>;
int main()
{
wide_ft pf = {0.0f, 1.0f, -0.0f, -2.0f};
wide_ft qf = {1.0f, -1.0f, 0.0f, -2.0f};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
float xf = 1.0f;
float yf = 2.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
return 0;
}
constexpr callable_is_lessgreater_ is_lessgreater Callable object computing the "less or greater to" predicate. Definition: is_lessgreater.hpp:77 |