E.V.E  0.1-beta

◆ is_not_denormal

eve::is_not_denormal = {}
inlineconstexpr

Callable object computing the is_not_denormal logical value.

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

Members Functions

Member Effect
operator() the computation of the is_not_denormal logical value
operator[] Construct a conditional version of current function object

auto operator()(real_value auto x ) const noexcept;
Definition: value.hpp:93

Parameters

x: value.

Return value

The call:

constexpr callable_is_not_denormal_ is_not_denormal
Callable object computing the is_not_denormal logical value.
Definition: is_not_denormal.hpp:82
Wrapper for SIMD compatible logical types.
Definition: logical.hpp:36

is semantically equivalent to:

if constexpr(floating_real_value<T>) r = is_not_less(abs(x), Smallestposval(as(x))) || is_eqz(x);
else constexpr(integral_real_value<T>) r = false_(as(x));
Definition: value.hpp:103
Definition: value.hpp:113
constexpr callable_abs_ abs
Callable object computing the absolute value.
Definition: abs.hpp:91
constexpr callable_is_eqz_ is_eqz
Callable object computing the equality to zero predicate.
Definition: is_eqz.hpp:77
constexpr callable_is_not_less_ is_not_less
Callable object computing the "not less than" predicate.
Definition: is_not_less.hpp:87
constexpr callable_false__ false_
Callable object computing the logical false_ value.
Definition: false.hpp:52
Lightweight type-wrapper.
Definition: as.hpp:29

auto operator[]( conditional_expression auto cond ) const noexcept;

Higher-order function generating a masked version of eve::is_not_denormal

Parameters

cond : conditional expression

Return value

A Callable object so that the expression is_not_denormal[cond](x) is equivalent to if_else(cond,is_not_denormal(x),false(as(is_not_denormal(x))))

Supported decorators

no decorators are supported

Example

See it live on Compiler Explorer

#include <eve/function/is_not_denormal.hpp>
#include <eve/wide.hpp>
#include <eve/constant/inf.hpp>
#include <eve/constant/minf.hpp>
#include <eve/constant/nan.hpp>
#include <eve/constant/mindenormal.hpp>
#include <iostream>
int main()
{
wide_ft pf = {0.0f,1.0f, -1.0f, -2.0f,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> is_not_denormal(pf) = " << eve::is_not_denormal(pf) << '\n';
float xf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> is_not_denormal(xf) = " << eve::is_not_denormal(xf) << '\n'
<< "<- yf = " << yf << '\n'
<< "-> is_not_denormal(yf) = " << eve::is_not_denormal(yf) << '\n';
return 0;
}
constexpr callable_nan_ nan
Callable object computing the nan value.
Definition: nan.hpp:52
constexpr callable_minf_ minf
Callable object computing the negative infinity value.
Definition: minf.hpp:55
constexpr callable_mindenormal_ mindenormal
Callable object computing the least denormal positive value.
Definition: mindenormal.hpp:56
constexpr callable_inf_ inf
Callable object computing the infinity ieee value.
Definition: inf.hpp:54
Wrapper for SIMD registers.
Definition: wide.hpp:65