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

Public Types

using iterator = typename std::vector< Argument< Base > >::iterator
 
using const_iterator = typename std::vector< Argument< Base > >::const_iterator
 
using const_reverse_iterator = typename std::vector< Argument< Base > >::const_reverse_iterator
 
using reverse_iterator = typename std::vector< Argument< Base > >::reverse_iterator
 

Public Member Functions

const LoopStartOperationNode< Base > & getLoopStart () const
 
void makeAlias (const Argument< Base > &other)
 
CodeHandler< Base > * getCodeHandler () const
 
CGOpCode getOperationType () const
 
void setOperation (CGOpCode op, const std::vector< Argument< Base > > &arguments=std::vector< Argument< Base > >())
 
const std::vector< Argument< Base > > & getArguments () const
 
std::vector< Argument< Base > > & getArguments ()
 
const std::vector< size_t > & getInfo () const
 
std::vector< size_t > & getInfo ()
 
const std::string * getName () const
 
void setName (const std::string &name)
 
void clearName ()
 
size_t getHandlerPosition () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator crend () const noexcept
 

Static Public Member Functions

static std::unique_ptr< OperationNode< Base > > makeTemporaryNode (CGOpCode op, const std::vector< size_t > &info, const std::vector< Argument< Base > > &args)
 

Static Public Attributes

static const std::set< CGOpCode > CUSTOM_NODE_CLASS = makeCustomNodeClassesSet()
 

Protected Member Functions

 LoopEndOperationNode (CodeHandler< Base > *handler, LoopStartOperationNode< Base > &loopStart, const std::vector< Argument< Base > > &endArgs)
 
void setHandlerPosition (size_t pos)
 

Static Protected Member Functions

static std::set< CGOpCode > makeCustomNodeClassesSet () noexcept
 

Friends

class CodeHandler< Base >
 

Detailed Description

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

An operation node that marks the end of a loop.

This is a custom OperationNode class and therefore cannot be transformed into any other node type (makeAlias() and setOperation() might not work).

Author
Joao Leal

Definition at line 90 of file declare_cg.hpp.

Member Function Documentation

◆ clearName()

template<class Base>
void CppAD::cg::OperationNode< Base >::clearName ( )
inlineinherited

Clears any name assigned to this node.

Definition at line 169 of file operation_node.hpp.

◆ getArguments() [1/2]

template<class Base>
const std::vector<Argument<Base> >& CppAD::cg::OperationNode< Base >::getArguments ( ) const
inlineinherited

Provides the arguments used in the operation represented by this node.

Returns
the arguments for the operation in this node (read-only)

Definition at line 117 of file operation_node.hpp.

Referenced by CppAD::cg::ArrayIdCompresser< Base >::ArrayIdCompresser(), CppAD::cg::CodeHandler< ScalarOut >::breakCyclicDependency(), CppAD::cg::LanguageMathML< Base >::createHtmlID(), CppAD::cg::CodeHandler< ScalarOut >::dependentAdded2EvaluationQueue(), CppAD::cg::EvaluatorCG< Scalar, Scalar, EvaluatorCloneSolve< Scalar > >::evalArrayElement(), CppAD::cg::EvaluatorCG< Scalar, Scalar, EvaluatorCloneSolve< Scalar > >::evalPrint(), CppAD::cg::EvaluatorAD< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CppAD::AD< ScalarOut > > >::evalPrint(), CppAD::cg::CodeHandler< ScalarOut >::findLastTemporaryLocation(), CppAD::cg::CodeHandler< ScalarOut >::findPaths(), CppAD::cg::BidirGraph< Scalar >::findSingleBifurcation(), CppAD::cg::LangCDefaultHessianVarNameGenerator< Base >::generateIndexedIndependent(), CppAD::cg::LangCDefaultReverse2VarNameGenerator< Base >::generateIndexedIndependent(), CppAD::cg::LangCDefaultVariableNameGenerator< Base >::isInSameTemporaryVarArray(), CppAD::cg::LangLatexDefaultVariableNameGenerator< Base >::isInSameTemporaryVarArray(), CppAD::cg::LangMathMLDefaultVariableNameGenerator< Base >::isInSameTemporaryVarArray(), CppAD::cg::LanguageDot< Base >::printArrayCreationUsingLoop(), CppAD::cg::LanguageMathML< Base >::printArrayCreationUsingLoop(), CppAD::cg::LanguageLatex< Base >::printArrayCreationUsingLoop(), CppAD::cg::LanguageC< Base >::printArrayCreationUsingLoop(), CppAD::cg::LanguageDot< Base >::printAtomicForwardOp(), CppAD::cg::LanguageMathML< Base >::printAtomicForwardOp(), CppAD::cg::LanguageLatex< Base >::printAtomicForwardOp(), CppAD::cg::LanguageDot< Base >::printAtomicReverseOp(), CppAD::cg::LanguageMathML< Base >::printAtomicReverseOp(), CppAD::cg::LanguageLatex< Base >::printAtomicReverseOp(), CppAD::cg::LanguageDot< Base >::printConditionalAssignment(), CppAD::cg::LanguageC< Base >::pushAtomicForwardOp(), CppAD::cg::LanguageC< Base >::pushAtomicReverseOp(), CppAD::cg::CodeHandler< ScalarOut >::reorderOperations(), CppAD::cg::LanguageDot< Base >::requiresVariableDependencies(), CppAD::cg::LanguageLatex< Base >::requiresVariableDependencies(), CppAD::cg::LanguageC< Base >::requiresVariableDependencies(), CppAD::cg::ArrayIdCompresser< Base >::reserveArraySpace(), and CppAD::cg::CodeHandler< ScalarOut >::updateTemporaryVarInDiffScopes().

◆ getArguments() [2/2]

template<class Base>
std::vector<Argument<Base> >& CppAD::cg::OperationNode< Base >::getArguments ( )
inlineinherited

Provides the arguments used in the operation represented by this node.

Returns
the arguments for the operation in this node

Definition at line 126 of file operation_node.hpp.

◆ getCodeHandler()

template<class Base>
CodeHandler<Base>* CppAD::cg::OperationNode< Base >::getCodeHandler ( ) const
inlineinherited

Provides the source code handler that owns this node. It can only be null for temporary nodes.

Returns
a CodeHandler which owns this nodes memory (possibly null)

Definition at line 85 of file operation_node.hpp.

◆ getHandlerPosition()

template<class Base>
size_t CppAD::cg::OperationNode< Base >::getHandlerPosition ( ) const
inlineinherited

◆ getInfo() [1/2]

◆ getInfo() [2/2]

template<class Base>
std::vector<size_t>& CppAD::cg::OperationNode< Base >::getInfo ( )
inlineinherited

Provides additional information used in the operation.

Returns
the additional operation information/options

Definition at line 142 of file operation_node.hpp.

◆ getName()

◆ getOperationType()

template<class Base>
CGOpCode CppAD::cg::OperationNode< Base >::getOperationType ( ) const
inlineinherited

Provides the operation type represented by this node.

Returns
Mathematical operation type which this node is the result of.

Definition at line 93 of file operation_node.hpp.

Referenced by CppAD::cg::DummyDerivatives< Base >::assignVar2Equation(), CppAD::cg::CodeHandler< ScalarOut >::breakCyclicDependency(), CppAD::cg::CodeHandler< ScalarOut >::checkVariableCreation(), CppAD::cg::EvaluatorBase< ScalarIn, double, adouble, Evaluator< ScalarIn, double, adouble > >::clear(), CppAD::cg::LanguageMathML< Base >::createHtmlID(), CppAD::cg::LanguageDot< Base >::createsNewVariable(), CppAD::cg::LanguageMathML< Base >::createsNewVariable(), CppAD::cg::LanguageLatex< Base >::createsNewVariable(), CppAD::cg::LanguageC< Base >::createsNewVariable(), CppAD::cg::EquationPattern< Base >::detectNonIndexedIndependents(), CppAD::cg::CodeHandler< ScalarOut >::determineLastTempVarUsage(), CppAD::cg::LanguageDot< Base >::directlyAssignsVariable(), CppAD::cg::LanguageMathML< Base >::directlyAssignsVariable(), CppAD::cg::LanguageLatex< Base >::directlyAssignsVariable(), CppAD::cg::LanguageC< Base >::directlyAssignsVariable(), CppAD::cg::EvaluatorAD< ScalarIn, ScalarOut, Evaluator< ScalarIn, ScalarOut, CppAD::AD< ScalarOut > > >::evalAtomicOperation(), CppAD::cg::EvaluatorCG< Scalar, Scalar, EvaluatorCloneSolve< Scalar > >::evalAtomicOperation(), CppAD::cg::EvaluatorOperations< ScalarIn, double, adouble, Evaluator< ScalarIn, double, adouble > >::evalOperation(), CppAD::cg::CodeHandler< ScalarOut >::findLastTemporaryLocation(), CppAD::cg::CodeHandler< ScalarOut >::findVariableDependencies(), CppAD::cg::CodeHandler< ScalarOut >::generateCode(), CppAD::cg::LangCDefaultVariableNameGenerator< Base >::generateIndexedDependent(), CppAD::cg::LangLatexDefaultVariableNameGenerator< Base >::generateIndexedDependent(), CppAD::cg::LangMathMLDefaultVariableNameGenerator< Base >::generateIndexedDependent(), CppAD::cg::LangCDefaultHessianVarNameGenerator< Base >::generateIndexedIndependent(), CppAD::cg::LangCDefaultReverse2VarNameGenerator< Base >::generateIndexedIndependent(), CppAD::cg::LangCDefaultVariableNameGenerator< Base >::generateIndexedIndependent(), CppAD::cg::LangLatexDefaultVariableNameGenerator< Base >::generateIndexedIndependent(), CppAD::cg::LangMathMLDefaultVariableNameGenerator< Base >::generateIndexedIndependent(), CppAD::cg::DummyDerivatives< Base >::generateSemiExplicitDAE(), CppAD::cg::LanguageDot< Base >::generateSourceCode(), CppAD::cg::LanguageMathML< Base >::generateSourceCode(), CppAD::cg::LanguageC< Base >::generateSourceCode(), CppAD::cg::LanguageLatex< Base >::generateSourceCode(), CppAD::cg::DependentPatternMatcher< Base >::generateTapes(), CppAD::cg::LangCDefaultVariableNameGenerator< Base >::generateTemporaryArray(), CppAD::cg::LangLatexDefaultVariableNameGenerator< Base >::generateTemporaryArray(), CppAD::cg::LangMathMLDefaultVariableNameGenerator< Base >::generateTemporaryArray(), CppAD::cg::LangCDefaultVariableNameGenerator< Base >::generateTemporarySparseArray(), CppAD::cg::LangLatexDefaultVariableNameGenerator< Base >::generateTemporarySparseArray(), CppAD::cg::LangMathMLDefaultVariableNameGenerator< Base >::generateTemporarySparseArray(), CppAD::cg::CodeHandler< ScalarOut >::getIndependentVariableIndex(), CppAD::cg::CodeHandler< Base >::LoopData::getLoopName(), CppAD::cg::CodeHandler< ScalarOut >::handleTemporaryVarInDiffScopes(), CppAD::cg::LangCDefaultHessianVarNameGenerator< Base >::isInSameIndependentArray(), CppAD::cg::LangCDefaultReverse2VarNameGenerator< Base >::isInSameIndependentArray(), CppAD::cg::CodeHandler< ScalarOut >::markCodeBlockUsed(), CppAD::cg::IndependentNodeSorter< Base >::operator()(), CppAD::cg::CodeHandler< ScalarOut >::optimizeIfs(), CppAD::cg::LanguageMathML< Base >::printArrayCreationUsingLoop(), CppAD::cg::LanguageLatex< Base >::printArrayCreationUsingLoop(), CppAD::cg::LanguageC< Base >::printArrayCreationUsingLoop(), CppAD::cg::LanguageMathML< Base >::printArrayStructInit(), CppAD::cg::LanguageLatex< Base >::printArrayStructInit(), CppAD::cg::LanguageDot< Base >::printElse(), CppAD::cg::LanguageMathML< Base >::printElse(), CppAD::cg::LanguageLatex< Base >::printElse(), CppAD::cg::LanguageDot< Base >::printElseIf(), CppAD::cg::LanguageMathML< Base >::printElseIf(), CppAD::cg::LanguageLatex< Base >::printElseIf(), CppAD::cg::LanguageDot< Base >::printIndexAssign(), CppAD::cg::LanguageDot< Base >::printLoopStart(), CppAD::cg::LanguageDot< Base >::printStartIf(), CppAD::cg::LanguageMathML< Base >::printStartIf(), CppAD::cg::LanguageLatex< Base >::printStartIf(), CppAD::cg::LanguageC< Base >::pushElse(), CppAD::cg::LanguageC< Base >::pushElseIf(), CppAD::cg::LanguageC< Base >::pushStartIf(), CppAD::cg::CodeHandler< ScalarOut >::removeIndependent(), CppAD::cg::LanguageDot< Base >::requiresVariableDependencies(), CppAD::cg::LanguageLatex< Base >::requiresVariableDependencies(), CppAD::cg::LanguageC< Base >::requiresVariableDependencies(), CppAD::cg::ArrayIdCompresser< Base >::reserveArraySpace(), CppAD::cg::CodeHandler< ScalarOut >::restoreTemporaryVar(), CppAD::cg::CodeHandler< ScalarOut >::updateTemporaryVarInDiffScopes(), and CppAD::cg::Loop< Base >::~Loop().

◆ makeAlias()

template<class Base>
void CppAD::cg::OperationNode< Base >::makeAlias ( const Argument< Base > &  other)
inlineinherited

Changes the current operation type into an Alias.

Parameters
otherthe operation node or value this node is going to reference

Definition at line 70 of file operation_node.hpp.

Referenced by CppAD::cg::CodeHandler< ScalarOut >::substituteIndependent().

◆ makeTemporaryNode()

template<class Base>
static std::unique_ptr<OperationNode<Base> > CppAD::cg::OperationNode< Base >::makeTemporaryNode ( CGOpCode  op,
const std::vector< size_t > &  info,
const std::vector< Argument< Base > > &  args 
)
inlinestaticinherited

Creates a temporary operation node.

Warning
This node should never be provided to a CodeHandler.

Definition at line 306 of file operation_node.hpp.

◆ setName()

◆ setOperation()

template<class Base>
void CppAD::cg::OperationNode< Base >::setOperation ( CGOpCode  op,
const std::vector< Argument< Base > > &  arguments = std::vector<Argument<Base> >() 
)
inlineinherited

Changes the current operation type. The previous operation information/options might also have to be changed, use getInfo() to change it if required.

Parameters
opthe new operation type
argumentsthe arguments for the new operation

Definition at line 104 of file operation_node.hpp.

Referenced by CppAD::cg::CodeHandler< ScalarOut >::undoSubstituteIndependent().


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