E.V.E  0.1-beta

◆ exponentmask

eve::exponentmask = {}
inlineconstexpr

Callable object computing the exponent bit mask.

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

Member Effect
operator() Computes the exponentmask constant

tempate < floating_value T > auto operator()( as<T> const & t) const noexcept;
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

See it live on Compiler Explorer

#include <eve/constant/exponentmask.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;
}
constexpr callable_exponentmask_ exponentmask
Callable object computing the exponent bit mask.
Definition: exponentmask.hpp:56
Wrapper for SIMD registers.
Definition: wide.hpp:65