Computes the saturation of a value in a type.
{
{ template<value From, scalar_value To>
}
constexpr callable_bit_cast_ bit_cast
Computes a a bitwise reinterpretation of an object.
Definition: bit_cast.hpp:64
Lightweight type-wrapper.
Definition: as.hpp:29
#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {-1.0f, 2.3f, 45000.7f, -64768.6f};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<<
"-> saturate(pf, int_64()_) = " <<
eve::saturate(pf, int_64()) <<
'\n'
<<
"-> saturate(pf, int_16()) = " <<
eve::saturate(pf, int_16()) <<
'\n'
<<
"<- pi = " <<
pi <<
'\n'
double xf = -64768.4f;
std::int64_t xi = -64768;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<<
"-> saturate(xf, int_64()) = " <<
eve::saturate(xf, int_64()) <<
'\n'
<< "<- xi = " << xi << '\n'
return 0;
}
constexpr callable_saturate_ saturate
Computes the saturation of a value in a type.
Definition: saturate.hpp:62
constexpr callable_valmax_ valmax
Computes the the greatest representable value.
Definition: valmax.hpp:55
constexpr callable_pi_ pi
Callable object computing the constant .
Definition: pi.hpp:49
Wrapper for SIMD registers.
Definition: wide.hpp:65