CppADCodeGen  HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
CppAD::cg::LanguageGenerationData< Base > Class Template Reference
Collaboration diagram for CppAD::cg::LanguageGenerationData< Base >:
Collaboration graph

Public Types

using Node = OperationNode< Base >
 
using ScopeIDType = typename CodeHandler< Base >::ScopeIDType
 

Public Member Functions

 LanguageGenerationData (const std::vector< Node *> &ind, const ArrayView< CG< Base > > &dep, size_t minTempVID, const CodeHandlerVector< Base, size_t > &varIds, const std::vector< Node *> &vo, const std::vector< std::set< Node *>> &variableDependencies, VariableNameGenerator< Base > &ng, const std::map< size_t, size_t > &atomicId2Index, const std::map< size_t, std::string > &atomicId2Name, const std::vector< int > &atomicMaxForward, const std::vector< int > &atomicMaxReverse, const bool ri, const std::set< const Node *> &indexes, const std::set< RandomIndexPattern *> &idxRandomPatterns, const std::vector< IndexPattern *> &dependentIndexPatterns, const std::vector< IndexPattern *> &independentIndexPatterns, const CodeHandlerVector< Base, size_t > &totalUseCount, const CodeHandlerVector< Base, ScopeIDType > &scope, IndexOperationNode< Base > &auxIterationIndexOp, bool zero)
 

Public Attributes

const std::vector< Node * > & independent
 
const ArrayView< CG< Base > > & dependent
 
size_t minTemporaryVarID
 
const CodeHandlerVector< Base, size_t > & varId
 
const std::vector< Node * > & variableOrder
 
const std::vector< std::set< Node * > > & variableDependencies
 
VariableNameGenerator< Base > & nameGen
 
const std::map< size_t, size_t > & atomicFunctionId2Index
 
const std::map< size_t, std::string > & atomicFunctionId2Name
 
const std::vector< int > & atomicFunctionsMaxForward
 
const std::vector< int > & atomicFunctionsMaxReverse
 
const bool reuseIDs
 
const std::set< const Node * > & indexes
 
const std::set< RandomIndexPattern * > & indexRandomPatterns
 
const std::vector< IndexPattern * > & loopDependentIndexPatterns
 
const std::vector< IndexPattern * > & loopIndependentIndexPatterns
 
const CodeHandlerVector< Base, size_t > & totalUseCount
 
const CodeHandlerVector< Base, ScopeIDType > & scope
 
IndexOperationNode< Base > & auxIterationIndexOp
 
const bool zeroDependents
 

Detailed Description

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

Information required for the generation of source code for a language

Author
Joao Leal

Definition at line 28 of file language.hpp.

Member Data Documentation

◆ atomicFunctionId2Index

template<class Base>
const std::map<size_t, size_t>& CppAD::cg::LanguageGenerationData< Base >::atomicFunctionId2Index

maps atomic function IDs to their internal index

Definition at line 65 of file language.hpp.

◆ atomicFunctionId2Name

template<class Base>
const std::map<size_t, std::string>& CppAD::cg::LanguageGenerationData< Base >::atomicFunctionId2Name

maps atomic function IDs to their names

Definition at line 69 of file language.hpp.

Referenced by CppAD::cg::LanguageDot< Base >::printAtomicForwardOp(), and CppAD::cg::LanguageDot< Base >::printAtomicReverseOp().

◆ atomicFunctionsMaxForward

template<class Base>
const std::vector<int>& CppAD::cg::LanguageGenerationData< Base >::atomicFunctionsMaxForward

the maximum forward mode order each atomic function is called (-1 means forward mode not used)

Definition at line 74 of file language.hpp.

◆ atomicFunctionsMaxReverse

template<class Base>
const std::vector<int>& CppAD::cg::LanguageGenerationData< Base >::atomicFunctionsMaxReverse

the maximum reverse mode order each atomic function is called (-1 means reverse mode not used)

Definition at line 79 of file language.hpp.

◆ auxIterationIndexOp

template<class Base>
IndexOperationNode<Base>& CppAD::cg::LanguageGenerationData< Base >::auxIterationIndexOp

Auxiliary index (might not be used)

Definition at line 103 of file language.hpp.

◆ dependent

template<class Base>
const ArrayView<CG<Base> >& CppAD::cg::LanguageGenerationData< Base >::dependent

The dependent variables

Definition at line 40 of file language.hpp.

◆ independent

template<class Base>
const std::vector<Node *>& CppAD::cg::LanguageGenerationData< Base >::independent

The independent variables

Definition at line 36 of file language.hpp.

◆ minTemporaryVarID

template<class Base>
size_t CppAD::cg::LanguageGenerationData< Base >::minTemporaryVarID

The lowest ID used for temporary variables

Definition at line 44 of file language.hpp.

◆ nameGen

template<class Base>
VariableNameGenerator<Base>& CppAD::cg::LanguageGenerationData< Base >::nameGen

Provides the rules for variable name creation

Definition at line 61 of file language.hpp.

◆ reuseIDs

template<class Base>
const bool CppAD::cg::LanguageGenerationData< Base >::reuseIDs

a flag indicating whether or not temporary variable IDs have been recycled

Definition at line 83 of file language.hpp.

◆ scope

template<class Base>
const CodeHandlerVector<Base, ScopeIDType>& CppAD::cg::LanguageGenerationData< Base >::scope

scope of each managed operation node

Definition at line 99 of file language.hpp.

◆ totalUseCount

template<class Base>
const CodeHandlerVector<Base, size_t>& CppAD::cg::LanguageGenerationData< Base >::totalUseCount

the total number of times the result of an operation node is used

Definition at line 95 of file language.hpp.

◆ variableDependencies

template<class Base>
const std::vector<std::set<Node*> >& CppAD::cg::LanguageGenerationData< Base >::variableDependencies

maps dependencies between variables in variableOrder

Definition at line 57 of file language.hpp.

◆ variableOrder

template<class Base>
const std::vector<Node*>& CppAD::cg::LanguageGenerationData< Base >::variableOrder

Variable assignment order in the source code

Definition at line 53 of file language.hpp.

◆ varId

template<class Base>
const CodeHandlerVector<Base, size_t>& CppAD::cg::LanguageGenerationData< Base >::varId

Provides the variable ID that was altered/assigned to operation nodes. Zero means that no variable is assigned.

Definition at line 49 of file language.hpp.

◆ zeroDependents

template<class Base>
const bool CppAD::cg::LanguageGenerationData< Base >::zeroDependents

whether or not the dependent variables should be zeroed before executing the operation graph

Definition at line 108 of file language.hpp.


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