CppADCodeGen 2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
Loading...
Searching...
No Matches
CppAD::cg::Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > Class Template Reference

#include <evaluator_cg.hpp>

Inheritance diagram for CppAD::cg::Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > >:
Inheritance graph
Collaboration diagram for CppAD::cg::Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > >:
Collaboration graph

Public Types

using Base
 
using NodeIn
 
using ArgIn
 
using ActiveIn
 
using ActiveOut
 
using NodeOut
 
using ArgOut
 

Public Member Functions

 Evaluator (CodeHandler< ScalarIn > &handler)
 
 Evaluator (CodeHandler< ScalarIn > &handler)
 
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)
 
std::vector< ActiveOutevaluate (ArrayView< const ActiveOut > indepNew, ArrayView< const CG< ScalarIn > > depOld)
 
void evaluate (ArrayView< const ActiveOut > indepNew, ArrayView< ActiveOut > depNew, ArrayView< const CG< ScalarIn > > depOld)
 
void evaluate (const ActiveOut *indepNew, size_t indepSize, ActiveOut *depNew, const CG< ScalarIn > *depOld, size_t depSize)
 
void setPrintOutPrintOperations (bool print)
 
void setPrintOutPrintOperations (bool print)
 
bool isPrintOutPrintOperations () const
 
bool isPrintOutPrintOperations () const
 
std::vector< ActiveOutevaluate (ArrayView< const ActiveOut > indepNew, ArrayView< const CG< ScalarIn > > depOld)
 
void evaluate (ArrayView< const ActiveOut > indepNew, ArrayView< ActiveOut > depNew, ArrayView< const CG< ScalarIn > > depOld)
 
void evaluate (const ActiveOut *indepNew, size_t indepSize, ActiveOut *depNew, const CG< ScalarIn > *depOld, size_t depSize)
 

Protected Types

using Super = EvaluatorCG<ScalarIn, ScalarOut, Evaluator<ScalarIn, ScalarOut, CG<ScalarOut> > >
 
using SourceCodePath
 

Protected Member Functions

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 > evalArrayElement (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 > evalPrint (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 evalAtomicOperation (const NodeIn &node)
 
void processActiveOut (const NodeIn &node, CG< ScalarOut > &a)
 
CG< ScalarOut > evalArg (const std::vector< Argument< ScalarIn > > &args, size_t pos)
 
CG< ScalarOut > evalArg (const Argument< ScalarIn > &arg, size_t pos)
 
void prepareNewEvaluation ()
 
void clear ()
 
void analyzeOutIndeps (const CG< ScalarOut > *indep, size_t n)
 
CG< ScalarOut > evalCG (const CG< ScalarIn > &dep)
 
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)
 
void processActiveOut (const NodeIn &node, ActiveOut &a)
 
void analyzeOutIndeps (const ActiveOut *indep, size_t n)
 
ActiveOutsaveEvaluation (const OperationNode< ScalarIn > &node, ActiveOut &&result)
 
void analyzeOutIndeps (const ActiveOut *indep, size_t n)
 
void processActiveOut (const NodeIn &node, ActiveOut &a)
 
ActiveOut makeArray (const NodeIn &node)
 
ActiveOut makeArray (const NodeIn &node, std::vector< ScalarOut > &values, bool &valuesDefined, bool &allParameters)
 
ActiveOut makeArray (const NodeIn &node)
 
ActiveOut makeArray (const NodeIn &node, std::vector< ScalarOut > &values, bool &valuesDefined, bool &allParameters)
 
ActiveOut makeDenseArray (const NodeIn &node)
 
ActiveOut makeDenseArray (const NodeIn &node)
 
ActiveOut makeSparseArray (const NodeIn &node)
 
ActiveOut makeSparseArray (const NodeIn &node)
 
ActiveOutsaveEvaluation (const OperationNode< ScalarIn > &node, ActiveOut &&result)
 

Static Protected Member Functions

static void processArray (const std::vector< ActiveOut > &array, std::vector< ScalarOut > &values, bool &valuesDefined, bool &allParameters)
 
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 isParameters (const CppAD::vector< ActiveOut > &tx)
 
static bool isValuesDefined (const std::vector< ArgOut > &tx)
 
static bool isValuesDefined (const std::vector< ArgOut > &tx)
 

Protected Attributes

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_
 
CodeHandler< ScalarOut > * outHandler_
 
CodeHandler< ScalarOut > * outHandler_
 
std::map< const NodeIn *, std::vector< ScalarOut * > > atomicEvalResults_
 
std::map< const NodeIn *, std::vector< ScalarOut * > > atomicEvalResults_
 
bool printOutPriOperations_
 
bool printOutPriOperations_
 

Detailed Description

template<class ScalarIn, class ScalarOut>
class CppAD::cg::Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > >

Specialization of Evaluator for an output active type of CG<Base>

Definition at line 372 of file evaluator_cg.hpp.

Member Typedef Documentation

◆ ActiveIn

using CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::ActiveIn
inherited

Definition at line 35 of file evaluator_cg.hpp.

◆ ActiveOut

using CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::ActiveOut
inherited

Definition at line 36 of file evaluator_cg.hpp.

◆ ArgIn

using CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::ArgIn

Definition at line 354 of file evaluator.hpp.

◆ ArgOut

using CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::ArgOut
inherited

Definition at line 40 of file evaluator_cg.hpp.

◆ Base

using CppAD::cg::Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > >::Base

Definition at line 696 of file evaluator.hpp.

◆ NodeIn

using CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::NodeIn

Definition at line 353 of file evaluator.hpp.

◆ NodeOut

using CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::NodeOut
inherited

Definition at line 38 of file evaluator_cg.hpp.

◆ SourceCodePath

using CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::SourceCodePath
protected

Definition at line 48 of file evaluator.hpp.

◆ Super

template<class ScalarIn, class ScalarOut>
using CppAD::cg::Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > >::Super = EvaluatorCG<ScalarIn, ScalarOut, Evaluator<ScalarIn, ScalarOut, CG<ScalarOut> > >
protected

Definition at line 374 of file evaluator_cg.hpp.

Constructor & Destructor Documentation

◆ Evaluator() [1/2]

template<class ScalarIn, class ScalarOut>
CppAD::cg::Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > >::Evaluator ( CodeHandler< ScalarIn > & handler)
inline

Definition at line 377 of file evaluator_cg.hpp.

◆ Evaluator() [2/2]

CppAD::cg::Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > >::Evaluator ( CodeHandler< ScalarIn > & handler)
inline

Definition at line 699 of file evaluator.hpp.

Member Function Documentation

◆ analyzeOutIndeps() [1/3]

void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::analyzeOutIndeps ( const CG< ScalarOut > * indep,
size_t n )
inlineprotected

Definition at line 211 of file evaluator.hpp.

◆ analyzeOutIndeps() [2/3]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::analyzeOutIndeps ( const ActiveOut * indep,
size_t n )
inlineprotectedinherited

Definition at line 211 of file evaluator.hpp.

◆ analyzeOutIndeps() [3/3]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::analyzeOutIndeps ( const ActiveOut * indep,
size_t n )
inlineprotectedinherited

Definition at line 211 of file evaluator.hpp.

◆ clear()

void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::clear ( )
inlineprotected

clean-up

Definition at line 197 of file evaluator.hpp.

◆ evalAbs()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalAbs ( const NodeIn & node)
inlineprotected

Definition at line 487 of file evaluator.hpp.

◆ evalAcos()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalAcos ( const NodeIn & node)
inlineprotected

Definition at line 493 of file evaluator.hpp.

◆ evalAdd()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalAdd ( const NodeIn & node)
inlineprotected

Definition at line 499 of file evaluator.hpp.

◆ evalAlias()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalAlias ( const NodeIn & node)
inlineprotected

Definition at line 505 of file evaluator.hpp.

◆ evalArg() [1/2]

CG< ScalarOut > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalArg ( const Argument< ScalarIn > & arg,
size_t pos )
inlineprotected

Definition at line 364 of file evaluator.hpp.

◆ evalArg() [2/2]

CG< ScalarOut > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalArg ( const std::vector< Argument< ScalarIn > > & args,
size_t pos )
inlineprotected

Definition at line 364 of file evaluator.hpp.

◆ evalArrayCreationOperation()

std::vector< CG< ScalarOut > > & CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalArrayCreationOperation ( const OperationNode< ScalarIn > & node)
inlineprotected

Definition at line 281 of file evaluator.hpp.

◆ evalArrayElement()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalArrayElement ( const NodeIn & node)
inlineprotected

Definition at line 511 of file evaluator.hpp.

◆ evalAsin()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalAsin ( const NodeIn & node)
inlineprotected

Definition at line 527 of file evaluator.hpp.

◆ evalAssign()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalAssign ( const NodeIn & node)
inlineprotected

Definition at line 481 of file evaluator.hpp.

◆ evalAtan()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalAtan ( const NodeIn & node)
inlineprotected

Definition at line 533 of file evaluator.hpp.

◆ evalAtomicOperation()

void CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalAtomicOperation ( const NodeIn & node)
inlineprotected

Definition at line 680 of file evaluator.hpp.

◆ evalCG()

CG< ScalarOut > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalCG ( const CG< ScalarIn > & dep)
inlineprotected

Definition at line 216 of file evaluator.hpp.

◆ evalCompareEq()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalCompareEq ( const NodeIn & node)
inlineprotected

Definition at line 551 of file evaluator.hpp.

◆ evalCompareGe()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalCompareGe ( const NodeIn & node)
inlineprotected

Definition at line 557 of file evaluator.hpp.

◆ evalCompareGt()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalCompareGt ( const NodeIn & node)
inlineprotected

Definition at line 563 of file evaluator.hpp.

◆ evalCompareLe()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalCompareLe ( const NodeIn & node)
inlineprotected

Definition at line 545 of file evaluator.hpp.

◆ evalCompareLt()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalCompareLt ( const NodeIn & node)
inlineprotected

Definition at line 539 of file evaluator.hpp.

◆ evalCompareNe()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalCompareNe ( const NodeIn & node)
inlineprotected

Definition at line 569 of file evaluator.hpp.

◆ evalCos()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalCos ( const NodeIn & node)
inlineprotected

Definition at line 581 of file evaluator.hpp.

◆ evalCosh()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalCosh ( const NodeIn & node)
inlineprotected

Definition at line 575 of file evaluator.hpp.

◆ evalDiv()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalDiv ( const NodeIn & node)
inlineprotected

Definition at line 587 of file evaluator.hpp.

◆ evalExp()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalExp ( const NodeIn & node)
inlineprotected

Definition at line 593 of file evaluator.hpp.

◆ evalIndependent()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalIndependent ( const NodeIn & node)
inlineprotected

Definition at line 599 of file evaluator.hpp.

◆ evalLog()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalLog ( const NodeIn & node)
inlineprotected

Definition at line 604 of file evaluator.hpp.

◆ evalMinus()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalMinus ( const NodeIn & node)
inlineprotected

Definition at line 670 of file evaluator.hpp.

◆ evalMul()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalMul ( const NodeIn & node)
inlineprotected

Definition at line 610 of file evaluator.hpp.

◆ evalOperation()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalOperation ( OperationNode< ScalarIn > & node)
inlineprotected

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.

Parameters
nodethe original node
Returns
the clone of the original node

Definition at line 374 of file evaluator.hpp.

◆ evalOperations()

const CG< ScalarOut > & CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalOperations ( OperationNode< ScalarIn > & node)
inlineprotected

Definition at line 242 of file evaluator.hpp.

◆ evalPow()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalPow ( const NodeIn & node)
inlineprotected

Definition at line 616 of file evaluator.hpp.

◆ evalPrint()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalPrint ( const NodeIn & node)
inlineprotected

Definition at line 622 of file evaluator.hpp.

◆ evalSign()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalSign ( const NodeIn & node)
inlineprotected

Definition at line 628 of file evaluator.hpp.

◆ evalSin()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalSin ( const NodeIn & node)
inlineprotected

Definition at line 640 of file evaluator.hpp.

◆ evalSinh()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalSinh ( const NodeIn & node)
inlineprotected

Definition at line 634 of file evaluator.hpp.

◆ evalSparseArrayCreationOperation()

std::vector< CG< ScalarOut > > & CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalSparseArrayCreationOperation ( const OperationNode< ScalarIn > & node)
inlineprotected

Definition at line 306 of file evaluator.hpp.

◆ evalSqrt()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalSqrt ( const NodeIn & node)
inlineprotected

Definition at line 646 of file evaluator.hpp.

◆ evalSub()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalSub ( const NodeIn & node)
inlineprotected

Definition at line 652 of file evaluator.hpp.

◆ evalTan()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalTan ( const NodeIn & node)
inlineprotected

Definition at line 664 of file evaluator.hpp.

◆ evalTanh()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalTanh ( const NodeIn & node)
inlineprotected

Definition at line 658 of file evaluator.hpp.

◆ evaluate() [1/9]

void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evaluate ( ArrayView< const CG< ScalarOut > > indepNew,
ArrayView< CG< ScalarOut > > depNew,
ArrayView< const CG< ScalarIn > > depOld )
inline

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
depNewThe new dependent variable vector to be computed.
depOldDependent 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)
Exceptions
CGExceptionon error (such as an different sizes of depNew and depOld or an unhandled operation type)

Definition at line 114 of file evaluator.hpp.

◆ evaluate() [2/9]

std::vector< CG< ScalarOut > > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evaluate ( ArrayView< const CG< ScalarOut > > indepNew,
ArrayView< const CG< ScalarIn > > depOld )
inline

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
depOldDependent 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)
Returns
The dependent variable values
Exceptions
CGExceptionon error (such as an unhandled operation type)

Definition at line 93 of file evaluator.hpp.

◆ evaluate() [3/9]

void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evaluate ( const CG< ScalarOut > * indepNew,
size_t indepSize,
CG< ScalarOut > * depNew,
const CG< ScalarIn > * depOld,
size_t depSize )
inline

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
indepSizeThe size of the array of independent variables.
depNewThe new dependent variable vector that will be created.
depOldDependent 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)
depSizeThe size of the array of dependent variables.
Exceptions
CGExceptionon error (such as an unhandled operation type)

Definition at line 137 of file evaluator.hpp.

◆ evaluate() [4/9]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evaluate ( ArrayView< const ActiveOut > indepNew,
ArrayView< ActiveOut > depNew,
ArrayView< const CG< ScalarIn > > depOld )
inlineinherited

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
depNewThe new dependent variable vector to be computed.
depOldDependent 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)
Exceptions
CGExceptionon error (such as an different sizes of depNew and depOld or an unhandled operation type)

Definition at line 114 of file evaluator.hpp.

◆ evaluate() [5/9]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evaluate ( ArrayView< const ActiveOut > indepNew,
ArrayView< ActiveOut > depNew,
ArrayView< const CG< ScalarIn > > depOld )
inlineinherited

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
depNewThe new dependent variable vector to be computed.
depOldDependent 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)
Exceptions
CGExceptionon error (such as an different sizes of depNew and depOld or an unhandled operation type)

Definition at line 114 of file evaluator.hpp.

◆ evaluate() [6/9]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
std::vector< ActiveOut > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evaluate ( ArrayView< const ActiveOut > indepNew,
ArrayView< const CG< ScalarIn > > depOld )
inlineinherited

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
depOldDependent 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)
Returns
The dependent variable values
Exceptions
CGExceptionon error (such as an unhandled operation type)

Definition at line 93 of file evaluator.hpp.

Referenced by evaluate(), evaluate(), CppAD::cg::BipartiteGraph< Base >::generateNewModel(), and CppAD::cg::DummyDerivatives< Base >::generateReorderedModel().

◆ evaluate() [7/9]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
std::vector< ActiveOut > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evaluate ( ArrayView< const ActiveOut > indepNew,
ArrayView< const CG< ScalarIn > > depOld )
inlineinherited

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
depOldDependent 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)
Returns
The dependent variable values
Exceptions
CGExceptionon error (such as an unhandled operation type)

Definition at line 93 of file evaluator.hpp.

Referenced by evaluate(), evaluate(), CppAD::cg::BipartiteGraph< Base >::generateNewModel(), and CppAD::cg::DummyDerivatives< Base >::generateReorderedModel().

◆ evaluate() [8/9]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evaluate ( const ActiveOut * indepNew,
size_t indepSize,
ActiveOut * depNew,
const CG< ScalarIn > * depOld,
size_t depSize )
inlineinherited

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
indepSizeThe size of the array of independent variables.
depNewThe new dependent variable vector that will be created.
depOldDependent 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)
depSizeThe size of the array of dependent variables.
Exceptions
CGExceptionon error (such as an unhandled operation type)

Definition at line 137 of file evaluator.hpp.

◆ evaluate() [9/9]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evaluate ( const ActiveOut * indepNew,
size_t indepSize,
ActiveOut * depNew,
const CG< ScalarIn > * depOld,
size_t depSize )
inlineinherited

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
indepSizeThe size of the array of independent variables.
depNewThe new dependent variable vector that will be created.
depOldDependent 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)
depSizeThe size of the array of dependent variables.
Exceptions
CGExceptionon error (such as an unhandled operation type)

Definition at line 137 of file evaluator.hpp.

◆ evalUnsupportedOperation()

CG< ScalarOut > CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalUnsupportedOperation ( const NodeIn & node)
inlineprotected

Definition at line 676 of file evaluator.hpp.

◆ isParameters() [1/2]

static bool CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::isParameters ( const CppAD::vector< ActiveOut > & tx)
inlinestaticprotectedinherited

Definition at line 348 of file evaluator_cg.hpp.

◆ isParameters() [2/2]

static bool CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::isParameters ( const CppAD::vector< ActiveOut > & tx)
inlinestaticprotectedinherited

Definition at line 348 of file evaluator_cg.hpp.

◆ isPrintOutPrintOperations() [1/2]

bool CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::isPrintOutPrintOperations ( ) const
inlineinherited

Whether or not the nodes with an operation type 'Pri' are printed out during the evaluation.

Definition at line 78 of file evaluator_cg.hpp.

◆ isPrintOutPrintOperations() [2/2]

bool CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::isPrintOutPrintOperations ( ) const
inlineinherited

Whether or not the nodes with an operation type 'Pri' are printed out during the evaluation.

Definition at line 78 of file evaluator_cg.hpp.

◆ isUnderEvaluation()

bool CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::isUnderEvaluation ( )
inline
Returns
true if this Evaluator is currently being used.

Definition at line 78 of file evaluator.hpp.

◆ isValuesDefined() [1/2]

static bool CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::isValuesDefined ( const std::vector< ArgOut > & tx)
inlinestaticprotectedinherited

Definition at line 357 of file evaluator_cg.hpp.

◆ isValuesDefined() [2/2]

static bool CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::isValuesDefined ( const std::vector< ArgOut > & tx)
inlinestaticprotectedinherited

Definition at line 357 of file evaluator_cg.hpp.

◆ makeArray() [1/4]

ActiveOut CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::makeArray ( const NodeIn & node)
inlineprotectedinherited

Definition at line 262 of file evaluator_cg.hpp.

◆ makeArray() [2/4]

ActiveOut CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::makeArray ( const NodeIn & node)
inlineprotectedinherited

Definition at line 262 of file evaluator_cg.hpp.

◆ makeArray() [3/4]

ActiveOut CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::makeArray ( const NodeIn & node,
std::vector< ScalarOut > & values,
bool & valuesDefined,
bool & allParameters )
inlineprotectedinherited

Definition at line 270 of file evaluator_cg.hpp.

◆ makeArray() [4/4]

ActiveOut CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::makeArray ( const NodeIn & node,
std::vector< ScalarOut > & values,
bool & valuesDefined,
bool & allParameters )
inlineprotectedinherited

Definition at line 270 of file evaluator_cg.hpp.

◆ makeDenseArray() [1/2]

ActiveOut CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::makeDenseArray ( const NodeIn & node)
inlineprotectedinherited

Definition at line 290 of file evaluator_cg.hpp.

◆ makeDenseArray() [2/2]

ActiveOut CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::makeDenseArray ( const NodeIn & node)
inlineprotectedinherited

Definition at line 290 of file evaluator_cg.hpp.

◆ makeSparseArray() [1/2]

ActiveOut CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::makeSparseArray ( const NodeIn & node)
inlineprotectedinherited

Definition at line 310 of file evaluator_cg.hpp.

◆ makeSparseArray() [2/2]

ActiveOut CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::makeSparseArray ( const NodeIn & node)
inlineprotectedinherited

Definition at line 310 of file evaluator_cg.hpp.

◆ prepareNewEvaluation()

void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::prepareNewEvaluation ( )
inlineprotected

Definition at line 190 of file evaluator.hpp.

◆ processActiveOut() [1/3]

void CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::processActiveOut ( const NodeIn & node,
CG< ScalarOut > & a )
inlineprotected

Definition at line 684 of file evaluator.hpp.

◆ processActiveOut() [2/3]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
void CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::processActiveOut ( const NodeIn & node,
ActiveOut & a )
inlineprotectedinherited

Definition at line 684 of file evaluator.hpp.

◆ processActiveOut() [3/3]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
void CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::processActiveOut ( const NodeIn & node,
ActiveOut & a )
inlineprotectedinherited

Definition at line 684 of file evaluator.hpp.

◆ processArray() [1/2]

static void CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::processArray ( const std::vector< ActiveOut > & array,
std::vector< ScalarOut > & values,
bool & valuesDefined,
bool & allParameters )
inlinestaticprotectedinherited

Definition at line 330 of file evaluator_cg.hpp.

◆ processArray() [2/2]

static void CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::processArray ( const std::vector< ActiveOut > & array,
std::vector< ScalarOut > & values,
bool & valuesDefined,
bool & allParameters )
inlinestaticprotectedinherited

Definition at line 330 of file evaluator_cg.hpp.

◆ saveEvaluation() [1/3]

CG< ScalarOut > * CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::saveEvaluation ( const OperationNode< ScalarIn > & node,
CG< ScalarOut > && result )
inlineprotected

Definition at line 267 of file evaluator.hpp.

◆ saveEvaluation() [2/3]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
ActiveOut * CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::saveEvaluation ( const OperationNode< ScalarIn > & node,
ActiveOut && result )
inlineprotectedinherited

Definition at line 267 of file evaluator.hpp.

◆ saveEvaluation() [3/3]

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
ActiveOut * CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::saveEvaluation ( const OperationNode< ScalarIn > & node,
ActiveOut && result )
inlineprotectedinherited

Definition at line 267 of file evaluator.hpp.

◆ setPrintOutPrintOperations() [1/2]

void CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::setPrintOutPrintOperations ( bool print)
inlineinherited

Defines whether or not to print out the nodes with an operation type 'Pri' during the evaluation.

Definition at line 70 of file evaluator_cg.hpp.

◆ setPrintOutPrintOperations() [2/2]

void CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::setPrintOutPrintOperations ( bool print)
inlineinherited

Defines whether or not to print out the nodes with an operation type 'Pri' during the evaluation.

Definition at line 70 of file evaluator_cg.hpp.

Member Data Documentation

◆ atomicEvalResults_ [1/2]

std::map<const NodeIn*, std::vector<ScalarOut*> > CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::atomicEvalResults_
protectedinherited

Cache for the evaluation of atomic operations

Definition at line 51 of file evaluator_cg.hpp.

Referenced by clear(), evalArrayElement(), and evalAtomicOperation().

◆ atomicEvalResults_ [2/2]

std::map<const NodeIn*, std::vector<ScalarOut*> > CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::atomicEvalResults_
protectedinherited

Cache for the evaluation of atomic operations

Definition at line 51 of file evaluator_cg.hpp.

◆ depth_

size_t CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::depth_
protected

Definition at line 56 of file evaluator.hpp.

◆ evals_

CodeHandlerVector<ScalarIn, std::unique_ptr<CG< ScalarOut >> > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evals_
protected

Definition at line 52 of file evaluator.hpp.

◆ evalsArrays_

std::map<size_t, std::vector<CG< ScalarOut >>* > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalsArrays_
protected

Definition at line 53 of file evaluator.hpp.

◆ evalsSparseArrays_

std::map<size_t, std::vector<CG< ScalarOut >>* > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::evalsSparseArrays_
protected

Definition at line 54 of file evaluator.hpp.

◆ handler_

CodeHandler<ScalarIn>& CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::handler_
protected

Definition at line 50 of file evaluator.hpp.

◆ indep_

const CG< ScalarOut >* CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::indep_
protected

Definition at line 51 of file evaluator.hpp.

◆ outHandler_ [1/2]

CodeHandler<ScalarOut>* CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::outHandler_
protectedinherited

The source code handler used to create the evaluation results

Definition at line 47 of file evaluator_cg.hpp.

Referenced by analyzeOutIndeps(), evalArrayElement(), evalAtomicOperation(), and evalPrint().

◆ outHandler_ [2/2]

CodeHandler<ScalarOut>* CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::outHandler_
protectedinherited

The source code handler used to create the evaluation results

Definition at line 47 of file evaluator_cg.hpp.

◆ path_

SourceCodePath CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::path_
protected

Definition at line 57 of file evaluator.hpp.

◆ printOutPriOperations_ [1/2]

bool CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::printOutPriOperations_
protectedinherited

Whether or not the nodes with an operation type 'Pri' are printed out during the evaluation.

Definition at line 56 of file evaluator_cg.hpp.

Referenced by evalPrint(), isPrintOutPrintOperations(), and setPrintOutPrintOperations().

◆ printOutPriOperations_ [2/2]

bool CppAD::cg::EvaluatorCG< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CG< ScalarOut > > >::printOutPriOperations_
protectedinherited

Whether or not the nodes with an operation type 'Pri' are printed out during the evaluation.

Definition at line 56 of file evaluator_cg.hpp.

◆ underEval_

bool CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, CG< ScalarOut >, FinalEvaluatorType >::underEval_
protected

Definition at line 55 of file evaluator.hpp.


The documentation for this class was generated from the following file: