|
using | Base = EvaluationHandleReverseBase<Func, Type, InputStore, OutputStore> |
| Abbreviation for the base class.
|
|
using | Func = T_Func |
| See EvaluationHandleBase.
|
|
using | InputStore = T_InputStore |
| See EvaluationHandleBase.
|
|
using | OutputStore = T_OutputStore |
| See EvaluationHandleBase.
|
|
using | Type = T_Type |
| See EvaluationHandleBase.
|
|
Public Types inherited from codi::EvaluationHandleReverseBase< T_Func, T_Type, T_InputStore, T_OutputStore > |
using | Base = EvaluationHandleBase<Func, Type, InputStore, OutputStore> |
| Abbreviation for the base class.
|
|
using | Func = T_Func |
| See EvaluationHandleBase.
|
|
using | InputStore = T_InputStore |
| See EvaluationHandleBase.
|
|
using | OutputStore = T_OutputStore |
| See EvaluationHandleBase.
|
|
using | Type = T_Type |
| See EvaluationHandleBase.
|
|
Public Types inherited from codi::EvaluationHandleBase< T_Func, T_Type, T_InputStore, T_OutputStore > |
using | Func = T_Func |
| See EvaluationHandleBase.
|
|
using | InputStore = T_InputStore |
| See EvaluationHandleBase.
|
|
using | OutputStore = T_OutputStore |
| See EvaluationHandleBase.
|
|
using | Type = T_Type |
| See EvaluationHandleBase.
|
|
|
template<typename VecX , typename Hes , typename VecY , typename Jac > |
void | computeHessian (VecX const &locX, Hes &hes, VecY &locY, Jac &jac) |
| Perform a Hessian evaluation with the inputs provided in locX and store the result in hes, jac and locY.
|
|
| EvaluationHandleReverseBase (Func &func, size_t m, size_t n) |
| Constructor.
|
|
Public Member Functions inherited from codi::EvaluationHandleReverseBase< T_Func, T_Type, T_InputStore, T_OutputStore > |
template<typename VecX , typename Hes , typename VecY , typename Jac > |
void | computeHessian (VecX const &locX, Hes &hes, VecY &locY, Jac &jac) |
| Perform a Hessian evaluation with the inputs provided in locX and store the result in hes, jac and locY.
|
|
template<typename VecX , typename Jac , typename VecY > |
void | computeJacobian (VecX const &locX, Jac &jac, VecY &locY) |
| Perform a Jacobian evaluation with the inputs provided in locX and store the result in jac and locY.
|
|
template<typename VecX , typename VecY > |
void | computePrimal (VecX const &locX, VecY &locY) |
| Perform a primal evaluation with the inputs provided in locX and store the result in locY.
|
|
| EvaluationHandleReverseBase (Func &func, size_t m, size_t n) |
| Constructor.
|
|
template<typename VecY > |
void | getPrimalOutputs (VecY &locY, bool reg) |
| Store the primal values from the CoDiPack vector into the user vector.
|
|
template<typename VecX > |
void | setPrimalInputs (VecX const &locX, bool reg) |
| Set the primal values from the user provided vector into the CoDiPack ones.
|
|
Public Member Functions inherited from codi::EvaluationHandleBase< T_Func, T_Type, T_InputStore, T_OutputStore > |
template<typename VecX , typename Hes , typename VecY , typename Jac > |
void | computeHessian (VecX const &locX, Hes &hes, VecY &locY, Jac &jac) |
| Perform a Hessian evaluation with the inputs provided in locX and store the result in hes, jac and locY.
|
|
template<typename VecX , typename Jac , typename VecY > |
void | computeJacobian (VecX const &locX, Jac &jac, VecY &locY) |
| Perform a Jacobian evaluation with the inputs provided in locX and store the result in jac and locY.
|
|
template<typename VecX , typename VecY > |
void | computePrimal (VecX const &locX, VecY &locY) |
| Perform a primal evaluation with the inputs provided in locX and store the result in locY.
|
|
| EvaluationHandleBase (Func &func, size_t m, size_t n) |
| Constructor.
|
|
|
Protected Member Functions inherited from codi::EvaluationHandleReverseBase< T_Func, T_Type, T_InputStore, T_OutputStore > |
template<typename VecX , typename VecY > |
void | recordTape (VecX const &locX, VecY &locY) |
| Helper function that records a new tape.
|
|
Protected Member Functions inherited from codi::EvaluationHandleBase< T_Func, T_Type, T_InputStore, T_OutputStore > |
void | eval () |
| Helper for the evaluation of the function object with the internal input and output vector.
|
|
template<typename VecY > |
void | getPrimalOutputs (VecY &locY) |
| Store the primal values from the CoDiPack vector into the user vector.
|
|
template<typename VecX > |
void | setPrimalInputs (VecX const &locX) |
| Set the primal values from the user provided vector into the CoDiPack ones.
|
|
Protected Attributes inherited from codi::EvaluationHandleReverseBase< T_Func, T_Type, T_InputStore, T_OutputStore > |
TapeHelper< Type > | th |
| Manages the evaluations.
|
|
Protected Attributes inherited from codi::EvaluationHandleBase< T_Func, T_Type, T_InputStore, T_OutputStore > |
DummyJacobian | dummyJacobian |
| Used if no output is required.
|
|
DummyVector | dummyVector |
| Used if no output is required.
|
|
Func & | func |
| The function object for the evaluations.
|
|
size_t | m |
| Size of the output vector.
|
|
size_t | n |
| Size of the input vector.
|
|
InputStore | x |
| Storage for the input arguments.
|
|
OutputStore | y |
| Storage for the output arguments.
|
|
template<typename T_Func, typename T_Type, typename T_InputStore = std::vector<T_Type>, typename T_OutputStore = std::vector<T_Type>>
struct codi::EvaluationHandleReverseJacobianTapes< T_Func, T_Type, T_InputStore, T_OutputStore >
Implementation for Jacobian reverse mode CoDiPack types of EvaluationHandleBase.
This tape re-records the logic behind the function object for every forward and reverse tape evaluations. Primal evaluations are not recorded.
The class performs no resizing of the vectors. The initial sizes need to be adequate for all calls to the function object that the user will perform.
- Template Parameters
-
T_Func | The type of the function object which defines the evaluation logic. |
T_Type | The CoDiPack type that is used for the derivative evaluation. |
T_InputStore | Vector used for the storage of input arguments. |
T_OutputStore | Vector used for the storage of output arguments. |
template<typename T_Func , typename T_Type , typename T_InputStore = std::vector<T_Type>, typename T_OutputStore = std::vector<T_Type>>
template<typename VecX , typename Hes , typename VecY , typename Jac >
Perform a Hessian evaluation with the inputs provided in locX and store the result in hes, jac and locY.
For the Jacobian tape implementation, a new tape is recorded for every evaluation.