Computes the minimum and maximum of its arguments.
A tuple containing the value of the minimum and the maximum of the arguments.
#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {0.0f, 1.0f, -1.0f, -2.0f, 2.0f,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
<<
"-> minmax(pf, qf) = " <<
eve::minmax(pf, qf) <<
'\n';
float xf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
<<
"-> minmax(xf, yf) = = " <<
eve::minmax(xf, yf) <<
'\n';
auto k = kumi::tuple{pf, qf, pf+qf, 1};
std::cout << "---- multi parameters" << '\n'
<<
" -> minmax(kumi::tuple{pf, pf, 1}) = " <<
eve::minmax( kumi::tuple{pf, qf, 1}) <<
'\n'
<<
" -> minmax(kumi::tuple{1, pf, pf}) = " <<
eve::minmax( kumi::tuple{1, pf, qf}) <<
'\n'
<<
" -> minmax(kumi::tuple{pf, 1.0f) = " <<
eve::minmax( kumi::tuple{pf, 1.0f}) <<
'\n'
<<
" -> minmax(kumi::tuple{1.0f, pf) = " <<
eve::minmax( kumi::tuple{1.0f, pf}) <<
'\n';
return 0;
}
constexpr callable_nan_ nan
Computes the IEEE NaN constant.
Definition: nan.hpp:53
constexpr callable_minf_ minf
Computes the -infinity ieee value.
Definition: minf.hpp:60
constexpr callable_inf_ inf
Computes the infinity ieee value.
Definition: inf.hpp:58
constexpr pedantic_type const pedantic
Higher-order Callable Object imbuing more standard semantic onto other Callable Objects.
Definition: pedantic.hpp:56
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65