|
| struct | mgis::function::internals::BinaryOperationModifierBase< CallableType, FirstEvaluatorType, SecondEvaluatorType > |
| | helper base class giving the number of components of the values returned by a binary operation applied to two evaluators More...
|
| struct | mgis::function::BinaryOperationModifier< CallableType, FirstEvaluatorType, SecondEvaluatorType > |
| | an evaluator applying a binary operation to the values returned by two evaluators More...
|
| struct | mgis::function::BinaryOperationModifier2< CallableType, FirstEvaluatorType, SecondEvaluatorType > |
| | an evaluator applying a binary operation to the values returned by two evaluators, without storing this operation More...
|
| struct | mgis::function::internals::BinaryOperatorCurrying< CallableType, SecondEvaluatorType > |
| | partial application of a binary operation to the evaluator of its second argument More...
|
| struct | mgis::function::internals::BinaryOperatorCurrying2< CallableType, SecondEvaluatorType > |
| | partial application of a binary operation to the evaluator of its second argument, without storing the operation More...
|
| struct | mgis::function::internals::binary_operation_modifier< CallableType > |
| | helper applying a stored binary operation to one or two evaluators More...
|
| 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 More...
|
|
| template<typename CallableType, EvaluatorConcept FirstEvaluatorType, EvaluatorConcept SecondEvaluatorType> |
| MGIS_HOST_DEVICE constexpr mgis::size_type | mgis::function::getNumberOfComponents (const BinaryOperationModifier< CallableType, FirstEvaluatorType, SecondEvaluatorType > &) |
| | return the number of components of the values returned by a binary operation
|
| template<typename CallableType, EvaluatorConcept FirstEvaluatorType, EvaluatorConcept SecondEvaluatorType> |
| MGIS_HOST_DEVICE constexpr mgis::size_type | mgis::function::getNumberOfComponents (const BinaryOperationModifier2< CallableType, FirstEvaluatorType, SecondEvaluatorType > &) |
| | return the number of components of the values returned by a binary operation which does not store its callable object
|
| template<typename CallableType> |
| MGIS_HOST_DEVICE constexpr auto | mgis::function::internals::binary_operation_modifier2 (CallableType) |
| | create a helper from a callable object which is only used to deduce the type of the binary operation
|
template<typename CallableType, typename SecondEvaluatorType>
requires (EvaluatorConcept<std::decay_t<SecondEvaluatorType>>) |
| MGIS_HOST_DEVICE constexpr auto | mgis::function::binary_operation (CallableType &&, SecondEvaluatorType &&) |
| | partially apply a binary operation to the evaluator of its second argument
|
template<typename CallableType, typename FirstEvaluatorType, typename SecondEvaluatorType>
requires ((EvaluatorConcept<std::decay_t<FirstEvaluatorType>>)&& // (EvaluatorConcept<std::decay_t<SecondEvaluatorType>>)&& // (std::invocable< std::decay_t<CallableType>, evaluator_result<std::decay_t<FirstEvaluatorType>>, evaluator_result<std::decay_t<SecondEvaluatorType>>>)) |
| MGIS_HOST_DEVICE constexpr auto | mgis::function::binary_operation (CallableType &&, FirstEvaluatorType &&, SecondEvaluatorType &&) |
| | apply a binary operation to the values returned by two evaluators
|
This file declares the BinaryOperationModifier and BinaryOperationModifier2 classes, which build a new evaluator by applying a binary operation to the values returned by two existing evaluators, the binary_operation function used to build such evaluators and the predefined modifiers add, substract, multiply, divide, mean_value and inner_product.
- Author
- Thomas Helfer
- Date
- 11/05/2025
- Copyright
- (C) Copyright Thomas Helfer 2018. Use, modification and distribution are subject to one of the following licences:
- GNU Lesser General Public License (LGPL), Version 3.0. (See accompanying file LGPL-3.0.txt)
- CECILL-C, Version 1.0 (See accompanying files CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt).
template<typename CallableType, typename FirstEvaluatorType, typename SecondEvaluatorType>
requires ((EvaluatorConcept<std::decay_t<FirstEvaluatorType>>)&& // (EvaluatorConcept<std::decay_t<SecondEvaluatorType>>)&& // (std::invocable< std::decay_t<CallableType>, evaluator_result<std::decay_t<FirstEvaluatorType>>, evaluator_result<std::decay_t<SecondEvaluatorType>>>))
| MGIS_HOST_DEVICE constexpr auto mgis::function::binary_operation |
( |
CallableType && | c, |
|
|
FirstEvaluatorType && | e1, |
|
|
SecondEvaluatorType && | e2 ) |
|
constexpr |
apply a binary operation to the values returned by two evaluators
- Template Parameters
-
| CallableType | type of the binary operation, which may be a qualified type |
| FirstEvaluatorType | type of the evaluator of the first argument, which may be a qualified type |
| SecondEvaluatorType | type of the evaluator of the second argument, which may be a qualified type |
- Parameters
-
| [in] | c | binary operation, which must be callable with the values returned by the two evaluators |
| [in] | e1 | evaluator used to compute the first argument |
| [in] | e2 | evaluator used to compute the second argument |
- Returns
- a BinaryOperationModifier object, i.e. an evaluator returning the values computed by the binary operation
apply a binary operation to the values returned by two evaluators
template<typename CallableType, typename SecondEvaluatorType>
requires (EvaluatorConcept<std::decay_t<SecondEvaluatorType>>)
| MGIS_HOST_DEVICE constexpr auto mgis::function::binary_operation |
( |
CallableType && | c, |
|
|
SecondEvaluatorType && | e2 ) |
|
constexpr |
partially apply a binary operation to the evaluator of its second argument
creates a binary_operation_modifier from the callable object and applies it to the given evaluator, which is the evaluator of the second argument of the operation
The returned modifier can be applied to the evaluator of the first argument using operator|, as in e1 | binary_operation(c, e2).
- Template Parameters
-
| CallableType | type of the binary operation, which may be a qualified type |
| SecondEvaluatorType | type of the evaluator of the second argument, which may be a qualified type |
- Parameters
-
| [in] | c | binary operation, a copy of it is stored in the modifier |
| [in] | e2 | evaluator used to compute the second argument |
- Returns
- a internals::BinaryOperatorCurrying object