CppADCodeGen 2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
Loading...
Searching...
No Matches
CppAD::cg::EquationPattern< Base > Class Template Reference

#include <equation_pattern.hpp>

Collaboration diagram for CppAD::cg::EquationPattern< Base >:
Collaboration graph

Public Member Functions

 EquationPattern (const CG< Base > &ref, size_t iDepRef)
 
 EquationPattern (const EquationPattern< Base > &other)=delete
 
EquationPatternoperator= (const EquationPattern< Base > &rhs)=delete
 
bool testAdd (size_t iDep2, const CG< Base > &dep2, size_t &minColor, CodeHandlerVector< Base, size_t > &varColor)
 
void findIndexedPath (size_t dep, const std::vector< CG< Base > > &depVals, CodeHandlerVector< Base, bool > &varIndexed, std::set< const OperationNode< Base > * > &indexedOperations)
 
std::set< const OperationNode< Base > * > findOperationsUsingIndependents (OperationNode< Base > &node) const
 
bool containsConstantIndependent (const OperationNode< Base > *operation, size_t argumentIndex) const
 
void detectNonIndexedIndependents ()
 

Static Public Member Functions

static void uncolor (OperationNode< Base > *node, CodeHandlerVector< Base, bool > &varIndexed)
 

Public Attributes

const CG< Base > & depRef
 
const size_t depRefIndex
 
std::set< size_t > dependents
 
std::map< size_t, std::map< const OperationNode< Base > *, OperationNode< Base > * > > operationEO2Reference
 
IndexedIndependent< Base > indexedOpIndep
 
std::map< const OperationNode< Base > *, std::set< size_t > > constOperationIndependents
 

Detailed Description

template<class Base>
class CppAD::cg::EquationPattern< Base >

Group of variables with the same evaluation pattern (same equation different variables)

Definition at line 64 of file equation_pattern.hpp.

Constructor & Destructor Documentation

◆ EquationPattern()

template<class Base >
CppAD::cg::EquationPattern< Base >::EquationPattern ( const CG< Base > &  ref,
size_t  iDepRef 
)
inlineexplicit

Definition at line 94 of file equation_pattern.hpp.

Member Function Documentation

◆ containsConstantIndependent()

template<class Base >
bool CppAD::cg::EquationPattern< Base >::containsConstantIndependent ( const OperationNode< Base > *  operation,
size_t  argumentIndex 
) const
inline

Definition at line 167 of file equation_pattern.hpp.

◆ detectNonIndexedIndependents()

template<class Base >
void CppAD::cg::EquationPattern< Base >::detectNonIndexedIndependents ( )
inline

Determine which independent variables in the loop model do not require an index (always the same for all iterations)

Definition at line 181 of file equation_pattern.hpp.

◆ findIndexedPath()

template<class Base >
void CppAD::cg::EquationPattern< Base >::findIndexedPath ( size_t  dep,
const std::vector< CG< Base > > &  depVals,
CodeHandlerVector< Base, bool > &  varIndexed,
std::set< const OperationNode< Base > * > &  indexedOperations 
)
inline

Definition at line 136 of file equation_pattern.hpp.

◆ findOperationsUsingIndependents()

template<class Base >
std::set< const OperationNode< Base > * > CppAD::cg::EquationPattern< Base >::findOperationsUsingIndependents ( OperationNode< Base > &  node) const
inline

Definition at line 143 of file equation_pattern.hpp.

◆ testAdd()

template<class Base >
bool CppAD::cg::EquationPattern< Base >::testAdd ( size_t  iDep2,
const CG< Base > &  dep2,
size_t &  minColor,
CodeHandlerVector< Base, size_t > &  varColor 
)
inline

Definition at line 106 of file equation_pattern.hpp.

◆ uncolor()

template<class Base >
static void CppAD::cg::EquationPattern< Base >::uncolor ( OperationNode< Base > *  node,
CodeHandlerVector< Base, bool > &  varIndexed 
)
inlinestatic

Definition at line 153 of file equation_pattern.hpp.

Member Data Documentation

◆ constOperationIndependents

template<class Base >
std::map<const OperationNode<Base>*, std::set<size_t> > CppAD::cg::EquationPattern< Base >::constOperationIndependents

reference operation -> non indexed argument positions

Definition at line 85 of file equation_pattern.hpp.

Referenced by CppAD::cg::EquationPattern< Base >::detectNonIndexedIndependents().

◆ dependents

template<class Base >
std::set<size_t> CppAD::cg::EquationPattern< Base >::dependents

Definition at line 68 of file equation_pattern.hpp.

◆ depRef

template<class Base >
const CG<Base>& CppAD::cg::EquationPattern< Base >::depRef

Definition at line 66 of file equation_pattern.hpp.

◆ depRefIndex

template<class Base >
const size_t CppAD::cg::EquationPattern< Base >::depRefIndex

Definition at line 67 of file equation_pattern.hpp.

◆ indexedOpIndep

template<class Base >
IndexedIndependent<Base> CppAD::cg::EquationPattern< Base >::indexedOpIndep

Maps the operations that used an indexed independents as direct arguments (reference operation -> argument indexes -> dependent <-> independents)

Definition at line 81 of file equation_pattern.hpp.

Referenced by CppAD::cg::Loop< Base >::createLoopModel(), and CppAD::cg::EquationPattern< Base >::detectNonIndexedIndependents().

◆ operationEO2Reference

template<class Base >
std::map<size_t, std::map<const OperationNode<Base>*, OperationNode<Base>*> > CppAD::cg::EquationPattern< Base >::operationEO2Reference

maps node ID used by all dependents to the operations of the reference dependent [dependent index][op] = reference operation

Definition at line 74 of file equation_pattern.hpp.

Referenced by CppAD::cg::Loop< Base >::createLoopModel().


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