|
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) |
|
template<typename T_Real, typename T_Impl>
struct codi::BinaryOperation< T_Real, T_Impl >
Implements ComputeOperation for two arguments.
Represents an operation
.
Implementations need to define primal, applyTangentArgA, applyTangentArgB, applyAdjointArgA and applyAdjointArgB.
See ComputeOperation for details.
- Template Parameters
-
T_Real | Original primal value of the statement/expression. |
T_Impl | Final implementation of the operation. |
template<typename T_Real, typename T_Impl>
template<size_t argNumber, typename Adjoint, typename ArgA, typename ArgB>
static inlineauto codi::BinaryOperation< T_Real, T_Impl >::applyAdjoint |
( |
Adjoint const & | adjoint, |
|
|
Real const & | result, |
|
|
ArgA const & | argA, |
|
|
ArgB const & | argB ) |
|
inlinestatic |
Apply the reverse AD mode with respect to the given argument on the adjoint and return the result. Computes
Forwards to applyAdjointArgA and applyAdjointArgB.
template<typename T_Real, typename T_Impl>
template<size_t argNumber, typename Tangent, typename ArgA, typename ArgB>
static inlineauto codi::BinaryOperation< T_Real, T_Impl >::applyTangent |
( |
Tangent const & | tangent, |
|
|
Real const & | result, |
|
|
ArgA const & | argA, |
|
|
ArgB const & | argB ) |
|
inlinestatic |
Apply the forward AD mode with respect to the given argument on the tangent and return the result. Computes
Forwards to applyTangentArgA and applyTangentArgB.
template<typename T_Real, typename T_Impl>
template<typename ArgA, typename ArgB>
static inlineReal codi::BinaryOperation< T_Real, T_Impl >::primal |
( |
ArgA const & | argA, |
|
|
ArgB const & | argB ) |
|
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.