Implements BinaryOperation for functions where the gradients can be computed and transposed. More...
#include <computeExpression.hpp>
Public Types | |
using | Impl = T_Impl |
See BinaryJacobianOperation. | |
using | Real = T_Real |
See BinaryJacobianOperation. | |
![]() | |
using | Impl = T_Impl |
See BinaryOperation. | |
using | Real = T_Real |
See BinaryOperation. | |
![]() | |
using | Real = T_Real |
See ComputeOperation. | |
Static Public Member Functions | |
template<typename Adjoint, typename ArgA, typename ArgB> | |
static inlineArgA | applyAdjointArgA (Adjoint const &adjoint, Real const &result, ArgA const &argA, ArgB const &argB) |
template<typename Adjoint, typename ArgA, typename ArgB> | |
static inlineArgB | applyAdjointArgB (Adjoint const &adjoint, Real const &result, ArgA const &argA, ArgB const &argB) |
template<typename Tangent, typename ArgA, typename ArgB> | |
static inlineauto | applyTangentArgA (Tangent const &tangent, Real const &result, ArgA const &argA, ArgB const &argB) |
template<typename Tangent, typename ArgA, typename ArgB> | |
static inlineauto | applyTangentArgB (Tangent const &tangent, Real const &result, ArgA const &argA, ArgB const &argB) |
template<typename ArgA, typename ArgB> | |
static inlineauto | gradientA (ArgA const &argA, ArgB const &argB, Real const &result) |
Compute ![]() | |
template<typename ArgA, typename ArgB> | |
static inlineauto | gradientB (ArgA const &argA, ArgB const &argB, Real const &result) |
Compute ![]() | |
template<typename ArgA, typename ArgB> | |
static inlineReal | primal (ArgA const &argA, ArgB const &argB) |
![]() | |
template<size_t argNumber, typename Adjoint, typename ArgA, typename ArgB> | |
static inlineauto | applyAdjoint (Adjoint const &adjoint, Real const &result, ArgA const &argA, ArgB const &argB) |
template<typename Adjoint, typename ArgA, typename ArgB> | |
static inlineauto | applyAdjointArgA (Adjoint const &adjoint, Real const &result, ArgA const &argA, ArgB const &argB) |
template<typename Adjoint, typename ArgA, typename ArgB> | |
static inlineauto | applyAdjointArgB (Adjoint const &adjoint, Real const &result, ArgA const &argA, ArgB const &argB) |
template<size_t argNumber, typename Tangent, typename ArgA, typename ArgB> | |
static inlineauto | applyTangent (Tangent const &tangent, Real const &result, ArgA const &argA, ArgB const &argB) |
template<typename Tangent, typename ArgA, typename ArgB> | |
static inlineauto | applyTangentArgA (Tangent const &tangent, Real const &result, ArgA const &argA, ArgB const &argB) |
template<typename Tangent, typename ArgA, typename ArgB> | |
static inlineauto | applyTangentArgB (Tangent const &tangent, Real const &result, ArgA const &argA, ArgB const &argB) |
template<typename ArgA, typename ArgB> | |
static inlineReal | primal (ArgA const &argA, ArgB const &argB) |
![]() | |
template<size_t argNumber, typename Adjoint, typename... Args> | |
static inlineauto | applyAdjoint (Adjoint const &adjoint, Real const &result, Args const &... args) |
template<size_t argNumber, typename Tangent, typename... Args> | |
static inlineauto | applyTangent (Tangent const &tangent, Real const &result, Args const &... args) |
static inlinestd::string | getMathRep () |
Get the math symbol of the operation. E.g. + for operators and pow() for functions. | |
template<typename... Args> | |
static inlineReal | primal (Args const &... args) |
Implements BinaryOperation for functions where the gradients can be computed and transposed.
Implementations need to define primal, gradientA and gradientB.
See BinaryOperation for details.
T_Real | Original primal value of the statement/expression. |
T_Impl | Final implementation of the operation. |
|
inlinestatic |
Apply the reverse AD mode with respect to argument a on the adjoint and return the result. Computes
Calls gradientB, transposes the result and multiplies with adjoint.
|
inlinestatic |
Apply the reverse AD mode with respect to argument b on the adjoint and return the result. Computes
Calls gradientB, transposes the result and multiplies with adjoint.
|
inlinestatic |
Apply the forward AD mode with respect to argument a on the tangent and return the result. Computes
Calls gradientA and multiplies with tangent.
|
inlinestatic |
Apply the forward AD mode with respect to argument b on the tangent and return the result. Computes
Calls gradientB and multiplies with tangent.
|
static |
Compute the primal value from the arguments. E.g. evaluates
The argument types are the types of the result of a getValue call on the expression.