#include <eve/module/core.hpp>
{
template<std::uint8_t I, eve::floating_value T>
}
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 of_class
strict_elementwise_callable object computing classification of elements of the input.
Definition of_class.hpp:88
EVE Main Namespace.
Definition abi.hpp:19
Parameters
- x: value.
- i: combination of floating point classes to check
Return value
the elementwise logical result of the classification.
- Note
- The iparameter can be constructed easily by using the values qnan, poszero, negzero, posinf,neginf, denorn,neg, snan defined in the namespace eve and the | operator (see the example below).
| name | meaning |
| qnan | quiet NaN |
| poszero | positive zero |
| negzero | negative zero |
| posinf | positive infinite |
| neginf | negative infinite |
| denorm | denormal number |
| neg | negative finite |
| snan | signaling NaN |
Actually snan and qnan are not distinguished in simd wide.
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout <<
"-> of_class(wf0, eve::qnan ) = " <<
eve::of_class(wf0, eve::qnan ) <<
"\n";
std::cout <<
"-> of_class(wf0, eve::poszero) = " <<
eve::of_class(wf0, eve::poszero) <<
"\n";
std::cout <<
"-> of_class(wf0, eve::negzero) = " <<
eve::of_class(wf0, eve::negzero) <<
"\n";
std::cout <<
"-> of_class(wf0, eve::posinf ) = " <<
eve::of_class(wf0, eve::posinf ) <<
"\n";
std::cout <<
"-> of_class(wf0, eve::neginf ) = " <<
eve::of_class(wf0, eve::neginf ) <<
"\n";
std::cout <<
"-> of_class(wf0, eve::denorm ) = " <<
eve::of_class(wf0, eve::denorm ) <<
"\n";
std::cout <<
"-> of_class(wf0, eve::neg ) = " <<
eve::of_class(wf0, eve::neg ) <<
"\n";
std::cout <<
"-> of_class(wf0, eve::snan ) = " <<
eve::of_class(wf0, eve::snan ) <<
"\n";
std::cout <<
"-> of_class(wf0, eve::poszero|eve::negzero|eve::posinf) = " <<
eve::of_class(wf0, eve::poszero|eve::negzero|eve::posinf) <<
"\n";
}
constexpr auto nan
Computes the IEEE quiet NaN constant.
Definition nan.hpp:67
constexpr auto inf
Computes the infinity ieee value.
Definition inf.hpp:67
Lightweight type-wrapper.
Definition as.hpp:29
Wrapper for SIMD registers.
Definition wide.hpp:94