E.V.E
v2023.02.15

◆ is_gez

eve::is_gez = {}
inlineconstexpr

Returns a logical true if and only if the element value is greater or equal to 0.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T >
eve::as_logical<T> is_gez(T x) noexcept;
}
constexpr callable_is_gez_ is_gez
Returns a logical true if and only if the element value is greater or equal to 0.
Definition: is_gez.hpp:61
Definition: abi.hpp:18

Parameters

Return value

Returns elementwise x >= 0.

Example

#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {0.0f, 1.0f, -1.0f, -0.0f};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> is_gez(pf) = " << eve::is_gez(pf) << '\n';
float xf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> is_gez(xf) = " << eve::is_gez(xf) << '\n';
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65

Semantic Modifiers

  • Masked Call

    The call eve;is_gez[mask](x) provides a masked version of eve::is_gez which is equivalent to if_else (mask, is_gez(x), eve::false( eve::as(x))).

    Example

    #include <eve/module/core.hpp>
    #include <eve/wide.hpp>
    #include <iostream>
    int main()
    {
    wide_ft pf = {0.0f, 1.0f, -1.0f, -0.0f};
    std::cout << "---- simd" << '\n'
    << "<- pf = " << pf << '\n'
    << "-> is_gez[pf > 0](pf) = " << eve::is_gez[pf > 0](pf) << '\n';
    return 0;
    }