CppADCodeGen 2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
|
#include <lang_c_custom_var_name_gen.hpp>
Static Protected Member Functions | |
static std::vector< const OperationNode< Base > * > | getIndexes (const OperationNode< Base > &var, size_t offset) |
Protected Attributes | |
const std::vector< std::string > | depNames_ |
const std::vector< std::string > | indepNames_ |
std::stringstream | _ss |
std::string | _depName |
std::string | _indepName |
std::string | _tmpName |
std::string | _tmpArrayName |
std::string | _tmpSparseArrayName |
size_t | _minTemporaryID |
size_t | _maxTemporaryID |
size_t | _maxTemporaryArrayID |
size_t | _maxTemporarySparseArrayID |
std::vector< FuncArgument > | _dependent |
std::vector< FuncArgument > | _independent |
std::vector< FuncArgument > | _temporary |
Creates variables names for the source code using a list of provided custom names.
Definition at line 29 of file lang_c_custom_var_name_gen.hpp.
|
inline |
Definition at line 36 of file lang_c_custom_var_name_gen.hpp.
|
inlinevirtualinherited |
Definition at line 312 of file variable_name_generator.hpp.
|
inlinevirtualinherited |
Definition at line 318 of file variable_name_generator.hpp.
|
inlineoverridevirtual |
Creates a name for a dependent variable.
index | the dependent variable index |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 49 of file lang_c_custom_var_name_gen.hpp.
|
inlineoverridevirtual |
Creates a name for a dependent variable.
variable | the node representing the independent variable |
id | an ID assigned by the CodeHandler to the operation node (unique for independent variables) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 57 of file lang_c_custom_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Creates a name for a reference to an indexed dependent variable expression.
var | the node representing an indexed dependent variable |
id | an ID assigned by the CodeHandler to the operation node (potentially not unique) |
ip | the index pattern |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 149 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Creates a name for a reference to an indexed independent variable expression.
var | the node representing an indexed independent variable |
id | an ID assigned by the CodeHandler to the operation node (unique for indexed independent variables) |
ip | the index pattern |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 163 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Creates a name for a temporary variable.
variable | the node representing the temporary variable |
id | an ID assigned by the CodeHandler to the operation node (potentially not unique) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 111 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Creates a name for a temporary dense array variable.
variable | the node representing the dense array variable creation |
id | an ID assigned by the CodeHandler to the operation node (potentially not unique) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 125 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Creates a name for a temporary sparse array variable.
variable | the node representing the sparse array variable creation |
id | an ID assigned by the CodeHandler to the operation node (potentially not unique) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 137 of file lang_c_default_var_name_gen.hpp.
|
inlinevirtualinherited |
Provides the dependent variable arguments used by a function.
Reimplemented in CppAD::cg::LangCDefaultHessianVarNameGenerator< Base >, and CppAD::cg::LangCDefaultReverse2VarNameGenerator< Base >.
Definition at line 56 of file variable_name_generator.hpp.
Referenced by CppAD::cg::LanguageC< Base >::generateSourceCode(), CppAD::cg::LanguageDot< Base >::generateSourceCode(), CppAD::cg::LanguageLatex< Base >::generateSourceCode(), CppAD::cg::LanguageMathML< Base >::generateSourceCode(), CppAD::cg::LangCDefaultHessianVarNameGenerator< Base >::getDependent(), and CppAD::cg::LangCDefaultReverse2VarNameGenerator< Base >::getDependent().
|
inlinevirtualinherited |
Provides the independent variable arguments used by a function.
Definition at line 65 of file variable_name_generator.hpp.
Referenced by CppAD::cg::LanguageC< Base >::generateSourceCode(), CppAD::cg::LanguageDot< Base >::generateSourceCode(), CppAD::cg::LanguageLatex< Base >::generateSourceCode(), and CppAD::cg::LanguageMathML< Base >::generateSourceCode().
|
inlineoverridevirtualinherited |
Provides the index in the associated independent array of an independent variable. It should only be called if independents are saved in an array.
indep | the independent variable node (CGInvOp) |
id | an ID assigned by the CodeHandler to the operation node (unique for independent variable arrays) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 197 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Provides the array name where independent variables are provided to the function. It should only be called if independents are saved in an array.
indep | the independent variable node (CGInvOp) |
id | an ID assigned by the CodeHandler to the operation node (unique for independent variable arrays) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 192 of file lang_c_default_var_name_gen.hpp.
|
inlinestaticprotectedinherited |
Definition at line 242 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Provides the maximum variable ID of temporary dense array variables.
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 84 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Provides the maximum variable ID of temporary sparse array variables.
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 88 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Provides the maximum used variable ID of temporary variables.
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 80 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Provides the minimum variable ID of temporary variables.
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 76 of file lang_c_default_var_name_gen.hpp.
|
inlinevirtualinherited |
Provides the temporary variable arguments used by a function.
Reimplemented in CppAD::cg::LangCDefaultHessianVarNameGenerator< Base >, and CppAD::cg::LangCDefaultReverse2VarNameGenerator< Base >.
Definition at line 74 of file variable_name_generator.hpp.
Referenced by CppAD::cg::LanguageC< Base >::generateSourceCode(), CppAD::cg::LanguageDot< Base >::generateSourceCode(), CppAD::cg::LanguageLatex< Base >::generateSourceCode(), CppAD::cg::LanguageMathML< Base >::generateSourceCode(), CppAD::cg::LanguageC< Base >::generateTemporaryVariableDeclaration(), CppAD::cg::LangCDefaultHessianVarNameGenerator< Base >::getTemporary(), and CppAD::cg::LangCDefaultReverse2VarNameGenerator< Base >::getTemporary().
|
inlineoverridevirtualinherited |
Provides the index in the associated temporary array of a temporary variable. It should only be called if temporary variables are saved in an array.
var | the temporary variable node |
id | an ID assigned by the CodeHandler to the operation node (potentially not unique) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 221 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Provides the array name for the temporary variables. It should only be called if temporary variables are saved in an array.
var | the temporary variable node |
id | an ID assigned by the CodeHandler to the operation node (potentially not unique) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 216 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtual |
Whether or not two independent variables are considered to be part of the same independent variable array at consecutive locations.
indepFirst | the independent node (CGInvOp) with the lower index |
idFirst | an ID assigned by the CodeHandler to the first node (unique for independent variables) |
indepSecond | the independent node (CGInvOp) with the higher index |
idSecond | an ID assigned by the CodeHandler to the second node (unique for independent variables) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 67 of file lang_c_custom_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Whether or not two temporary variables are considered to be part of the same temporary variable array at consecutive locations.
varFirst | the temporary variable node with the lower index |
idFirst | an ID assigned by the CodeHandler to the first node (potentially not unique) |
varSecond | the temporary variable node with the higher index |
varSecond | an ID assigned by the CodeHandler to the second node (potentially not unique) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 226 of file lang_c_default_var_name_gen.hpp.
|
inlineoverridevirtual |
Determines whether or not two independents are part of the same independent variable array.
indep1 | the first independent node (CGInvOp or CGLoopIndexedIndepOp) |
id1 | an ID assigned by the CodeHandler to indep1 (unique for independent variables) |
indep2 | the second independent node (CGInvOp or CGLoopIndexedIndepOp) |
id2 | an ID assigned by the CodeHandler to indep2 (unique for independent variables) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 82 of file lang_c_custom_var_name_gen.hpp.
|
inlineoverridevirtualinherited |
Determines whether or not two temporary variables are part of the same temporary variable array.
var1 | the temporary variable node |
id1 | an ID assigned by the CodeHandler to var1 (potentially not unique) |
var2 | the temporary variable node |
id2 | an ID assigned by the CodeHandler to var2 (potentially not unique) |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 233 of file lang_c_default_var_name_gen.hpp.
|
inlinevirtualinherited |
Definition at line 315 of file variable_name_generator.hpp.
|
inlineoverridevirtualinherited |
Defines the ID ranges used by each variable type.
minTempID | the lowest ID of temporary variables |
maxTempID | the highest used ID of temporary variables |
maxTempArrayID | the highest used ID of temporary dense array variables |
maxTempSparseArrayID | the highest used ID of temporary sparse array variables |
Implements CppAD::cg::VariableNameGenerator< Base >.
Definition at line 177 of file lang_c_default_var_name_gen.hpp.
|
protectedinherited |
Definition at line 46 of file variable_name_generator.hpp.
|
protectedinherited |
Definition at line 33 of file lang_c_default_var_name_gen.hpp.
|
protectedinherited |
Definition at line 47 of file variable_name_generator.hpp.
|
protectedinherited |
Definition at line 35 of file lang_c_default_var_name_gen.hpp.
|
protectedinherited |
Definition at line 47 of file lang_c_default_var_name_gen.hpp.
|
protectedinherited |
Definition at line 45 of file lang_c_default_var_name_gen.hpp.
|
protectedinherited |
Definition at line 49 of file lang_c_default_var_name_gen.hpp.
|
protectedinherited |
Definition at line 43 of file lang_c_default_var_name_gen.hpp.
|
protectedinherited |
Definition at line 31 of file lang_c_default_var_name_gen.hpp.
|
protectedinherited |
Definition at line 48 of file variable_name_generator.hpp.
|
protectedinherited |
Definition at line 39 of file lang_c_default_var_name_gen.hpp.
|
protectedinherited |
Definition at line 37 of file lang_c_default_var_name_gen.hpp.
|
protectedinherited |
Definition at line 41 of file lang_c_default_var_name_gen.hpp.
|
protected |
Definition at line 32 of file lang_c_custom_var_name_gen.hpp.
|
protected |
Definition at line 33 of file lang_c_custom_var_name_gen.hpp.