MGIS 3.1.0
Loading...
Searching...
No Matches
mgis::function::internals::unary_operation_modifier2_impl< CallableType > Struct Template Reference

a modifier building a UnaryOperation2 from a callable object which is not stored in the modifier More...

#include </home/runner/work/MFrontGenericInterfaceSupport/MFrontGenericInterfaceSupport/include/MGIS/Function/UnaryOperation.hxx>

Public Types

using Tag = ::mgis::function::EvaluatorModifierTag
 this alias allows to match the Evaluator Modifier concept

Public Member Functions

template<typename EvaluatorType>
requires ((EvaluatorConcept<std::decay_t<EvaluatorType>>)&&( std::invocable<CallableType, evaluator_result<std::decay_t<EvaluatorType>>>))
MGIS_HOST_DEVICE constexpr auto operator() (EvaluatorType &&) const
 apply the unary operation to an evaluator

Detailed Description

template<typename CallableType>
struct mgis::function::internals::unary_operation_modifier2_impl< CallableType >

a modifier building a UnaryOperation2 from a callable object which is not stored in the modifier

This helper is a stateless type, which allows the predefined modifiers of this file to be defined as constexpr global variables.

Template Parameters
CallableTypetype of the unary operation, which must be trivially default constructible

Member Function Documentation

◆ operator()()

template<typename CallableType>
requires ((EvaluatorConcept<std::decay_t<EvaluatorType>>)&&( std::invocable<CallableType, evaluator_result<std::decay_t<EvaluatorType>>>))
template<typename EvaluatorType>
requires ((EvaluatorConcept<std::decay_t<EvaluatorType>>)&&( std::invocable<CallableType, evaluator_result<std::decay_t<EvaluatorType>>>))
MGIS_HOST_DEVICE constexpr auto mgis::function::internals::unary_operation_modifier2_impl< CallableType >::operator() ( EvaluatorType && e) const
constexpr

apply the unary operation to an evaluator

builds a UnaryOperation2 from the given evaluator

Template Parameters
EvaluatorTypetype of the evaluator, which may be a qualified type
Parameters
[in]eevaluator whose values are modified
Returns
a UnaryOperation2 wrapping the given evaluator, the callable object being created when the values are computed

The documentation for this struct was generated from the following files: