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

Public Types

using Node = OperationNode< Base >
 

Protected Member Functions

virtual void generateSourceCode (std::ostream &out, std::unique_ptr< LanguageGenerationData< Base > > info)=0
 
virtual bool createsNewVariable (const Node &op, size_t totalUseCount, size_t opCount) const =0
 
virtual bool requiresVariableArgument (enum CGOpCode op, size_t argIndex) const =0
 
virtual bool requiresVariableDependencies () const =0
 

Friends

class CodeHandler< Base >
 

Detailed Description

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

Creates the source code for a specific language

Author
Joao Leal

Definition at line 160 of file language.hpp.

Member Function Documentation

◆ createsNewVariable()

template<class Base>
virtual bool CppAD::cg::Language< Base >::createsNewVariable ( const Node op,
size_t  totalUseCount,
size_t  opCount 
) const
protectedpure virtual

Whether or not a new variable is created as a result of this operation

Parameters
opOperation
totalUseCountthe number of times this node has been used as an argument in other operations
Returns
true if a new variable is created

Implemented in CppAD::cg::LanguageC< Base >, CppAD::cg::LanguageLatex< Base >, CppAD::cg::LanguageMathML< Base >, and CppAD::cg::LanguageDot< Base >.

◆ requiresVariableDependencies()

template<class Base>
virtual bool CppAD::cg::Language< Base >::requiresVariableDependencies ( ) const
protectedpure virtual

Whether or not this language can use information regarding the dependencies between different equations/variables.

Implemented in CppAD::cg::LanguageC< Base >, CppAD::cg::LanguageLatex< Base >, CppAD::cg::LanguageDot< Base >, and CppAD::cg::LanguageMathML< Base >.

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


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