◆ negatenz
Callable object computing the negatenz function. Required header: Members Functions
Definition: value.hpp:31 Parameters
Return value Returns the elementwise product of the first parameter by the never zero sign of the second. auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::negatenz Parameters
Return value A Callable object so that the expression Supported decorators: Required header: The expression `diff(negatenz)(x)` computes the derivative of the function relative to `x`. no decorators are supported ExampleSee it live on Compiler Explorer #include <eve/function/negatenz.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float, eve::fixed<8>>;
int main()
{
wide_ft pf = {0.0f, -0.0f, 0.0f, -2.0f, 2.0f, -2.0f, 2.0f, -2.0f};
wide_ft qf = {4.0f, 4.0f, -4.0f, -4.0, 0.0f, 0.0f, -0.0f, -0.0f};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
float xf = 4.0f;
float yf = -0.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
return 0;
}
constexpr callable_negatenz_ negatenz Callable object computing the negatenz function. Definition: negatenz.hpp:78 |