◆ manhattan
Callable object computing the manhattan operation. Required header: Members Functions
requires (compatiblevalues< T, Ts > && ...);
Definition: value.hpp:83 Parameters
Return value 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::manhattan Parameters
Return value A Callable object so that the expression Supported decorators
!!! Warning This is only available for floating point entries. ExampleSee it live on Compiler Explorer #include <eve/function/manhattan.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float, eve::fixed<4>>;
int main()
{
wide_ft pf = {-1.0f, 2.0f, -3.0f, -32768.0f};
wide_ft qf = {-4, 3, -2, -12};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
float xf = -32768.0f;
float yf = 2.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
return 0;
}
constexpr callable_manhattan_ manhattan Callable object computing the manhattan operation. Definition: manhattan.hpp:89 |