E.V.E
v2022.03.00

◆ exponentmask

eve::exponentmask = {}
inlineconstexpr

Computes the the exponent bit mask of IEEE float or double.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
as_unsigned<T> exponentmask(as<T> t) noexcept;
}
constexpr callable_exponentmask_ exponentmask
Computes the the exponent bit mask of IEEE float or double.
Definition: exponentmask.hpp:59
Definition: all_of.hpp:22
Lightweight type-wrapper.
Definition: as.hpp:29

Parameters

t: Type wrapper instance embedding the type of the constant.

Return value

the call eve::exponentmask(as<T>()) returns elementwise, the integral mask to extract the exponent bits of an ieee floating value. The element values are:

Example

#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float>;
int main()
{
wide_ft wxf;
std::cout << "---- simd" << std::endl
<< "-> exponentmask(as<wide_ft>()) = " << eve::exponentmask(eve::as<wide_ft>()) << std::endl
<< "-> exponentmask(as(wxf)) = " << eve::exponentmask(eve::as(wxf)) << std::endl;
double xf;
std::cout << "---- scalar" << std::endl
<< "-> exponentmask(as<float>()) = " << eve::exponentmask(eve::as(float())) << std::endl
<< "-> exponentmask(as<xf)) = " << eve::exponentmask(eve::as(xf)) << std::endl;
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65