CppADCodeGen
2.3.0
A C++ Algorithmic Differentiation Package with Source Code Generation
|
Public Types | |
using | ActiveIn = CG< ScalarIn > |
using | ActiveOut = CG< ScalarOut > |
using | NodeIn = OperationNode< ScalarIn > |
using | NodeOut = OperationNode< ScalarOut > |
using | ArgIn = Argument< ScalarIn > |
using | ArgOut = Argument< ScalarOut > |
using | Base = EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > > |
Public Member Functions | |
Evaluator (CodeHandler< ScalarIn > &handler) | |
void | setPrintOutPrintOperations (bool print) |
bool | isPrintOutPrintOperations () const |
bool | isUnderEvaluation () |
std::vector< CG< ScalarOut > > | evaluate (ArrayView< const CG< ScalarOut > > indepNew, ArrayView< const CG< ScalarIn > > depOld) |
void | evaluate (ArrayView< const CG< ScalarOut > > indepNew, ArrayView< CG< ScalarOut > > depNew, ArrayView< const CG< ScalarIn > > depOld) |
void | evaluate (const CG< ScalarOut > *indepNew, size_t indepSize, CG< ScalarOut > *depNew, const CG< ScalarIn > *depOld, size_t depSize) |
Protected Types | |
using | Super = EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > > |
using | SourceCodePath = typename CodeHandler< ScalarIn >::SourceCodePath |
Protected Member Functions | |
void | analyzeOutIndeps (const ActiveOut *indep, size_t n) |
void | clear () |
void | processActiveOut (const NodeIn &node, ActiveOut &a) |
ActiveOut | evalPrint (const NodeIn &node) |
void | evalAtomicOperation (const NodeIn &node) |
ActiveOut | evalArrayElement (const NodeIn &node) |
ActiveOut | makeArray (const NodeIn &node) |
ActiveOut | makeArray (const NodeIn &node, std::vector< ScalarOut > &values, bool &valuesDefined, bool &allParameters) |
ActiveOut | makeDenseArray (const NodeIn &node) |
ActiveOut | makeSparseArray (const NodeIn &node) |
CG< ScalarOut > | evalOperation (OperationNode< ScalarIn > &node) |
CG< ScalarOut > | evalAssign (const NodeIn &node) |
CG< ScalarOut > | evalAbs (const NodeIn &node) |
CG< ScalarOut > | evalAcos (const NodeIn &node) |
CG< ScalarOut > | evalAdd (const NodeIn &node) |
CG< ScalarOut > | evalAlias (const NodeIn &node) |
CG< ScalarOut > | evalAsin (const NodeIn &node) |
CG< ScalarOut > | evalAtan (const NodeIn &node) |
CG< ScalarOut > | evalCompareLt (const NodeIn &node) |
CG< ScalarOut > | evalCompareLe (const NodeIn &node) |
CG< ScalarOut > | evalCompareEq (const NodeIn &node) |
CG< ScalarOut > | evalCompareGe (const NodeIn &node) |
CG< ScalarOut > | evalCompareGt (const NodeIn &node) |
CG< ScalarOut > | evalCompareNe (const NodeIn &node) |
CG< ScalarOut > | evalCosh (const NodeIn &node) |
CG< ScalarOut > | evalCos (const NodeIn &node) |
CG< ScalarOut > | evalDiv (const NodeIn &node) |
CG< ScalarOut > | evalExp (const NodeIn &node) |
CG< ScalarOut > | evalIndependent (const NodeIn &node) |
CG< ScalarOut > | evalLog (const NodeIn &node) |
CG< ScalarOut > | evalMul (const NodeIn &node) |
CG< ScalarOut > | evalPow (const NodeIn &node) |
CG< ScalarOut > | evalSign (const NodeIn &node) |
CG< ScalarOut > | evalSinh (const NodeIn &node) |
CG< ScalarOut > | evalSin (const NodeIn &node) |
CG< ScalarOut > | evalSqrt (const NodeIn &node) |
CG< ScalarOut > | evalSub (const NodeIn &node) |
CG< ScalarOut > | evalTanh (const NodeIn &node) |
CG< ScalarOut > | evalTan (const NodeIn &node) |
CG< ScalarOut > | evalMinus (const NodeIn &node) |
CG< ScalarOut > | evalUnsupportedOperation (const NodeIn &node) |
void | prepareNewEvaluation () |
CG< ScalarOut > | evalCG (const CG< ScalarIn > &dep) |
CG< ScalarOut > | evalArg (const std::vector< Argument< ScalarIn > > &args, size_t pos) |
CG< ScalarOut > | evalArg (const Argument< ScalarIn > &arg, size_t pos) |
const CG< ScalarOut > & | evalOperations (OperationNode< ScalarIn > &node) |
CG< ScalarOut > * | saveEvaluation (const OperationNode< ScalarIn > &node, CG< ScalarOut > &&result) |
std::vector< CG< ScalarOut > > & | evalArrayCreationOperation (const OperationNode< ScalarIn > &node) |
std::vector< CG< ScalarOut > > & | evalSparseArrayCreationOperation (const OperationNode< ScalarIn > &node) |
Static Protected Member Functions | |
static void | processArray (const std::vector< ActiveOut > &array, std::vector< ScalarOut > &values, bool &valuesDefined, bool &allParameters) |
static bool | isParameters (const CppAD::vector< ActiveOut > &tx) |
static bool | isValuesDefined (const std::vector< ArgOut > &tx) |
Protected Attributes | |
CodeHandler< ScalarOut > * | outHandler_ |
std::map< const NodeIn *, std::vector< ScalarOut *> > | atomicEvalResults_ |
bool | printOutPriOperations_ |
CodeHandler< ScalarIn > & | handler_ |
const CG< ScalarOut > * | indep_ |
CodeHandlerVector< ScalarIn, std::unique_ptr< CG< ScalarOut > > > | evals_ |
std::map< size_t, std::vector< CG< ScalarOut > > * > | evalsArrays_ |
std::map< size_t, std::vector< CG< ScalarOut > > * > | evalsSparseArrays_ |
bool | underEval_ |
size_t | depth_ |
SourceCodePath | path_ |
Specialization of Evaluator for an output active type of CG<Base>
Definition at line 371 of file evaluator_cg.hpp.
|
inlineprotectedinherited |
Definition at line 87 of file evaluator_cg.hpp.
|
inlineprotectedinherited |
Definition at line 97 of file evaluator_cg.hpp.
|
inlineprotectedinherited |
Definition at line 228 of file evaluator_cg.hpp.
|
inlineprotectedinherited |
Definition at line 151 of file evaluator_cg.hpp.
|
inlineprotectedinherited |
Clones a node with the new type. Override this method to add a custom node generation behaviour which does not follow the original operation graph.
node | the original node |
Definition at line 373 of file evaluator.hpp.
|
inlineprotectedinherited |
Definition at line 126 of file evaluator_cg.hpp.
|
inlineinherited |
Performs all the operations required to calculate the dependent variables with a (potentially) new data type
indepNew | The new independent variables. |
depOld | Dependent variable vector representing the operations that are going to be executed to determine the new variables (all variables must belong to the same code handler) |
CGException | on error (such as an unhandled operation type) |
Definition at line 92 of file evaluator.hpp.
|
inlineinherited |
Performs all the operations required to calculate the dependent variables with a (potentially) new data type
indepNew | The new independent variables. |
depNew | The new dependent variable vector to be computed. |
depOld | Dependent variable vector representing the operations that are going to be executed to determine the new variables (all variables must belong to the same code handler) |
CGException | on error (such as an different sizes of depNew and depOld or an unhandled operation type) |
Definition at line 113 of file evaluator.hpp.
|
inlineinherited |
Performs all the operations required to calculate the dependent variables with a (potentially) new data type
indepNew | The new independent variables. |
indepSize | The size of the array of independent variables. |
depNew | The new dependent variable vector that will be created. |
depOld | Dependent variable vector representing the operations that are going to be executed to determine the new variables (all variables must belong to the same code handler) |
depSize | The size of the array of dependent variables. |
CGException | on error (such as an unhandled operation type) |
Definition at line 136 of file evaluator.hpp.
|
inlineinherited |
Whether or not the nodes with an operation type 'Pri' are printed out during the evaluation.
Definition at line 77 of file evaluator_cg.hpp.
|
inlineinherited |
Definition at line 77 of file evaluator.hpp.
|
inlineprotectedinherited |
Definition at line 113 of file evaluator_cg.hpp.
|
inlineinherited |
Defines whether or not to print out the nodes with an operation type 'Pri' during the evaluation.
Definition at line 69 of file evaluator_cg.hpp.
|
protectedinherited |
Cache for the evaluation of atomic operations
Definition at line 50 of file evaluator_cg.hpp.
|
protectedinherited |
The source code handler used to create the evaluation results
Definition at line 46 of file evaluator_cg.hpp.
|
protectedinherited |
Whether or not the nodes with an operation type 'Pri' are printed out during the evaluation.
Definition at line 55 of file evaluator_cg.hpp.