◆ next
Callable object computing the next operation. Required header: Members Functions
template< value T, integral_value U > auto operator()( T x, U n = 1 ) const noexcept requires compatible< T, U >;
Parameters
Return value computes elementwise, the auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::next Parameters
Return value A Callable object so that the expression Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/next.hpp>
#include <eve/function/pedantic/next.hpp>
#include <eve/constant/bitincrement.hpp>
#include <eve/constant/eps.hpp>
#include <eve/wide.hpp>
#include <iostream>
#include <iomanip>
using wide_ft = eve::wide<float, eve::fixed<4>>;
using wide_it = eve::wide<std::int16_t, eve::fixed<4>>;
int main()
{
wide_ft pf = {-0.0f, 2.0f, eve::eps(eve::as<float>()), 0.0f};
wide_it pi = {-1, 2, -3, -32};
std::cout << "---- simd" << '\n'
<< "<- pf = " << std::setprecision(12) << pf << '\n'
float xf = 0.0f;
std::int16_t xi = -3;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- xi = " << xi << '\n'
return 0;
}
constexpr callable_next_ next Callable object computing the next operation. Definition: next.hpp:120 constexpr callable_eps_ eps Callable object computing the machine epsilon. Definition: eps.hpp:60 constexpr pedantic_type const pedantic Higher-order Callable Object imbuing more standard semantic onto other Callable Objects. Definition: pedantic.hpp:56 |