Code generation backends for CoreNEURON.
More...
Code generation backends for CoreNEURON.
Code generation backends for NEURON.
◆ print_function_declaration() [1/2]
template<typename T >
void nmodl::codegen::CodegenNeuronCppVisitor::print_function_declaration |
( |
const T & |
node, |
|
|
const std::string & |
name |
|
) |
| |
|
protected |
Print prototype declarations of functions or procedures.
- Template Parameters
-
- Parameters
-
node | The AST node representing the function or procedure block |
name | A user defined name for the function |
If there is an argument with name (say alpha) same as range variable (say alpha), we want to avoid it being printed as instance->alpha. And hence we disable variable name lookup during prototype declaration. Note that the name of procedure can be different in case of table statement.
TODO: Edit for NEURON
Definition at line 682 of file codegen_neuron_cpp_visitor.hpp.
◆ print_function_declaration() [2/2]
template<typename T >
void nmodl::codegen::CodegenCoreneuronCppVisitor::print_function_declaration |
( |
const T & |
node, |
|
|
const std::string & |
name |
|
) |
| |
|
protected |
Print prototype declarations of functions or procedures.
- Template Parameters
-
- Parameters
-
node | The AST node representing the function or procedure block |
name | A user defined name for the function |
If there is an argument with name (say alpha) same as range variable (say alpha), we want to avoid it being printed as instance->alpha. And hence we disable variable name lookup during prototype declaration. Note that the name of procedure can be different in case of table statement.
Definition at line 1132 of file codegen_coreneuron_cpp_visitor.hpp.
◆ print_vector_elements()
template<typename T >
void nmodl::codegen::CodegenCppVisitor::print_vector_elements |
( |
const std::vector< T > & |
elements, |
|
|
const std::string & |
separator, |
|
|
const std::string & |
prefix = "" |
|
) |
| |
|
protected |
Print the items in a vector as a list.
This function prints a given vector of elements as a list with given separator onto the current printer. Elements are expected to be of type nmodl::ast::Ast and are printed by being visited. Care is taken to omit the separator after the the last element.
- Template Parameters
-
- Parameters
-
elements | The vector of elements to be printed |
separator | The separator string to print between all elements |
prefix | A prefix string to print before each element |
Definition at line 1350 of file codegen_cpp_visitor.hpp.