◆ nb_values
Callable object computing the nb_values operation. Required header: Members Functions
template< value T, value U > auto operator()( T x, U y ) const noexcept requires compatible< T, U >;
Parameters
Return value computes the number of values representable in the type in the interval Supported decoratorsno decorators are supported ExampleSee it live on Compiler Explorer #include <eve/function/nb_values.hpp>
#include <eve/constant/eps.hpp>
#include <eve/constant/inf.hpp>
#include <eve/wide.hpp>
#include <iomanip>
#include <iostream>
int main()
{
using w_t = eve::wide<float, eve::fixed<4>>;
w_t qi = {1.0f, 2.0f, 1.0f, eve::inf(eve::as<float>())};
std::cout << "---- simd" << std::setprecision(9) << '\n'
<< " <- qi = " << qi << '\n'
std::uint32_t xi = 3, yi = 7;
std::cout << "---- scalar" << '\n'
<< " xi = " << xi << '\n'
<< " yi = " << yi << '\n'
return 0;
}
constexpr callable_eps_ eps Callable object computing the machine epsilon. Definition: eps.hpp:60 constexpr callable_inf_ inf Callable object computing the infinity ieee value. Definition: inf.hpp:54 constexpr callable_nb_values_ nb_values Callable object computing the nb_values operation. Definition: nb_values.hpp:59 |