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

helper applying a binary operation which is not stored in the helper to one or two evaluators More...

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

Public Member Functions

template<typename SecondEvaluatorType>
requires (EvaluatorConcept<std::decay_t<SecondEvaluatorType>>)
MGIS_HOST_DEVICE constexpr auto operator() (SecondEvaluatorType &&) const
 partially apply the binary operation to the evaluator of its second argument
template<typename FirstEvaluatorType, typename SecondEvaluatorType>
requires ((EvaluatorConcept<std::decay_t<FirstEvaluatorType>>)&& // (EvaluatorConcept<std::decay_t<SecondEvaluatorType>>)&& // (std::invocable< CallableType, evaluator_result<std::decay_t<FirstEvaluatorType>>, evaluator_result<std::decay_t<SecondEvaluatorType>>>))
MGIS_HOST_DEVICE constexpr auto operator() (FirstEvaluatorType &&, SecondEvaluatorType &&) const
 build the evaluator of the result of the binary operation

Detailed Description

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

helper applying a binary operation which is not stored in the helper to one or two evaluators

This helper behaves as binary_operation_modifier except that it is a stateless type: the binary operation is created when the values are computed, which allows the predefined modifiers of this file to be defined as constexpr global variables.

Template Parameters
CallableTypetype of the binary operation, which must be trivially default constructible
Note
this helper does not match the EvaluatorModifierConcept concept itself: its single argument call operator returns such a modifier

Member Function Documentation

◆ operator()() [1/2]

template<typename CallableType>
requires ((EvaluatorConcept<std::decay_t<FirstEvaluatorType>>)&& // (EvaluatorConcept<std::decay_t<SecondEvaluatorType>>)&& // (std::invocable< CallableType, evaluator_result<std::decay_t<FirstEvaluatorType>>, evaluator_result<std::decay_t<SecondEvaluatorType>>>))
template<typename FirstEvaluatorType, typename SecondEvaluatorType>
requires ((EvaluatorConcept<std::decay_t<FirstEvaluatorType>>)&& // (EvaluatorConcept<std::decay_t<SecondEvaluatorType>>)&& // (std::invocable< CallableType, evaluator_result<std::decay_t<FirstEvaluatorType>>, evaluator_result<std::decay_t<SecondEvaluatorType>>>))
MGIS_HOST_DEVICE constexpr auto mgis::function::internals::binary_operation_modifier2_impl< CallableType >::operator() ( FirstEvaluatorType && e1,
SecondEvaluatorType && e2 ) const
constexpr

build the evaluator of the result of the binary operation

builds a BinaryOperationModifier2 from the two evaluators

Template Parameters
FirstEvaluatorTypetype of the evaluator of the first argument, which may be a qualified type
SecondEvaluatorTypetype of the evaluator of the second argument, which may be a qualified type
Parameters
[in]e1evaluator used to compute the first argument
[in]e2evaluator used to compute the second argument
Returns
a BinaryOperationModifier2 object, i.e. an evaluator returning the values computed by the binary operation

◆ operator()() [2/2]

template<typename CallableType>
requires (EvaluatorConcept<std::decay_t<SecondEvaluatorType>>)
template<typename SecondEvaluatorType>
requires (EvaluatorConcept<std::decay_t<SecondEvaluatorType>>)
MGIS_HOST_DEVICE constexpr auto mgis::function::internals::binary_operation_modifier2_impl< CallableType >::operator() ( SecondEvaluatorType && e2) const
constexpr

partially apply the binary operation to the evaluator of its second argument

partially applies the operation to the given evaluator

Template Parameters
SecondEvaluatorTypetype of the evaluator, which may be a qualified type
Parameters
[in]e2evaluator used to compute the second argument
Returns
a BinaryOperatorCurrying2 object, which can be applied to the evaluator of the first argument using operator|

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