CppADCodeGen
2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
|
Public Types | |
using | ScalarOut = CG< BaseOut > |
using | ActiveOut = CppAD::AD< ScalarOut > |
using | Super = EvaluatorAD< ScalarIn, ScalarOut, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > > |
using | NodeIn = OperationNode< ScalarIn > |
using | ArgIn = Argument< ScalarIn > |
using | Base = EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > > |
Public Member Functions | |
Evaluator (CodeHandler< ScalarIn > &handler) | |
void | setPrintFor (bool printFor) |
bool | isPrintFor () const |
void | setPrintForPos (const ActiveOut &pos) |
const ActiveOut & | getPrintForPos () const |
void | setCopyAdCgName (bool adcgName) |
bool | isCopyAdCgName () const |
void | setPrintOutPrintOperations (bool print) |
bool | isPrintOutPrintOperations () const |
virtual bool | addAtomicFunction (size_t id, atomic_base< CG< BaseOut > > &atomic) |
virtual void | addAtomicFunctions (const std::map< size_t, atomic_base< CG< BaseOut > > * > &atomics) |
size_t | getNumberOfEvaluatedAtomics () const |
Protected Member Functions | |
void | processActiveOut (const OperationNode< ScalarIn > &node, ActiveOut &a) |
void | prepareNewEvaluation () |
void | evalAtomicOperation (NodeIn &node) |
void | evalAtomicOperation (const NodeIn &node) |
ActiveOut | evalPrint (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalOperation (OperationNode< ScalarIn > &node) |
CppAD::AD< CG< BaseOut > > | evalAssign (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalAbs (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalAcos (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalAdd (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalAlias (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalArrayElement (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalAsin (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalAtan (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalCompareLt (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalCompareLe (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalCompareEq (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalCompareGe (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalCompareGt (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalCompareNe (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalCosh (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalCos (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalDiv (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalExp (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalIndependent (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalLog (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalMul (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalPow (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalSign (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalSinh (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalSin (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalSqrt (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalSub (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalTanh (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalTan (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalMinus (const NodeIn &node) |
CppAD::AD< CG< BaseOut > > | evalUnsupportedOperation (const NodeIn &node) |
void | processActiveOut (const NodeIn &node, CppAD::AD< CG< BaseOut > > &a) |
CppAD::AD< CG< BaseOut > > | evalArg (const std::vector< Argument< ScalarIn > > &args, size_t pos) |
CppAD::AD< CG< BaseOut > > | evalArg (const Argument< ScalarIn > &arg, size_t pos) |
Protected Attributes | |
bool | printFor_ |
ActiveOut | printForPos_ |
bool | adcgName_ |
std::set< NodeIn * > | evalsAtomic_ |
std::map< size_t, CppAD::atomic_base< ScalarOut > * > | atomicFunctions_ |
bool | printOutPriOperations_ |
Specialization of class Evaluator for an output active type of AD<CG<Base>>
Definition at line 25 of file evaluator_adcg.hpp.
|
inlinevirtualinherited |
Provides an atomic function.
id | The atomic function ID |
atomic | The atomic function |
Definition at line 83 of file evaluator_ad.hpp.
|
inlineprotectedinherited |
CGException | on an internal evaluation error |
Definition at line 131 of file evaluator_ad.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 374 of file evaluator.hpp.
|
inlineprotectedinherited |
Definition at line 181 of file evaluator_ad.hpp.
|
inlineinherited |
Provides the number of atomic function evaluations. The same function can be considered more than once.
Definition at line 104 of file evaluator_ad.hpp.
|
inline |
Whenever printFor_ is set to true it will add a CppAD::PrintFor(pos, "", var, name) to every variable with a name so that names can be recovered using a OperationNodeNameStreambuf. This method provides the pos value used in CppAD::PrintFor.
Definition at line 105 of file evaluator_adcg.hpp.
|
inline |
Whenever set to true it will copy the name in original operation nodes into new operation nodes created in AD<CG>. The default value is true.
Definition at line 122 of file evaluator_adcg.hpp.
|
inline |
true if a CppAD::PrintFor(pos, "", var, name) will be added to every variable with a name so that names can be recovered using a OperationNodeNameStreambuf. The default value is false.
Definition at line 83 of file evaluator_adcg.hpp.
|
inlineinherited |
Whether or not the nodes with an operation type 'Pri' are printed out during the evaluation.
Definition at line 71 of file evaluator_ad.hpp.
|
inlineprotectedinherited |
Do not place this in clear() so that it is possible to determine the number of atomic function evaluations after the evaluation has ended.
Definition at line 114 of file evaluator_ad.hpp.
|
inlineprotected |
Definition at line 132 of file evaluator_adcg.hpp.
|
inline |
Whenever set to true it will copy the name in original operation nodes into new operation nodes created in AD<CG>.
Definition at line 113 of file evaluator_adcg.hpp.
|
inline |
Whenever set to true it will add a CppAD::PrintFor(pos, "", var, name) to every variable with a name so that names can be recovered using a OperationNodeNameStreambuf.
Definition at line 73 of file evaluator_adcg.hpp.
|
inline |
Whenever printFor_ is set to true it will add a CppAD::PrintFor(pos, "", var, name) to every variable with a name so that names can be recovered using a OperationNodeNameStreambuf. This method sets the pos value used in CppAD::PrintFor.
Definition at line 94 of file evaluator_adcg.hpp.
|
inlineinherited |
Defines whether or not to print out the nodes with an operation type 'Pri' during the evaluation.
Definition at line 63 of file evaluator_ad.hpp.
|
protected |
Whenever set to true it will copy the name in original operation nodes into new operation nodes created in AD<CG>.
Definition at line 55 of file evaluator_adcg.hpp.
|
protected |
Whenever set to true it will add a CppAD::PrintFor(0, "", var, name) to every variable with a name so that names can be recovered using a OperationNodeNameStreambuf.
Definition at line 46 of file evaluator_adcg.hpp.
|
protected |
Pos value used in CppAD::PrintFor(pos, ...)
Definition at line 50 of file evaluator_adcg.hpp.
|
protectedinherited |
Whether or not the nodes with an operation type 'Pri' are printed out during the evaluation.
Definition at line 49 of file evaluator_ad.hpp.