E.V.E
v2023.02.15
Loading...
Searching...
No Matches
eve::elementwise_callable< Func, OptionsValues, Options > Struct Template Reference

Detailed Description

template<template< typename > class Func, typename OptionsValues, typename... Options>
struct eve::elementwise_callable< Func, OptionsValues, Options >

CRTP base class giving an EVE's Callable Object the elementwise function semantic.

Defined in Header

#include <eve/traits/overload.hpp>

Elementwise functions in EVE are built using a very common pattern. Inheriting from eve::elementwise_callable simplifies the implementation of such Callable Object by just requiring the definition of the architecture specific implementations functions.

Elementwise functions in EVE automatically supports masking, aggregated and emulated cases. Elementwise Callable Object are also able to handle mixed SIMD/Scalar calls by performing all the required conversions, letting the implementation of the deferred overload named in the EVE_CALLABLE_OBJECT to only handle common type cases.

Template Parameters
FuncType of current Callable Object being implemented.
OptionsValuesType of stored options.
OptionsList of supported option specifications.
See also
strict_elementwise_callable

Public Member Functions

constexpr auto operator[] (O o) const
 Adds an option to current callable.
constexpr auto options () const
 Retrieves the current options' state, including processed default.

Member Function Documentation

◆ operator[]()

auto eve::decorated_with< OptionsValues, Options >::operator[] ( O o) const
inlineconstexprinherited

Adds an option to current callable.

If the option o is supported by one of the specifications Spec, build a new Callable Object that will behave as an instance of Tag except the option o is passed inside an eve::options as an additional parameter.

Does not participate in overload resolution if o is not supported by any option specifications.

Parameters
oOption to add to current's Callable Object setup
Returns
A new Callable Object with the options o set.