◆ minmag
Callable object computing the minmag operation. Required header: Members Functions
requires (compatible_values< T, Ts > && ...);
Definition: value.hpp:31 Parameters
Return value the elementwise element of least absolute value is returned. For instance for two elements:
The result type is the common compatible type of the parameters.
auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::minmag Parameters
Return value A Callable object so that the expression Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/minmag.hpp>
#include <eve/function/saturated/minmag.hpp>
#include <eve/function/numeric/minmag.hpp>
#include <eve/wide.hpp>
#include <eve/constant/inf.hpp>
#include <eve/constant/minf.hpp>
#include <eve/constant/nan.hpp>
#include <iostream>
using wide_ft = eve::wide<float, eve::fixed<8>>;
int main()
{
wide_ft pf = {0.0f, 1.0f, 1.0f, -2.0f, 2.0f,
wide_ft qf = {4.0f, 1.0f, -1.0f, 0.0f, -3.0f,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
// << "-> numeric(minmag)(pf, qf) = " << eve::numeric(eve::minmag)(pf, qf) << '\n'
;
float xf = -4.0f;
float yf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
// << "-> numeric(minmag)(xf, yf) = " << eve::numeric(eve::minmag)(xf, yf) << '\n'
;
return 0;
}
constexpr callable_minmag_ minmag Callable object computing the minmag operation. Definition: minmag.hpp:102 constexpr callable_minf_ minf Callable object computing the negative infinity value. Definition: minf.hpp:55 constexpr callable_inf_ inf Callable object computing the infinity ieee value. Definition: inf.hpp:54 constexpr saturated_type const saturated Higher-order Callable Object imbuing saturation semantic onto other Callable Objects. Definition: saturated.hpp:68 |