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

#include <evaluator.hpp>

Inheritance diagram for CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >:
Inheritance graph
Collaboration diagram for CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >:
Collaboration graph

Public Types

using Base = EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >
 
using NodeIn = OperationNode< ScalarIn >
 
using ArgIn = Argument< ScalarIn >
 

Public Member Functions

 EvaluatorOperations (CodeHandler< ScalarIn > &handler)
 
bool isUnderEvaluation ()
 
std::vector< ActiveOut > evaluate (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 SourceCodePath = typename CodeHandler< ScalarIn >::SourceCodePath
 

Protected Member Functions

ActiveOut evalOperation (OperationNode< ScalarIn > &node)
 
ActiveOut evalAssign (const NodeIn &node)
 
ActiveOut evalAbs (const NodeIn &node)
 
ActiveOut evalAcos (const NodeIn &node)
 
ActiveOut evalAdd (const NodeIn &node)
 
ActiveOut evalAlias (const NodeIn &node)
 
ActiveOut evalArrayElement (const NodeIn &node)
 
ActiveOut evalAsin (const NodeIn &node)
 
ActiveOut evalAtan (const NodeIn &node)
 
ActiveOut evalCompareLt (const NodeIn &node)
 
ActiveOut evalCompareLe (const NodeIn &node)
 
ActiveOut evalCompareEq (const NodeIn &node)
 
ActiveOut evalCompareGe (const NodeIn &node)
 
ActiveOut evalCompareGt (const NodeIn &node)
 
ActiveOut evalCompareNe (const NodeIn &node)
 
ActiveOut evalCosh (const NodeIn &node)
 
ActiveOut evalCos (const NodeIn &node)
 
ActiveOut evalDiv (const NodeIn &node)
 
ActiveOut evalExp (const NodeIn &node)
 
ActiveOut evalIndependent (const NodeIn &node)
 
ActiveOut evalLog (const NodeIn &node)
 
ActiveOut evalMul (const NodeIn &node)
 
ActiveOut evalPow (const NodeIn &node)
 
ActiveOut evalPrint (const NodeIn &node)
 
ActiveOut evalSign (const NodeIn &node)
 
ActiveOut evalSinh (const NodeIn &node)
 
ActiveOut evalSin (const NodeIn &node)
 
ActiveOut evalSqrt (const NodeIn &node)
 
ActiveOut evalSub (const NodeIn &node)
 
ActiveOut evalTanh (const NodeIn &node)
 
ActiveOut evalTan (const NodeIn &node)
 
ActiveOut evalMinus (const NodeIn &node)
 
ActiveOut evalUnsupportedOperation (const NodeIn &node)
 
void evalAtomicOperation (const NodeIn &node)
 
void processActiveOut (const NodeIn &node, ActiveOut &a)
 
ActiveOut evalArg (const std::vector< Argument< ScalarIn > > &args, size_t pos)
 
ActiveOut evalArg (const Argument< ScalarIn > &arg, size_t pos)
 
void prepareNewEvaluation ()
 
void clear ()
 
void analyzeOutIndeps (const ActiveOut *indep, size_t n)
 
ActiveOut evalCG (const CG< ScalarIn > &dep)
 
const ActiveOut & evalOperations (OperationNode< ScalarIn > &node)
 
ActiveOut * saveEvaluation (const OperationNode< ScalarIn > &node, ActiveOut &&result)
 
std::vector< ActiveOut > & evalArrayCreationOperation (const OperationNode< ScalarIn > &node)
 
std::vector< ActiveOut > & evalSparseArrayCreationOperation (const OperationNode< ScalarIn > &node)
 

Protected Attributes

CodeHandler< ScalarIn > & handler_
 
const ActiveOut * indep_
 
CodeHandlerVector< ScalarIn, std::unique_ptr< ActiveOut > > evals_
 
std::map< size_t, std::vector< ActiveOut > * > evalsArrays_
 
std::map< size_t, std::vector< ActiveOut > * > evalsSparseArrays_
 
bool underEval_
 
size_t depth_
 
SourceCodePath path_
 

Friends

class EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >
 

Detailed Description

template<class ScalarIn, class ScalarOut, class ActiveOut, class FinalEvaluatorType>
class CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >

Defines the default operations for evaluators. Evaluators allow to reprocess operations defined in an operation graph for a different set of independent variables and (possibly) data types.

This allows static polymorphism through curiously recurring template pattern (CRTP). Therefore the default behaviour can be overridden without the use of virtual methods. This class should not be instantiated directly.

Definition at line 345 of file evaluator.hpp.

Member Typedef Documentation

◆ ArgIn

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
using CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::ArgIn = Argument<ScalarIn>

Definition at line 354 of file evaluator.hpp.

◆ Base

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
using CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::Base = EvaluatorBase<ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType>

Definition at line 352 of file evaluator.hpp.

◆ NodeIn

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
using CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::NodeIn = OperationNode<ScalarIn>

Definition at line 353 of file evaluator.hpp.

◆ SourceCodePath

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
using CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::SourceCodePath = typename CodeHandler<ScalarIn>::SourceCodePath
protectedinherited

Definition at line 48 of file evaluator.hpp.

Constructor & Destructor Documentation

◆ EvaluatorOperations()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::EvaluatorOperations ( CodeHandler< ScalarIn > &  handler)
inline

Definition at line 356 of file evaluator.hpp.

◆ ~EvaluatorOperations()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
virtual CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::~EvaluatorOperations ( )
inlinevirtual

Definition at line 360 of file evaluator.hpp.

Member Function Documentation

◆ analyzeOutIndeps()

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()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::clear ( )
inlineprotectedinherited

◆ evalAbs()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalAbs ( const NodeIn node)
inlineprotected

Definition at line 487 of file evaluator.hpp.

◆ evalAcos()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalAcos ( const NodeIn node)
inlineprotected

Definition at line 493 of file evaluator.hpp.

◆ evalAdd()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalAdd ( const NodeIn node)
inlineprotected

Definition at line 499 of file evaluator.hpp.

◆ evalAlias()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalAlias ( const NodeIn node)
inlineprotected

Definition at line 505 of file evaluator.hpp.

◆ evalArg() [1/2]

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

Definition at line 230 of file evaluator.hpp.

◆ evalArg() [2/2]

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

Definition at line 225 of file evaluator.hpp.

◆ evalArrayCreationOperation()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
std::vector< ActiveOut > & CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalArrayCreationOperation ( const OperationNode< ScalarIn > &  node)
inlineprotectedinherited

Definition at line 281 of file evaluator.hpp.

◆ evalArrayElement()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalArrayElement ( const NodeIn node)
inlineprotected

Definition at line 511 of file evaluator.hpp.

◆ evalAsin()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalAsin ( const NodeIn node)
inlineprotected

Definition at line 527 of file evaluator.hpp.

◆ evalAssign()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalAssign ( const NodeIn node)
inlineprotected

Definition at line 481 of file evaluator.hpp.

◆ evalAtan()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalAtan ( const NodeIn node)
inlineprotected

Definition at line 533 of file evaluator.hpp.

◆ evalAtomicOperation()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
void CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalAtomicOperation ( const NodeIn node)
inlineprotected

Definition at line 680 of file evaluator.hpp.

◆ evalCG()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalCG ( const CG< ScalarIn > &  dep)
inlineprotectedinherited

Definition at line 216 of file evaluator.hpp.

◆ evalCompareEq()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalCompareEq ( const NodeIn node)
inlineprotected

Definition at line 551 of file evaluator.hpp.

◆ evalCompareGe()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalCompareGe ( const NodeIn node)
inlineprotected

Definition at line 557 of file evaluator.hpp.

◆ evalCompareGt()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalCompareGt ( const NodeIn node)
inlineprotected

Definition at line 563 of file evaluator.hpp.

◆ evalCompareLe()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalCompareLe ( const NodeIn node)
inlineprotected

Definition at line 545 of file evaluator.hpp.

◆ evalCompareLt()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalCompareLt ( const NodeIn node)
inlineprotected

Definition at line 539 of file evaluator.hpp.

◆ evalCompareNe()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalCompareNe ( const NodeIn node)
inlineprotected

Definition at line 569 of file evaluator.hpp.

◆ evalCos()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalCos ( const NodeIn node)
inlineprotected

Definition at line 581 of file evaluator.hpp.

◆ evalCosh()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalCosh ( const NodeIn node)
inlineprotected

Definition at line 575 of file evaluator.hpp.

◆ evalDiv()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalDiv ( const NodeIn node)
inlineprotected

Definition at line 587 of file evaluator.hpp.

◆ evalExp()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalExp ( const NodeIn node)
inlineprotected

Definition at line 593 of file evaluator.hpp.

◆ evalIndependent()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalIndependent ( const NodeIn node)
inlineprotected

Definition at line 599 of file evaluator.hpp.

◆ evalLog()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalLog ( const NodeIn node)
inlineprotected

Definition at line 604 of file evaluator.hpp.

◆ evalMinus()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalMinus ( const NodeIn node)
inlineprotected

Definition at line 670 of file evaluator.hpp.

◆ evalMul()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalMul ( const NodeIn node)
inlineprotected

Definition at line 610 of file evaluator.hpp.

◆ evalOperation()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, 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()

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

Definition at line 242 of file evaluator.hpp.

◆ evalPow()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalPow ( const NodeIn node)
inlineprotected

Definition at line 616 of file evaluator.hpp.

◆ evalPrint()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalPrint ( const NodeIn node)
inlineprotected

Definition at line 622 of file evaluator.hpp.

◆ evalSign()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalSign ( const NodeIn node)
inlineprotected

Definition at line 628 of file evaluator.hpp.

◆ evalSin()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalSin ( const NodeIn node)
inlineprotected

Definition at line 640 of file evaluator.hpp.

◆ evalSinh()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalSinh ( const NodeIn node)
inlineprotected

Definition at line 634 of file evaluator.hpp.

◆ evalSparseArrayCreationOperation()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
std::vector< ActiveOut > & CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalSparseArrayCreationOperation ( const OperationNode< ScalarIn > &  node)
inlineprotectedinherited

Definition at line 306 of file evaluator.hpp.

◆ evalSqrt()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalSqrt ( const NodeIn node)
inlineprotected

Definition at line 646 of file evaluator.hpp.

◆ evalSub()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalSub ( const NodeIn node)
inlineprotected

Definition at line 652 of file evaluator.hpp.

◆ evalTan()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalTan ( const NodeIn node)
inlineprotected

Definition at line 664 of file evaluator.hpp.

◆ evalTanh()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalTanh ( const NodeIn node)
inlineprotected

Definition at line 658 of file evaluator.hpp.

◆ evaluate() [1/3]

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() [2/3]

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 CppAD::cg::CodeHandler< Base >::collectVariable(), CppAD::cg::CodeHandler< Base >::collectVariableAddSub(), CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evaluate(), CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evaluate(), CppAD::cg::BipartiteGraph< Base >::generateNewModel(), and CppAD::cg::DummyDerivatives< Base >::generateReorderedModel().

◆ evaluate() [3/3]

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()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
ActiveOut CppAD::cg::EvaluatorOperations< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalUnsupportedOperation ( const NodeIn node)
inlineprotected

Definition at line 676 of file evaluator.hpp.

◆ isUnderEvaluation()

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

Definition at line 78 of file evaluator.hpp.

◆ prepareNewEvaluation()

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
void CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::prepareNewEvaluation ( )
inlineprotectedinherited

Definition at line 190 of file evaluator.hpp.

◆ processActiveOut()

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

Definition at line 684 of file evaluator.hpp.

◆ saveEvaluation()

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.

Friends And Related Symbol Documentation

◆ EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
friend class EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >
friend

must be friends with its super classes since there can be a cast to this type due to the curiously recurring template pattern (CRTP)

Definition at line 306 of file evaluator.hpp.

Member Data Documentation

◆ depth_

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
size_t CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::depth_
protectedinherited

Definition at line 56 of file evaluator.hpp.

◆ evals_

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
CodeHandlerVector<ScalarIn, std::unique_ptr<ActiveOut> > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evals_
protectedinherited

Definition at line 52 of file evaluator.hpp.

◆ evalsArrays_

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
std::map<size_t, std::vector<ActiveOut>* > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalsArrays_
protectedinherited

Definition at line 53 of file evaluator.hpp.

◆ evalsSparseArrays_

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
std::map<size_t, std::vector<ActiveOut>* > CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::evalsSparseArrays_
protectedinherited

Definition at line 54 of file evaluator.hpp.

◆ handler_

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
CodeHandler<ScalarIn>& CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::handler_
protectedinherited

Definition at line 50 of file evaluator.hpp.

◆ indep_

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
const ActiveOut* CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::indep_
protectedinherited

Definition at line 51 of file evaluator.hpp.

◆ path_

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
SourceCodePath CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::path_
protectedinherited

Definition at line 57 of file evaluator.hpp.

◆ underEval_

template<class ScalarIn , class ScalarOut , class ActiveOut , class FinalEvaluatorType >
bool CppAD::cg::EvaluatorBase< ScalarIn, ScalarOut, ActiveOut, FinalEvaluatorType >::underEval_
protectedinherited

Definition at line 55 of file evaluator.hpp.


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