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

◆ flush_denormal

auto eve::flush_denormal = functor<flush_denormal_t>
inlineconstexpr

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto flush_denormal(value auto x) noexcept; // 1
// Lanes masking
constexpr auto flush_denormal[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto flush_denormal[logical_value auto m](value auto x) noexcept; // 2
}
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:132
The concept value<T> is satisfied if and only if T satisfies either eve::scalar_value or eve::simd_va...
Definition value.hpp:34
constexpr auto flush_denormal
elementwise_callable object computing flushing denormal values to 0.
Definition flush_denormal.hpp:68
EVE Main Namespace.
Definition abi.hpp:18

Parameters

Return value

  1. denormal values are flushed to zero.
  2. The operation is performed conditionnaly.

External references

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
auto maxd = eve::prev(spv);
eve::wide wf0{0.0, 1.0, 2.0, 3.0, spv, mind, maxd, -0.0};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "-> flush_denormal(wf0) = " << eve::flush_denormal(wf0) << "\n";
std::cout << "-> flush_denormal[ignore_last(2)](wf0) = " << eve::flush_denormal[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> flush_denormal[wf0 != md](wf0) = " << eve::flush_denormal[wf0 != mind](wf0) << "\n";
}
constexpr auto mindenormal
Computes the smallest denormal positive value.
Definition mindenormal.hpp:70
constexpr auto smallestposval
Computes the smallest normal positive value.
Definition smallestposval.hpp:70
constexpr auto prev
Computes the nth previous representable element.
Definition prev.hpp:100
Lightweight type-wrapper.
Definition as.hpp:29
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition conditional.hpp:332
Wrapper for SIMD registers.
Definition wide.hpp:86