E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
flush_denormal
auto eve::flush_denormal =
functor
<flush_denormal_t>
inline
constexpr
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
}
eve::conditional_expr
Specifies that a type is a Conditional Expression.
Definition
conditional.hpp:28
eve::logical_value
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition
value.hpp:132
eve::value
The concept value<T> is satisfied if and only if T satisfies either eve::scalar_value or eve::simd_va...
Definition
value.hpp:34
eve::flush_denormal
constexpr auto flush_denormal
elementwise_callable object computing flushing denormal values to 0.
Definition
flush_denormal.hpp:68
eve
EVE Main Namespace.
Definition
abi.hpp:18
Parameters
x
:
value
.
c
:
Conditional expression
masking the operation.
m
:
Logical value
masking the operation.
Return value
denormal values are flushed to zero.
The operation is performed conditionnaly
.
External references
Wikipedia
Example
// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int
main()
{
auto
spv =
eve::smallestposval
(
eve::as<double>
());
auto
maxd =
eve::prev
(spv);
auto
mind =
eve::mindenormal
(
eve::as<double>
());
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"
;
}
eve::mindenormal
constexpr auto mindenormal
Computes the smallest denormal positive value.
Definition
mindenormal.hpp:70
eve::smallestposval
constexpr auto smallestposval
Computes the smallest normal positive value.
Definition
smallestposval.hpp:70
eve::prev
constexpr auto prev
Computes the nth previous representable element.
Definition
prev.hpp:100
eve::as
Lightweight type-wrapper.
Definition
as.hpp:29
eve::ignore_last
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition
conditional.hpp:332
eve::wide
Wrapper for SIMD registers.
Definition
wide.hpp:70
eve