◆ fsm
Callable object computing the fused sub-multiply operation. Required header: Members Functions
template< value T, value U, value V > auto operator()( T x, U y, V z ) const noexcept
requires compatible< T,U> && compatible< T, V >;
Parameters
Return value The call The result type is the common compatible type of the three parameters.
auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::fsm Parameters
Return value A Callable object so that the expression Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/fma.hpp>
#include <eve/function/pedantic/fsm.hpp>
#include <eve/function/numeric/fsm.hpp>
#include <eve/constant/eps.hpp>
#include <eve/constant/valmax.hpp>
#include <eve/wide.hpp>
#include <iostream>
#include <iomanip>
using wide_t = eve::wide<float, eve::fixed<4>>;
int main()
{
float esm1 = es-1.0f;
float esp1 = es+1.0f;
wide_t qi = {2, -3, esp1, vm};
wide_t pi = {3, -2, esm1, 2 };
wide_t oi = {-4, 1, -1.0f, vm};
std::cout << "---- simd" << '\n'
<< " <- oi = " << oi << '\n'
<< " <- qi = " << qi << '\n'
<< "\n if the last fsm result ends by '0, inf}', it is because\n"
<< " the system has no simd fsm fsmily intrinsics\n"
<< " or is not configured to use them.\n\n";
std::cout << "---- scalar" << std::setprecision(10) << '\n'
<< " <- vm = " << vm << '\n'
<< " <- esm1 = " << esm1 << '\n'
<< " <- esp1 = " << esp1 << '\n'
return 0;
}
constexpr callable_fsm_ fsm Callable object computing the fused sub-multiply operation. Definition: fsm.hpp:99 constexpr callable_valmax_ valmax Callable object computing the greatest representable value. Definition: valmax.hpp:53 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 constexpr numeric_type const numeric Higher-order Callable Object imbuing non invalid return preference semantic onto other Callable Objec... Definition: numeric.hpp:52 |