CppADCodeGen
HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
|
Public Types | |
using | CGBase = CG< Base > |
Public Member Functions | |
DependentPatternMatcher (const std::vector< std::set< size_t > > &relatedDepCandidates, const std::vector< CGBase > &dependents, const std::vector< CGBase > &independents) | |
const std::vector< EquationPattern< Base > * > & | getEquationPatterns () const |
const std::vector< Loop< Base > * > & | getLoops () const |
virtual void | generateTapes (LoopFreeModel< Base > *&nonLoopTape, std::set< LoopModel< Base > *> &loopTapes) |
Finds common patterns in operation graphs
Definition at line 99 of file declare_cg.hpp.
|
inline |
Creates a new DependentPatternMatcher
relatedDepCandidates | Groups of dependent variable indexes that are believed to have the same expression pattern. |
dependents | The dependent variable values |
independents | The independent variable values |
Definition at line 113 of file dependent_pattern_matcher.hpp.
|
inlinevirtual |
Detects common equation patterns and generates a new tape for the model using loops. This method should only be called once!
nonLoopTape | The new tape without the loops or nullptr if there are no non-indexed expressions in the model |
loopTapes | The models for each loop (must be deleted by the user) |
Definition at line 148 of file dependent_pattern_matcher.hpp.