E.V.E  0.1-beta

◆ combine

eve::combine = {}
inlineconstexpr

Callable object computing TODO: FILL THIS BLANK.

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

Members Functions

Member Effect
operator() TODO: FILL THIS BLANK
operator[] Construct a conditional version of current function object

template<**TODO: FILL THIS BLANK**>
auto operator()( **TODO: FILL THIS BLANK**) const noexcept;

Parameters

x: TODO: FILL THIS BLANK

OTHER PARAMETERS : TODO: FILL THIS BLANK IF NEEDED BUT RESPECT THE : FORMATTING

Return value

For TODO: FILL THIS BLANK:

auto r = combine(**TODO: FILL THIS BLANK**);
constexpr callable_combine_ combine
Callable object computing TODO: FILL THIS BLANK.
Definition: combine.hpp:97

is semantically equivalent to:

Target r;
if constexpr( scalar_value<T> )
{
**TODO: FILL THIS BLANK**
}
else if constexpr( simd_value<T> )
{
**TODO: FILL THIS BLANK**
}
Specify that a type represents a scalar value.
Definition: vectorizable.hpp:70

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

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

Parameters

cond : conditional expression

Return value

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


Supported decorators

no decorators are supported

Example

See it live on Compiler Explorer

#include <eve/function/combine.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {-1.0f, 2.0f, -3.0f, -32768.0f};
auto pf2 = eve::combine(pf,pf);
std::cout << "pf ---> " << pf << "\n";
std::cout << "eve::combine(pf,pf) ---> " << pf2 << "\n";
}
Wrapper for SIMD registers.
Definition: wide.hpp:65