E.V.E  0.1-beta

◆ none

eve::none = {}
inlineconstexpr

Callable object computing the none value.

Required header: #include <eve/function/none.hpp>

Members Functions

Member Effect
operator() the computation of the none value
operator[] Construct a conditional version of current function object

auto operator()(value auto x) const noexcept;
Definition: value.hpp:31

Parameters

x: value.

Return value

A bool value


auto operator[]( conditional_expression auto cond ) const noexcept;

Higher-order function generating a masked version of eve::none

Parameters

cond : conditional expression

Return value

A Callable object so that the expression none[cond](x, ...) is equivalent to if_else(cond,none(x, ...),x)


Supported decorators

no decorators are supported

Example

See it live on Compiler Explorer

#include <eve/function/none.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {-0.0f, 0.0f, -0.0f, -0.0f};
wide_it qi = {-1, 0, 30, -32768};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> none(pf != 0) = " << eve::none(pf != 0) << '\n'
<< "<- qi = " << qi << '\n'
<< "-> none(qi != 0) = " << eve::none(qi != 0) << '\n';
float xf = -0.0f;
float yf = -3.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> none(xf) = " << eve::none(xf != 0) << '\n'
<< "<- yf = " << yf << '\n'
<< "-> none(yf) = " << eve::none(yf != 0) << '\n';
return 0;
}
constexpr callable_none_ none
Callable object computing the none value.
Definition: none.hpp:72
Wrapper for SIMD registers.
Definition: wide.hpp:65