E.V.E
v2022.09.01

◆ is_gtz

eve::is_gtz = {}
inlineconstexpr

Returns a logical true if and only if the element value is greater than 0.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T >
eve::as_logical<T> is_gtz(T x) noexcept;
}
constexpr callable_is_gtz_ is_gtz
Returns a logical true if and only if the element value is greater than 0.
Definition: is_gtz.hpp:60
Definition: all_of.hpp:22

Parameters

Return value

Returns elementwise x > 0.

Example

Semantic Modifiers

  • Masked Call

    The call eve;is_gtz[mask](x) provides a masked version of eve::is_gtz which is equivalent to if_else (mask, is_gtz(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_gtz[pf > 0](pf) = " << eve::is_gtz[pf > 0](pf) << '\n';
    return 0;
    }
    Wrapper for SIMD registers.
    Definition: wide.hpp:65