From be1b4b616804c9b1a0bf419cc615285e65f8df96 Mon Sep 17 00:00:00 2001 From: iomaganaris Date: Fri, 8 Dec 2023 14:28:32 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20BlueBrai?= =?UTF-8?q?n/nmodl@7dbdd2331ae8fb6c63482a1eead44018dff21612=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...degen_1_1_codegen_acc_visitor-members.html | 8 +- ...dl_1_1codegen_1_1_codegen_acc_visitor.html | 24 +- ...odegen_coreneuron_cpp_visitor-members.html | 8 +- ...en_1_1_codegen_coreneuron_cpp_visitor.html | 304 +- ...egen_1_1_codegen_coreneuron_cpp_visitor.js | 7 +- ...degen_1_1_codegen_cpp_visitor-members.html | 309 +- ...dl_1_1codegen_1_1_codegen_cpp_visitor.html | 219 +- ...modl_1_1codegen_1_1_codegen_cpp_visitor.js | 5 +- ..._1_codegen_neuron_cpp_visitor-members.html | 315 +- ...odegen_1_1_codegen_neuron_cpp_visitor.html | 278 +- ...1codegen_1_1_codegen_neuron_cpp_visitor.js | 4 +- ...assnmodl_1_1visitor_1_1_const_visitor.html | 2 +- .../codegen__acc__visitor_8cpp_source.html | 2 +- ..._coreneuron__cpp__visitor_8hpp_source.html | 1684 ++--- .../codegen__cpp__visitor_8cpp_source.html | 1515 ++-- .../codegen__cpp__visitor_8hpp_source.html | 1166 +-- ...gen__neuron__cpp__visitor_8hpp_source.html | 1042 +-- html/doxygen/functions_func_p.html | 26 +- html/doxygen/functions_p.html | 20 +- html/doxygen/group__codegen__backends.html | 6 +- html/doxygen/group__codegen__backends.js | 16 +- html/doxygen/namespacenmodl_1_1codegen.html | 8 +- html/doxygen/navtreedata.js | 36 +- html/doxygen/navtreeindex14.js | 32 +- html/doxygen/navtreeindex15.js | 282 +- html/doxygen/navtreeindex16.js | 110 +- html/doxygen/navtreeindex17.js | 10 +- html/doxygen/navtreeindex18.js | 10 +- html/doxygen/navtreeindex19.js | 10 +- html/doxygen/navtreeindex20.js | 10 +- html/doxygen/navtreeindex21.js | 10 +- html/doxygen/navtreeindex22.js | 10 +- html/doxygen/navtreeindex23.js | 10 +- html/doxygen/navtreeindex24.js | 10 +- html/doxygen/navtreeindex25.js | 14 +- html/doxygen/navtreeindex26.js | 60 +- html/doxygen/navtreeindex27.js | 10 +- html/doxygen/navtreeindex28.js | 38 +- html/doxygen/navtreeindex29.js | 22 +- html/doxygen/navtreeindex30.js | 10 +- html/doxygen/navtreeindex31.js | 10 +- html/doxygen/navtreeindex32.js | 10 +- html/doxygen/navtreeindex33.js | 4 + html/doxygen/search/all_f.js | 8 +- html/doxygen/search/functions_f.js | 8 +- ..._coreneuron__cpp__visitor_8cpp_source.html | 6733 ++++++++--------- ...gen__neuron__cpp__visitor_8cpp_source.html | 1230 +-- html/doxygen/src_2main_8cpp_source.html | 2 +- 48 files changed, 7950 insertions(+), 7717 deletions(-) diff --git a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor-members.html b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor-members.html index 0468be3b8a..89b0718e15 100644 --- a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor-members.html +++ b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor-members.html @@ -201,7 +201,7 @@ print_fast_imem_calculation() overridenmodl::codegen::CodegenAccVisitorprotectedvirtual print_first_pointer_var_index_getter()nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_function(const ast::FunctionBlock &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - print_function_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual + print_function_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCppVisitorprotectedvirtual print_function_declaration(const T &node, const std::string &name)nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_function_or_procedure(const ast::Block &node, const std::string &name) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_function_procedure_helper(const ast::Block &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual @@ -240,11 +240,11 @@ print_namespace_end() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_namespace_start() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_namespace_stop() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - print_net_event_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCoreneuronCppVisitorprotected + print_net_event_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_net_init()nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_net_init_acc_serial_annotation_block_begin() overridenmodl::codegen::CodegenAccVisitorprotectedvirtual print_net_init_acc_serial_annotation_block_end() overridenmodl::codegen::CodegenAccVisitorprotectedvirtual - print_net_move_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCoreneuronCppVisitorprotected + print_net_move_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_net_receive()nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_net_receive_arg_size_getter()nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_net_receive_buffering(bool need_mech_inst=true)nmodl::codegen::CodegenCoreneuronCppVisitorprotected @@ -258,7 +258,7 @@ print_net_send_buffering()nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_net_send_buffering_cnt_update() const overridenmodl::codegen::CodegenAccVisitorprotectedvirtual print_net_send_buffering_grow() overridenmodl::codegen::CodegenAccVisitorprotectedvirtual - print_net_send_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCoreneuronCppVisitorprotected + print_net_send_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_newtonspace_transfer_to_device() const overridenmodl::codegen::CodegenAccVisitorprotectedvirtual print_nmodl_constants()nmodl::codegen::CodegenCppVisitorprotected print_nrn_alloc() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual diff --git a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor.html b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor.html index cce3ab3754..cf7898bb51 100644 --- a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor.html +++ b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor.html @@ -664,9 +664,6 @@ virtual void print_global_var_struct_decl ()  Instantiate global var instance. More...
  -void print_function_call (const ast::FunctionCall &node) override - Print call to internal or external function. More...
-  void print_top_verbatim_blocks ()  Print top level (global scope) verbatim blocks. More...
  @@ -854,15 +851,15 @@ void print_net_receive_common_code (const ast::Block &node, bool need_mech_inst=true)  Print the common code section for net receive related methods. More...
  -void print_net_send_call (const ast::FunctionCall &node) - Print call to net_send. More...
-  -void print_net_move_call (const ast::FunctionCall &node) - Print call to net_move. More...
-  -void print_net_event_call (const ast::FunctionCall &node) - Print call to net_event. More...
-  +void print_net_send_call (const ast::FunctionCall &node) override + Print call to net_send. More...
+  +void print_net_move_call (const ast::FunctionCall &node) override + Print call to net_move. More...
+  +void print_net_event_call (const ast::FunctionCall &node) override + Print call to net_event. More...
+  void print_net_init ()  Print initial block in the net receive block. More...
  @@ -1052,6 +1049,9 @@ void print_statement_block (const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)  Print any statement block in nmodl with option to (not) print braces. More...
  +virtual void print_function_call (const ast::FunctionCall &node) + Print call to internal or external function. More...
+  void rename_function_arguments ()  Rename function/procedure arguments that conflict with default arguments. More...
  diff --git a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor-members.html b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor-members.html index 439364bc95..7e27838077 100644 --- a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor-members.html +++ b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor-members.html @@ -199,7 +199,7 @@ print_fast_imem_calculation() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_first_pointer_var_index_getter()nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_function(const ast::FunctionBlock &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - print_function_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual + print_function_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCppVisitorprotectedvirtual print_function_declaration(const T &node, const std::string &name)nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_function_or_procedure(const ast::Block &node, const std::string &name) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_function_procedure_helper(const ast::Block &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual @@ -238,11 +238,11 @@ print_namespace_end() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_namespace_start() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_namespace_stop() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - print_net_event_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCoreneuronCppVisitorprotected + print_net_event_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_net_init()nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_net_init_acc_serial_annotation_block_begin()nmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_net_init_acc_serial_annotation_block_end()nmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - print_net_move_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCoreneuronCppVisitorprotected + print_net_move_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_net_receive()nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_net_receive_arg_size_getter()nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_net_receive_buffering(bool need_mech_inst=true)nmodl::codegen::CodegenCoreneuronCppVisitorprotected @@ -256,7 +256,7 @@ print_net_send_buffering()nmodl::codegen::CodegenCoreneuronCppVisitorprotected print_net_send_buffering_cnt_update() constnmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_net_send_buffering_grow()nmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - print_net_send_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCoreneuronCppVisitorprotected + print_net_send_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_newtonspace_transfer_to_device() constnmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_nmodl_constants()nmodl::codegen::CodegenCppVisitorprotected print_nrn_alloc() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual diff --git a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html index e373922cb0..87d155bf3c 100644 --- a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html +++ b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html @@ -649,9 +649,6 @@ virtual void print_instance_struct_delete_from_device ()  Delete the instance struct from the device. More...
  -void print_function_call (const ast::FunctionCall &node) override - Print call to internal or external function. More...
-  void print_top_verbatim_blocks ()  Print top level (global scope) verbatim blocks. More...
  @@ -842,15 +839,15 @@ void print_net_receive_common_code (const ast::Block &node, bool need_mech_inst=true)  Print the common code section for net receive related methods. More...
  -void print_net_send_call (const ast::FunctionCall &node) - Print call to net_send. More...
-  -void print_net_move_call (const ast::FunctionCall &node) - Print call to net_move. More...
-  -void print_net_event_call (const ast::FunctionCall &node) - Print call to net_event. More...
-  +void print_net_send_call (const ast::FunctionCall &node) override + Print call to net_send. More...
+  +void print_net_move_call (const ast::FunctionCall &node) override + Print call to net_move. More...
+  +void print_net_event_call (const ast::FunctionCall &node) override + Print call to net_event. More...
+  void print_net_init ()  Print initial block in the net receive block. More...
  @@ -1052,6 +1049,9 @@ void print_statement_block (const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)  Print any statement block in nmodl with option to (not) print braces. More...
  +virtual void print_function_call (const ast::FunctionCall &node) + Print call to internal or external function. More...
+  void rename_function_arguments ()  Rename function/procedure arguments that conflict with default arguments. More...
  @@ -1301,7 +1301,7 @@

Definition at line 1238 of file codegen_coreneuron_cpp_visitor.hpp.

+

Definition at line 1231 of file codegen_coreneuron_cpp_visitor.hpp.

@@ -1363,7 +1363,7 @@

Definition at line 1260 of file codegen_coreneuron_cpp_visitor.hpp.

+

Definition at line 1253 of file codegen_coreneuron_cpp_visitor.hpp.

@@ -1466,7 +1466,7 @@

Returns
return a tuple <true, array_length> if variable is an array otherwise <false, 0>
-

Definition at line 606 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 569 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1521,7 +1521,7 @@

Returns
The string representing the function call
-

Definition at line 1250 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1213 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1553,7 +1553,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1124 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1087 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1592,7 +1592,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1129 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1092 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1643,7 +1643,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1428 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1391 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1680,7 +1680,7 @@

-

Definition at line 2298 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2261 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1730,7 +1730,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1502 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1465 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1838,7 +1838,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1474 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1437 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1925,7 +1925,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1448 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1411 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1957,7 +1957,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1096 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1059 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1990,7 +1990,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1107 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1070 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2220,7 +2220,7 @@

Returns
True if operator() is const else False
-

Definition at line 951 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 914 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2250,7 +2250,7 @@

Returns
The target code string
-

Definition at line 3056 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3019 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2312,7 +2312,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1139 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1102 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2344,7 +2344,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1151 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1114 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2607,7 +2607,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1575 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1538 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2718,7 +2718,7 @@

Definition at line 2602 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2565 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2803,7 +2803,7 @@

Definition at line 826 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 789 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2834,7 +2834,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3708 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3671 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2863,7 +2863,7 @@

Definition at line 3639 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3602 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2894,7 +2894,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3677 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3640 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2923,7 +2923,7 @@

Definition at line 1606 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1569 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2961,7 +2961,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3649 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3612 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3030,7 +3030,7 @@

Todo:
Data is not derived.

Need to add instance into instance struct? data used here is wrong in AoS because as in original implementation, data is not incremented every iteration for AoS. May be better to derive actual variable names? [resolved now?] slist needs to added as local variable

-

Definition at line 3270 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3233 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3191,7 +3191,7 @@

-

Definition at line 1054 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1017 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3224,7 +3224,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 3552 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3515 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3253,7 +3253,7 @@

Definition at line 1299 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1262 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3291,45 +3291,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 893 of file codegen_coreneuron_cpp_visitor.cpp.

- - - - -

◆ print_function_call()

- -
-
- - - - - -
- - - - - - - - -
void nmodl::codegen::CodegenCoreneuronCppVisitor::print_function_call (const ast::FunctionCallnode)
-
-overrideprotectedvirtual
-
- -

Print call to internal or external function.

-
Parameters
- - -
nodeThe AST node representing a function call
-
-
- -

Implements nmodl::codegen::CodegenCppVisitor.

- -

Definition at line 510 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 856 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3378,7 +3340,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 850 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 813 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3416,7 +3378,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 871 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 834 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3447,7 +3409,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 571 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 534 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3483,7 +3445,7 @@

Definition at line 913 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 876 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3519,7 +3481,7 @@

Definition at line 987 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 950 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3548,7 +3510,7 @@

Definition at line 2684 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2647 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3579,7 +3541,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3668 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3631 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3608,7 +3570,7 @@

Definition at line 3061 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3024 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3657,7 +3619,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2474 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2437 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3716,7 +3678,7 @@

Definition at line 1849 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1812 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3778,7 +3740,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 2272 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2235 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3810,7 +3772,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1866 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1829 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3841,7 +3803,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3620 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3583 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3878,7 +3840,7 @@

Definition at line 2424 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2387 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4034,7 +3996,7 @@

Definition at line 2314 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2277 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4070,7 +4032,7 @@

Definition at line 2250 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2213 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4099,7 +4061,7 @@

Definition at line 2220 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2183 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4128,7 +4090,7 @@

Definition at line 2267 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2230 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4226,7 +4188,7 @@

Definition at line 1335 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1298 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4268,7 +4230,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1706 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1669 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4306,7 +4268,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2178 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2141 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4346,7 +4308,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1973 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1936 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4375,7 +4337,7 @@

Definition at line 1345 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1308 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4437,7 +4399,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3627 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3590 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4468,7 +4430,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3633 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3596 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4499,7 +4461,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1357 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1320 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4530,12 +4492,12 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1363 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1326 of file codegen_coreneuron_cpp_visitor.cpp.

- -

◆ print_net_event_call()

+ +

◆ print_net_event_call()

@@ -4595,7 +4559,7 @@

Definition at line 3001 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2964 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4661,8 +4625,8 @@

-

◆ print_net_move_call()

+ +

◆ print_net_move_call()

@@ -4722,7 +4688,7 @@

Definition at line 3228 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3191 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4751,7 +4717,7 @@

Definition at line 1323 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1286 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4787,7 +4753,7 @@

Definition at line 3082 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3045 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4834,7 +4800,7 @@

Definition at line 2839 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2802 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4863,7 +4829,7 @@

Definition at line 3168 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3131 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4892,7 +4858,7 @@

Definition at line 3070 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3033 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4921,7 +4887,7 @@

Definition at line 3077 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3040 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5044,7 +5010,7 @@

Definition at line 3140 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3103 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5076,7 +5042,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 3128 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3091 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5108,12 +5074,12 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 3133 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3096 of file codegen_coreneuron_cpp_visitor.cpp.

- -

◆ print_net_send_call()

+ +

◆ print_net_send_call()

@@ -5175,7 +5143,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 3359 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3322 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5206,7 +5174,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2694 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2657 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5237,7 +5205,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2660 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2623 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5268,7 +5236,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3581 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3544 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5307,7 +5275,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3445 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3408 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5345,7 +5313,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3516 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3479 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5439,7 +5407,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3482 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3445 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5478,7 +5446,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3426 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3389 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5509,7 +5477,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2672 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2635 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5545,7 +5513,7 @@

Definition at line 2525 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2488 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5577,7 +5545,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3369 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3332 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5606,7 +5574,7 @@

Definition at line 1308 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1271 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5644,7 +5612,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 888 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 851 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5705,7 +5673,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1639 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1602 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5734,7 +5702,7 @@

Definition at line 3035 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2998 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5763,7 +5731,7 @@

Definition at line 2277 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2240 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5794,7 +5762,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1595 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1558 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5830,7 +5798,7 @@

Definition at line 620 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 583 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5866,7 +5834,7 @@

Definition at line 717 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 680 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5901,7 +5869,7 @@

Definition at line 1379 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1342 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5930,7 +5898,7 @@

Definition at line 2115 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2078 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5959,7 +5927,7 @@

Definition at line 547 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 510 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5990,7 +5958,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3656 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3619 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6022,7 +5990,7 @@

Todo:
Similar to neuron/coreneuron we are using first watch and ignoring rest.
-

Definition at line 2707 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2670 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6053,7 +6021,7 @@

Todo:
Similar to print_watch_activate, we are using only first watch.

need to verify with neuron/coreneuron about rest.

-

Definition at line 2756 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2719 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6104,7 +6072,7 @@

Returns
The generated target backend code

In this case we first update current mechanism's shadow vector and then add statement to queue that will be used in reduction queue.

-

Definition at line 1278 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1241 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6145,7 +6113,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1192 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1155 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6220,7 +6188,7 @@

Returns
The ion read variable name
-

Definition at line 1238 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1201 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6251,7 +6219,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1219 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1182 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6290,7 +6258,7 @@

Returns
The possibly replace variable name

if function is defined the same mod file then the arguments must contain mechanism instance as well.

-

Definition at line 1163 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1126 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6358,7 +6326,7 @@

Returns
The updated name of the variable has been optimized (e.g. ena --> ion_ena)
-

Definition at line 1484 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1447 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6390,7 +6358,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 3741 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3704 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6422,7 +6390,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 3780 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3743 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6454,7 +6422,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 3752 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3715 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6486,7 +6454,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 3806 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3769 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6518,7 +6486,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 3844 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3807 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6550,7 +6518,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 3855 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3818 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6587,7 +6555,7 @@

Returns
The ion write variable name
-

Definition at line 1244 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1207 of file codegen_coreneuron_cpp_visitor.cpp.

diff --git a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.js b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.js index c0ae80c99b..854261e507 100644 --- a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.js +++ b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.js @@ -56,7 +56,6 @@ var classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor = [ "print_fast_imem_calculation", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6228949e87b0a9e14fe6886fc346e28c", null ], [ "print_first_pointer_var_index_getter", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6498ebb631852d55d7585ef179b3008e", null ], [ "print_function", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae47b27b3bfb2d9fa200b02f449c126e7", null ], - [ "print_function_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7b24f3b0faf05f17c28e06b4981b55dd", null ], [ "print_function_declaration", "group__codegen__backends.html#gaebe64f7d52f5cb96d8c73c1619bddabf", null ], [ "print_function_or_procedure", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab0d109b9d28587ba6cce93783a348d86", null ], [ "print_function_procedure_helper", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5be32556e7bb7fd48b1bdb71d75fe5bb", null ], @@ -94,11 +93,11 @@ var classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor = [ "print_namespace_end", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aed50b0789d65ce89402dcf00e186f261", null ], [ "print_namespace_start", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a47aa1e9e08042a9c2bc4c5a0773fdf53", null ], [ "print_namespace_stop", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aad6c90116002d10659c14c064bfa9aaa", null ], - [ "print_net_event_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1e4f93d026816a7f27d710cf2a6235bb", null ], + [ "print_net_event_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad964cdf59c0f6c54e92cd652f2ea8a02", null ], [ "print_net_init", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4f3cf2cc2726db4de8edd19ef660f52b", null ], [ "print_net_init_acc_serial_annotation_block_begin", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a656859e8b2ce968ed39db6e966c2338f", null ], [ "print_net_init_acc_serial_annotation_block_end", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afaaa9405b30312279aa8977c015ef1fa", null ], - [ "print_net_move_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2d1a1636e6662ed44ef6f6147abe78d4", null ], + [ "print_net_move_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3516dd7938db6a28e1d5668a9c4aca25", null ], [ "print_net_receive", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a48e4c785bbae026d24044736fd6913c2", null ], [ "print_net_receive_arg_size_getter", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac1fd31d8615b5b189349471a7ca23cee", null ], [ "print_net_receive_buffering", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7cb383070a38db2f4015b982371ca1b", null ], @@ -112,7 +111,7 @@ var classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor = [ "print_net_send_buffering", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a213e98f7c1ff3a0b9f07a6f3f3af3ee3", null ], [ "print_net_send_buffering_cnt_update", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7be1a9429e5200afb286bbc3b4e4ba13", null ], [ "print_net_send_buffering_grow", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab83b1dd02818a29abd3ad0cd4697a470", null ], - [ "print_net_send_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a38b1b3d5e9e9a3cd6a679380dc4f9b61", null ], + [ "print_net_send_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4d163cf837717e6f1bac43c1a492f456", null ], [ "print_newtonspace_transfer_to_device", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1b43c39d762c18b8457ba45496726e24", null ], [ "print_nrn_alloc", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac6eb4038a1823315b2aa509f7c05c132", null ], [ "print_nrn_constructor", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a24f47375affd9cc7195d83f026fc2ab8", null ], diff --git a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor-members.html b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor-members.html index 72b2413cbb..2ef7dd8229 100644 --- a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor-members.html +++ b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor-members.html @@ -163,7 +163,7 @@ print_data_structures(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual print_fast_imem_calculation()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual print_function(const ast::FunctionBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_function_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_function_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCppVisitorprotectedvirtual print_function_or_procedure(const ast::Block &node, const std::string &name)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual print_function_procedure_helper(const ast::Block &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual print_function_prototypes()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual @@ -179,158 +179,161 @@ print_namespace_end()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual print_namespace_start()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual print_namespace_stop()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nmodl_constants()nmodl::codegen::CodegenCppVisitorprotected - print_nrn_alloc()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_constructor()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_cur()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_cur_kernel(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_cur_non_conductance_kernel()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_current(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_destructor()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_state()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_prcellstate_macros() constnmodl::codegen::CodegenCppVisitorprotected - print_procedure(const ast::ProcedureBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_sdlists_init(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_standard_includes()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_statement_block(const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)nmodl::codegen::CodegenCppVisitorprotected - print_v_unused() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_vector_elements(const std::vector< T > &elements, const std::string &separator, const std::string &prefix="")nmodl::codegen::CodegenCppVisitorprotected - printernmodl::codegen::CodegenCppVisitorprotected - printing_net_initnmodl::codegen::CodegenCppVisitorprotected - printing_net_receivenmodl::codegen::CodegenCppVisitorprotected - printing_top_verbatim_blocksnmodl::codegen::CodegenCppVisitorprotected - process_verbatim_text(std::string const &text)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - program_symtabnmodl::codegen::CodegenCppVisitorprotected - range_variable_setup_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - register_mechanism_arguments() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - rename_function_arguments()nmodl::codegen::CodegenCppVisitorprotected - setup(const ast::Program &node)nmodl::codegen::CodegenCppVisitor - simulator_name()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - statement_to_skip(const ast::Statement &node)nmodl::codegen::CodegenCppVisitorprotectedstatic - SymbolType typedefnmodl::codegen::CodegenCppVisitorprotected - update_index_semantics()nmodl::codegen::CodegenCppVisitorprotected - visit_after_block(const ast::AfterBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_argument(const ast::Argument &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_assigned_block(const ast::AssignedBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_assigned_definition(const ast::AssignedDefinition &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_ba_block(const ast::BABlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_ba_block_type(const ast::BABlockType &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_bbcore_pointer(const ast::BbcorePointer &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_bbcore_pointer_var(const ast::BbcorePointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_before_block(const ast::BeforeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_binary_expression(const ast::BinaryExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_binary_operator(const ast::BinaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_block(const ast::Block &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_block_comment(const ast::BlockComment &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_boolean(const ast::Boolean &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_breakpoint_block(const ast::BreakpointBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_compartment(const ast::Compartment &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_conductance_hint(const ast::ConductanceHint &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_conserve(const ast::Conserve &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constant_block(const ast::ConstantBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constant_statement(const ast::ConstantStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constant_var(const ast::ConstantVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constructor_block(const ast::ConstructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_define(const ast::Define &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_derivative_block(const ast::DerivativeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_destructor_block(const ast::DestructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_diff_eq_expression(const ast::DiffEqExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_discrete_block(const ast::DiscreteBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_double(const ast::Double &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_double_unit(const ast::DoubleUnit &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_electrode_cur_var(const ast::ElectrodeCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_electrode_current(const ast::ElectrodeCurrent &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_else_if_statement(const ast::ElseIfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_else_statement(const ast::ElseStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_expression(const ast::Expression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_expression_statement(const ast::ExpressionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_extern_var(const ast::ExternVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_external(const ast::External &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_factor_def(const ast::FactorDef &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_float(const ast::Float &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_for_netcon(const ast::ForNetcon &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_from_statement(const ast::FromStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_function_block(const ast::FunctionBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_function_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_function_table_block(const ast::FunctionTableBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_global(const ast::Global &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_global_var(const ast::GlobalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_identifier(const ast::Identifier &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_if_statement(const ast::IfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_include(const ast::Include &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_independent_block(const ast::IndependentBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_indexed_name(const ast::IndexedName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_initial_block(const ast::InitialBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_integer(const ast::Integer &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_kinetic_block(const ast::KineticBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_lag_statement(const ast::LagStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_limits(const ast::Limits &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_lin_equation(const ast::LinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_line_comment(const ast::LineComment &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_linear_block(const ast::LinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_local_list_statement(const ast::LocalListStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_local_var(const ast::LocalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_lon_difuse(const ast::LonDifuse &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_model(const ast::Model &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_mutex_lock(const ast::MutexLock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_mutex_unlock(const ast::MutexUnlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_name(const ast::Name &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_net_receive_block(const ast::NetReceiveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_neuron_block(const ast::NeuronBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_node(const ast::Node &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_non_lin_equation(const ast::NonLinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_non_linear_block(const ast::NonLinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_nonspecific(const ast::Nonspecific &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_nonspecific_cur_var(const ast::NonspecificCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_nrn_state_block(const ast::NrnStateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_number(const ast::Number &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_number_range(const ast::NumberRange &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_ontology_statement(const ast::OntologyStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_param_assign(const ast::ParamAssign &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_param_block(const ast::ParamBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_paren_expression(const ast::ParenExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_pointer(const ast::Pointer &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_pointer_var(const ast::PointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_prime_name(const ast::PrimeName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_procedure_block(const ast::ProcedureBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_program(const ast::Program &program) overridenmodl::codegen::CodegenCppVisitorvirtual - visit_protect_statement(const ast::ProtectStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_range(const ast::Range &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_range_var(const ast::RangeVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_react_var_name(const ast::ReactVarName &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_reaction_operator(const ast::ReactionOperator &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_reaction_statement(const ast::ReactionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_read_ion_var(const ast::ReadIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_solution_expression(const ast::SolutionExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_solve_block(const ast::SolveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_state_block(const ast::StateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_statement(const ast::Statement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_statement_block(const ast::StatementBlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_string(const ast::String &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_suffix(const ast::Suffix &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_table_statement(const ast::TableStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_thread_safe(const ast::ThreadSafe &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unary_expression(const ast::UnaryExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unary_operator(const ast::UnaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_unit(const ast::Unit &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_unit_block(const ast::UnitBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unit_def(const ast::UnitDef &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unit_state(const ast::UnitState &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_update_dt(const ast::UpdateDt &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_useion(const ast::Useion &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_valence(const ast::Valence &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_var_name(const ast::VarName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_verbatim(const ast::Verbatim &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_watch(const ast::Watch &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_watch_statement(const ast::WatchStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_while_statement(const ast::WhileStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_wrapped_expression(const ast::WrappedExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_write_ion_var(const ast::WriteIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - ~ConstVisitor()=defaultnmodl::visitor::ConstVisitorvirtual + print_net_event_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_net_move_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_net_send_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nmodl_constants()nmodl::codegen::CodegenCppVisitorprotected + print_nrn_alloc()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_constructor()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_cur()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_cur_kernel(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_cur_non_conductance_kernel()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_current(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_destructor()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_state()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_prcellstate_macros() constnmodl::codegen::CodegenCppVisitorprotected + print_procedure(const ast::ProcedureBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_sdlists_init(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_standard_includes()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_statement_block(const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)nmodl::codegen::CodegenCppVisitorprotected + print_v_unused() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_vector_elements(const std::vector< T > &elements, const std::string &separator, const std::string &prefix="")nmodl::codegen::CodegenCppVisitorprotected + printernmodl::codegen::CodegenCppVisitorprotected + printing_net_initnmodl::codegen::CodegenCppVisitorprotected + printing_net_receivenmodl::codegen::CodegenCppVisitorprotected + printing_top_verbatim_blocksnmodl::codegen::CodegenCppVisitorprotected + process_verbatim_text(std::string const &text)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + program_symtabnmodl::codegen::CodegenCppVisitorprotected + range_variable_setup_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + register_mechanism_arguments() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + rename_function_arguments()nmodl::codegen::CodegenCppVisitorprotected + setup(const ast::Program &node)nmodl::codegen::CodegenCppVisitor + simulator_name()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + statement_to_skip(const ast::Statement &node)nmodl::codegen::CodegenCppVisitorprotectedstatic + SymbolType typedefnmodl::codegen::CodegenCppVisitorprotected + update_index_semantics()nmodl::codegen::CodegenCppVisitorprotected + visit_after_block(const ast::AfterBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_argument(const ast::Argument &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_assigned_block(const ast::AssignedBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_assigned_definition(const ast::AssignedDefinition &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_ba_block(const ast::BABlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_ba_block_type(const ast::BABlockType &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_bbcore_pointer(const ast::BbcorePointer &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_bbcore_pointer_var(const ast::BbcorePointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_before_block(const ast::BeforeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_binary_expression(const ast::BinaryExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_binary_operator(const ast::BinaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_block(const ast::Block &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_block_comment(const ast::BlockComment &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_boolean(const ast::Boolean &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_breakpoint_block(const ast::BreakpointBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_compartment(const ast::Compartment &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_conductance_hint(const ast::ConductanceHint &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_conserve(const ast::Conserve &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constant_block(const ast::ConstantBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constant_statement(const ast::ConstantStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constant_var(const ast::ConstantVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constructor_block(const ast::ConstructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_define(const ast::Define &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_derivative_block(const ast::DerivativeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_destructor_block(const ast::DestructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_diff_eq_expression(const ast::DiffEqExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_discrete_block(const ast::DiscreteBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_double(const ast::Double &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_double_unit(const ast::DoubleUnit &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_electrode_cur_var(const ast::ElectrodeCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_electrode_current(const ast::ElectrodeCurrent &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_else_if_statement(const ast::ElseIfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_else_statement(const ast::ElseStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_expression(const ast::Expression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_expression_statement(const ast::ExpressionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_extern_var(const ast::ExternVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_external(const ast::External &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_factor_def(const ast::FactorDef &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_float(const ast::Float &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_for_netcon(const ast::ForNetcon &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_from_statement(const ast::FromStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_function_block(const ast::FunctionBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_function_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_function_table_block(const ast::FunctionTableBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_global(const ast::Global &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_global_var(const ast::GlobalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_identifier(const ast::Identifier &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_if_statement(const ast::IfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_include(const ast::Include &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_independent_block(const ast::IndependentBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_indexed_name(const ast::IndexedName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_initial_block(const ast::InitialBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_integer(const ast::Integer &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_kinetic_block(const ast::KineticBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_lag_statement(const ast::LagStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_limits(const ast::Limits &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_lin_equation(const ast::LinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_line_comment(const ast::LineComment &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_linear_block(const ast::LinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_local_list_statement(const ast::LocalListStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_local_var(const ast::LocalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_lon_difuse(const ast::LonDifuse &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_model(const ast::Model &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_mutex_lock(const ast::MutexLock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_mutex_unlock(const ast::MutexUnlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_name(const ast::Name &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_net_receive_block(const ast::NetReceiveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_neuron_block(const ast::NeuronBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_node(const ast::Node &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_non_lin_equation(const ast::NonLinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_non_linear_block(const ast::NonLinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_nonspecific(const ast::Nonspecific &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_nonspecific_cur_var(const ast::NonspecificCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_nrn_state_block(const ast::NrnStateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_number(const ast::Number &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_number_range(const ast::NumberRange &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_ontology_statement(const ast::OntologyStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_param_assign(const ast::ParamAssign &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_param_block(const ast::ParamBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_paren_expression(const ast::ParenExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_pointer(const ast::Pointer &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_pointer_var(const ast::PointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_prime_name(const ast::PrimeName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_procedure_block(const ast::ProcedureBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_program(const ast::Program &program) overridenmodl::codegen::CodegenCppVisitorvirtual + visit_protect_statement(const ast::ProtectStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_range(const ast::Range &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_range_var(const ast::RangeVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_react_var_name(const ast::ReactVarName &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_reaction_operator(const ast::ReactionOperator &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_reaction_statement(const ast::ReactionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_read_ion_var(const ast::ReadIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_solution_expression(const ast::SolutionExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_solve_block(const ast::SolveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_state_block(const ast::StateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_statement(const ast::Statement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_statement_block(const ast::StatementBlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_string(const ast::String &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_suffix(const ast::Suffix &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_table_statement(const ast::TableStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_thread_safe(const ast::ThreadSafe &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unary_expression(const ast::UnaryExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unary_operator(const ast::UnaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_unit(const ast::Unit &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_unit_block(const ast::UnitBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unit_def(const ast::UnitDef &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unit_state(const ast::UnitState &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_update_dt(const ast::UpdateDt &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_useion(const ast::Useion &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_valence(const ast::Valence &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_var_name(const ast::VarName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_verbatim(const ast::Verbatim &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_watch(const ast::Watch &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_watch_statement(const ast::WatchStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_while_statement(const ast::WhileStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_wrapped_expression(const ast::WrappedExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_write_ion_var(const ast::WriteIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + ~ConstVisitor()=defaultnmodl::visitor::ConstVisitorvirtual diff --git a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html index 15c36030d3..02fc902093 100644 --- a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html +++ b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html @@ -618,9 +618,18 @@ void print_statement_block (const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)  Print any statement block in nmodl with option to (not) print braces. More...
  -virtual void print_function_call (const ast::FunctionCall &node)=0 - Print call to internal or external function. More...
-  +virtual void print_function_call (const ast::FunctionCall &node) + Print call to internal or external function. More...
+  +virtual void print_net_send_call (const ast::FunctionCall &node)=0 + Print call to net_send. More...
+  +virtual void print_net_move_call (const ast::FunctionCall &node)=0 + Print call to net_move. More...
+  +virtual void print_net_event_call (const ast::FunctionCall &node)=0 + Print call to net_event. More...
+  virtual void print_function_prototypes ()=0  Print function and procedures prototype declaration. More...
  @@ -1034,7 +1043,7 @@

Definition at line 1073 of file codegen_cpp_visitor.hpp.

+

Definition at line 1092 of file codegen_cpp_visitor.hpp.

@@ -1086,7 +1095,7 @@

Definition at line 1084 of file codegen_cpp_visitor.hpp.

+

Definition at line 1103 of file codegen_cpp_visitor.hpp.

@@ -1124,7 +1133,7 @@

Returns
The same string with double-quotes pre- and postfixed
-

Definition at line 741 of file codegen_cpp_visitor.hpp.

+

Definition at line 760 of file codegen_cpp_visitor.hpp.

@@ -1210,7 +1219,7 @@

-

Definition at line 914 of file codegen_cpp_visitor.cpp.

+

Definition at line 950 of file codegen_cpp_visitor.cpp.

@@ -1613,7 +1622,7 @@

Returns
A vector of float variables
-

Definition at line 710 of file codegen_cpp_visitor.cpp.

+

Definition at line 746 of file codegen_cpp_visitor.cpp.

@@ -1660,7 +1669,7 @@

Note
Variables for watch statements : there is one extra variable used in coreneuron compared to actual watch statements for compatibility with neuron (which uses one extra Datum variable)
-

Definition at line 776 of file codegen_cpp_visitor.cpp.

+

Definition at line 812 of file codegen_cpp_visitor.cpp.

@@ -2172,7 +2181,7 @@

Returns
A symbol based on the given name
-

Definition at line 761 of file codegen_cpp_visitor.hpp.

+

Definition at line 780 of file codegen_cpp_visitor.hpp.

@@ -2209,7 +2218,7 @@

Returns
The name of the function or procedure postfixed with the model name
-

Definition at line 751 of file codegen_cpp_visitor.hpp.

+

Definition at line 770 of file codegen_cpp_visitor.hpp.

@@ -2862,8 +2871,8 @@

-

◆ print_function_call()

+ +

◆ print_function_call()

@@ -3204,7 +3213,7 @@

Definition at line 225 of file codegen_cpp_visitor.cpp.

+

Definition at line 261 of file codegen_cpp_visitor.cpp.

@@ -3387,6 +3396,114 @@

nmodl::codegen::CodegenCoreneuronCppVisitor, and nmodl::codegen::CodegenNeuronCppVisitor.

+ + + +

◆ print_net_event_call()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void nmodl::codegen::CodegenCppVisitor::print_net_event_call (const ast::FunctionCallnode)
+
+protectedpure virtual
+
+ +

Print call to net_event.

+
Parameters
+ + +
nodeThe AST node representing the function call
+
+
+ +

Implemented in nmodl::codegen::CodegenCoreneuronCppVisitor, and nmodl::codegen::CodegenNeuronCppVisitor.

+ +
+
+ +

◆ print_net_move_call()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void nmodl::codegen::CodegenCppVisitor::print_net_move_call (const ast::FunctionCallnode)
+
+protectedpure virtual
+
+ +

Print call to net_move.

+
Parameters
+ + +
nodeThe AST node representing the function call
+
+
+ +

Implemented in nmodl::codegen::CodegenCoreneuronCppVisitor, and nmodl::codegen::CodegenNeuronCppVisitor.

+ +
+
+ +

◆ print_net_send_call()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void nmodl::codegen::CodegenCppVisitor::print_net_send_call (const ast::FunctionCallnode)
+
+protectedpure virtual
+
+ +

Print call to net_send.

+
Parameters
+ + +
nodeThe AST node representing the function call
+
+
+ +

Implemented in nmodl::codegen::CodegenCoreneuronCppVisitor, and nmodl::codegen::CodegenNeuronCppVisitor.

+
@@ -3419,7 +3536,7 @@

static const double PI = 3.14159;
static const double R = 8.3145;
-

Definition at line 330 of file codegen_cpp_visitor.cpp.

+

Definition at line 366 of file codegen_cpp_visitor.cpp.

@@ -3733,7 +3850,7 @@

Definition at line 218 of file codegen_cpp_visitor.cpp.

+

Definition at line 254 of file codegen_cpp_visitor.cpp.

@@ -3882,7 +3999,7 @@

Definition at line 263 of file codegen_cpp_visitor.cpp.

+

Definition at line 299 of file codegen_cpp_visitor.cpp.

@@ -4039,7 +4156,7 @@

Todo:
Issue with verbatim renaming.

e.g. pattern.mod has info struct with index variable. If we use "index" instead of "indexes" as default argument then during verbatim replacement we don't know the index is which one. This is because verbatim renaming pass has already stripped out prefixes from the text.

-

Definition at line 302 of file codegen_cpp_visitor.cpp.

+

Definition at line 338 of file codegen_cpp_visitor.cpp.

@@ -4062,7 +4179,7 @@

Definition at line 895 of file codegen_cpp_visitor.cpp.

+

Definition at line 931 of file codegen_cpp_visitor.cpp.

@@ -4160,7 +4277,7 @@

Definition at line 643 of file codegen_cpp_visitor.cpp.

+

Definition at line 679 of file codegen_cpp_visitor.cpp.

@@ -4192,7 +4309,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 538 of file codegen_cpp_visitor.cpp.

+

Definition at line 574 of file codegen_cpp_visitor.cpp.

@@ -4224,7 +4341,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 559 of file codegen_cpp_visitor.cpp.

+

Definition at line 595 of file codegen_cpp_visitor.cpp.

@@ -4256,7 +4373,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 387 of file codegen_cpp_visitor.cpp.

+

Definition at line 423 of file codegen_cpp_visitor.cpp.

@@ -4288,7 +4405,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 379 of file codegen_cpp_visitor.cpp.

+

Definition at line 415 of file codegen_cpp_visitor.cpp.

@@ -4320,7 +4437,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 476 of file codegen_cpp_visitor.cpp.

+

Definition at line 512 of file codegen_cpp_visitor.cpp.

@@ -4352,7 +4469,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 487 of file codegen_cpp_visitor.cpp.

+

Definition at line 523 of file codegen_cpp_visitor.cpp.

@@ -4384,7 +4501,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 371 of file codegen_cpp_visitor.cpp.

+

Definition at line 407 of file codegen_cpp_visitor.cpp.

@@ -4416,7 +4533,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 504 of file codegen_cpp_visitor.cpp.

+

Definition at line 540 of file codegen_cpp_visitor.cpp.

@@ -4448,7 +4565,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 589 of file codegen_cpp_visitor.cpp.

+

Definition at line 625 of file codegen_cpp_visitor.cpp.

@@ -4480,7 +4597,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 460 of file codegen_cpp_visitor.cpp.

+

Definition at line 496 of file codegen_cpp_visitor.cpp.

@@ -4512,7 +4629,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 438 of file codegen_cpp_visitor.cpp.

+

Definition at line 474 of file codegen_cpp_visitor.cpp.

@@ -4544,7 +4661,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 362 of file codegen_cpp_visitor.cpp.

+

Definition at line 398 of file codegen_cpp_visitor.cpp.

@@ -4576,7 +4693,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 451 of file codegen_cpp_visitor.cpp.

+

Definition at line 487 of file codegen_cpp_visitor.cpp.

@@ -4608,7 +4725,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 627 of file codegen_cpp_visitor.cpp.

+

Definition at line 663 of file codegen_cpp_visitor.cpp.

@@ -4640,7 +4757,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 634 of file codegen_cpp_visitor.cpp.

+

Definition at line 670 of file codegen_cpp_visitor.cpp.

@@ -4672,7 +4789,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 395 of file codegen_cpp_visitor.cpp.

+

Definition at line 431 of file codegen_cpp_visitor.cpp.

@@ -4704,7 +4821,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 528 of file codegen_cpp_visitor.cpp.

+

Definition at line 564 of file codegen_cpp_visitor.cpp.

@@ -4736,7 +4853,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 408 of file codegen_cpp_visitor.cpp.

+

Definition at line 444 of file codegen_cpp_visitor.cpp.

@@ -4774,7 +4891,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 937 of file codegen_cpp_visitor.cpp.

+

Definition at line 973 of file codegen_cpp_visitor.cpp.

@@ -4806,7 +4923,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 619 of file codegen_cpp_visitor.cpp.

+

Definition at line 655 of file codegen_cpp_visitor.cpp.

@@ -4837,7 +4954,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 580 of file codegen_cpp_visitor.cpp.

+

Definition at line 616 of file codegen_cpp_visitor.cpp.

@@ -4869,7 +4986,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 350 of file codegen_cpp_visitor.cpp.

+

Definition at line 386 of file codegen_cpp_visitor.cpp.

@@ -4901,7 +5018,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 567 of file codegen_cpp_visitor.cpp.

+

Definition at line 603 of file codegen_cpp_visitor.cpp.

@@ -4933,7 +5050,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 403 of file codegen_cpp_visitor.cpp.

+

Definition at line 439 of file codegen_cpp_visitor.cpp.

@@ -4965,7 +5082,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 614 of file codegen_cpp_visitor.cpp.

+

Definition at line 650 of file codegen_cpp_visitor.cpp.

@@ -4996,7 +5113,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 416 of file codegen_cpp_visitor.cpp.

+

Definition at line 452 of file codegen_cpp_visitor.cpp.

@@ -5028,7 +5145,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 597 of file codegen_cpp_visitor.cpp.

+

Definition at line 633 of file codegen_cpp_visitor.cpp.

@@ -5060,7 +5177,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 496 of file codegen_cpp_visitor.cpp.

+

Definition at line 532 of file codegen_cpp_visitor.cpp.

diff --git a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.js b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.js index 29d9ce5099..25f4008ba5 100644 --- a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.js +++ b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.js @@ -56,7 +56,7 @@ var classnmodl_1_1codegen_1_1_codegen_cpp_visitor = [ "print_data_structures", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acbb83079b063cd6b48e07030b1f5df84", null ], [ "print_fast_imem_calculation", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34492b32e18b9fbfd3ba01ba8ad85eb5", null ], [ "print_function", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4b9e335b7f968d36d9cd6bdfc34bba34", null ], - [ "print_function_call", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a43af5eef62e0e958d160b77fa1d6c099", null ], + [ "print_function_call", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad63b4318b5abd6b8c224fab70fe61081", null ], [ "print_function_or_procedure", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3836bfe0a9610b9037a73ea727246e71", null ], [ "print_function_procedure_helper", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aa017bbe95ad7539e72d182dac59f2454", null ], [ "print_function_prototypes", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a50ccadf68055ea9e26439ccaed0d68f7", null ], @@ -72,6 +72,9 @@ var classnmodl_1_1codegen_1_1_codegen_cpp_visitor = [ "print_namespace_end", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2f0c1a7b9127c6248b03b296257e8833", null ], [ "print_namespace_start", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af2490222aefa83d67238c605e05197a3", null ], [ "print_namespace_stop", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1d253986a351e263db95bb63c51775c3", null ], + [ "print_net_event_call", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae350ed7effbbcf8dbea050231599c8e6", null ], + [ "print_net_move_call", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a36470f1359566ee071015a630deb89cd", null ], + [ "print_net_send_call", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a78481115d7590930ac4d58d0bdaa2acc", null ], [ "print_nmodl_constants", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8cefcce52cd721b3869701367f456a71", null ], [ "print_nrn_alloc", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7b4903b21fc0872bcb8e68fe0a2efb1a", null ], [ "print_nrn_constructor", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6145c59148d531ca06c5d6f218e21b02", null ], diff --git a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor-members.html b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor-members.html index 92c4b1345f..5f715ebc60 100644 --- a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor-members.html +++ b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor-members.html @@ -165,7 +165,7 @@ print_data_structures(bool print_initializers) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual print_fast_imem_calculation() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual print_function(const ast::FunctionBlock &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_function_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_function_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCppVisitorprotectedvirtual print_function_declaration(const T &node, const std::string &name)nmodl::codegen::CodegenNeuronCppVisitorprotected print_function_or_procedure(const ast::Block &node, const std::string &name) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual print_function_procedure_helper(const ast::Block &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual @@ -185,161 +185,164 @@ print_namespace_end() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual print_namespace_start() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual print_namespace_stop() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_neuron_includes()nmodl::codegen::CodegenNeuronCppVisitorprotected - print_nmodl_constants()nmodl::codegen::CodegenCppVisitorprotected - print_nrn_alloc() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_nrn_constructor() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_nrn_cur() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_nrn_cur_kernel(const ast::BreakpointBlock &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_nrn_cur_non_conductance_kernel() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_nrn_current(const ast::BreakpointBlock &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_nrn_destructor() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_nrn_init(bool skip_init_check=true)nmodl::codegen::CodegenNeuronCppVisitorprotected - print_nrn_jacob()nmodl::codegen::CodegenNeuronCppVisitorprotected - print_nrn_state() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_prcellstate_macros() constnmodl::codegen::CodegenCppVisitorprotected - print_procedure(const ast::ProcedureBlock &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_sdlists_init(bool print_initializers) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_standard_includes() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_statement_block(const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)nmodl::codegen::CodegenCppVisitorprotected - print_v_unused() const overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - print_vector_elements(const std::vector< T > &elements, const std::string &separator, const std::string &prefix="")nmodl::codegen::CodegenCppVisitorprotected - printernmodl::codegen::CodegenCppVisitorprotected - printing_net_initnmodl::codegen::CodegenCppVisitorprotected - printing_net_receivenmodl::codegen::CodegenCppVisitorprotected - printing_top_verbatim_blocksnmodl::codegen::CodegenCppVisitorprotected - process_verbatim_text(std::string const &text) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - program_symtabnmodl::codegen::CodegenCppVisitorprotected - range_variable_setup_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - register_mechanism_arguments() const overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - rename_function_arguments()nmodl::codegen::CodegenCppVisitorprotected - setup(const ast::Program &node)nmodl::codegen::CodegenCppVisitor - simulator_name() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - statement_to_skip(const ast::Statement &node)nmodl::codegen::CodegenCppVisitorprotectedstatic - SymbolType typedefnmodl::codegen::CodegenCppVisitorprotected - update_index_semantics()nmodl::codegen::CodegenCppVisitorprotected - visit_after_block(const ast::AfterBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_argument(const ast::Argument &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_assigned_block(const ast::AssignedBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_assigned_definition(const ast::AssignedDefinition &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_ba_block(const ast::BABlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_ba_block_type(const ast::BABlockType &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_bbcore_pointer(const ast::BbcorePointer &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_bbcore_pointer_var(const ast::BbcorePointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_before_block(const ast::BeforeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_binary_expression(const ast::BinaryExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_binary_operator(const ast::BinaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_block(const ast::Block &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_block_comment(const ast::BlockComment &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_boolean(const ast::Boolean &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_breakpoint_block(const ast::BreakpointBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_compartment(const ast::Compartment &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_conductance_hint(const ast::ConductanceHint &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_conserve(const ast::Conserve &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constant_block(const ast::ConstantBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constant_statement(const ast::ConstantStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constant_var(const ast::ConstantVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constructor_block(const ast::ConstructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_define(const ast::Define &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_derivative_block(const ast::DerivativeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_destructor_block(const ast::DestructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_diff_eq_expression(const ast::DiffEqExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_discrete_block(const ast::DiscreteBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_double(const ast::Double &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_double_unit(const ast::DoubleUnit &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_electrode_cur_var(const ast::ElectrodeCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_electrode_current(const ast::ElectrodeCurrent &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_else_if_statement(const ast::ElseIfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_else_statement(const ast::ElseStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_expression(const ast::Expression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_expression_statement(const ast::ExpressionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_extern_var(const ast::ExternVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_external(const ast::External &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_factor_def(const ast::FactorDef &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_float(const ast::Float &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_for_netcon(const ast::ForNetcon &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_from_statement(const ast::FromStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_function_block(const ast::FunctionBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_function_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_function_table_block(const ast::FunctionTableBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_global(const ast::Global &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_global_var(const ast::GlobalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_identifier(const ast::Identifier &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_if_statement(const ast::IfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_include(const ast::Include &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_independent_block(const ast::IndependentBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_indexed_name(const ast::IndexedName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_initial_block(const ast::InitialBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_integer(const ast::Integer &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_kinetic_block(const ast::KineticBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_lag_statement(const ast::LagStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_limits(const ast::Limits &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_lin_equation(const ast::LinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_line_comment(const ast::LineComment &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_linear_block(const ast::LinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_local_list_statement(const ast::LocalListStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_local_var(const ast::LocalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_lon_difuse(const ast::LonDifuse &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_model(const ast::Model &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_mutex_lock(const ast::MutexLock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_mutex_unlock(const ast::MutexUnlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_name(const ast::Name &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_net_receive_block(const ast::NetReceiveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_neuron_block(const ast::NeuronBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_node(const ast::Node &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_non_lin_equation(const ast::NonLinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_non_linear_block(const ast::NonLinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_nonspecific(const ast::Nonspecific &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_nonspecific_cur_var(const ast::NonspecificCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_nrn_state_block(const ast::NrnStateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_number(const ast::Number &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_number_range(const ast::NumberRange &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_ontology_statement(const ast::OntologyStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_param_assign(const ast::ParamAssign &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_param_block(const ast::ParamBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_paren_expression(const ast::ParenExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_pointer(const ast::Pointer &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_pointer_var(const ast::PointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_prime_name(const ast::PrimeName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_procedure_block(const ast::ProcedureBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_program(const ast::Program &program) overridenmodl::codegen::CodegenCppVisitorvirtual - visit_protect_statement(const ast::ProtectStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_range(const ast::Range &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_range_var(const ast::RangeVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_react_var_name(const ast::ReactVarName &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_reaction_operator(const ast::ReactionOperator &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_reaction_statement(const ast::ReactionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_read_ion_var(const ast::ReadIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_solution_expression(const ast::SolutionExpression &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - visit_solve_block(const ast::SolveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_state_block(const ast::StateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_statement(const ast::Statement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_statement_block(const ast::StatementBlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_string(const ast::String &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_suffix(const ast::Suffix &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_table_statement(const ast::TableStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_thread_safe(const ast::ThreadSafe &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unary_expression(const ast::UnaryExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unary_operator(const ast::UnaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_unit(const ast::Unit &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_unit_block(const ast::UnitBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unit_def(const ast::UnitDef &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unit_state(const ast::UnitState &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_update_dt(const ast::UpdateDt &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_useion(const ast::Useion &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_valence(const ast::Valence &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_var_name(const ast::VarName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_verbatim(const ast::Verbatim &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_watch(const ast::Watch &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_watch_statement(const ast::WatchStatement &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual - visit_while_statement(const ast::WhileStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_wrapped_expression(const ast::WrappedExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_write_ion_var(const ast::WriteIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - ~ConstVisitor()=defaultnmodl::visitor::ConstVisitorvirtual + print_net_event_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_net_move_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_net_send_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_neuron_includes()nmodl::codegen::CodegenNeuronCppVisitorprotected + print_nmodl_constants()nmodl::codegen::CodegenCppVisitorprotected + print_nrn_alloc() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_nrn_constructor() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_nrn_cur() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_nrn_cur_kernel(const ast::BreakpointBlock &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_nrn_cur_non_conductance_kernel() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_nrn_current(const ast::BreakpointBlock &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_nrn_destructor() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_nrn_init(bool skip_init_check=true)nmodl::codegen::CodegenNeuronCppVisitorprotected + print_nrn_jacob()nmodl::codegen::CodegenNeuronCppVisitorprotected + print_nrn_state() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_prcellstate_macros() constnmodl::codegen::CodegenCppVisitorprotected + print_procedure(const ast::ProcedureBlock &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_sdlists_init(bool print_initializers) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_standard_includes() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_statement_block(const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)nmodl::codegen::CodegenCppVisitorprotected + print_v_unused() const overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + print_vector_elements(const std::vector< T > &elements, const std::string &separator, const std::string &prefix="")nmodl::codegen::CodegenCppVisitorprotected + printernmodl::codegen::CodegenCppVisitorprotected + printing_net_initnmodl::codegen::CodegenCppVisitorprotected + printing_net_receivenmodl::codegen::CodegenCppVisitorprotected + printing_top_verbatim_blocksnmodl::codegen::CodegenCppVisitorprotected + process_verbatim_text(std::string const &text) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + program_symtabnmodl::codegen::CodegenCppVisitorprotected + range_variable_setup_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + register_mechanism_arguments() const overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + rename_function_arguments()nmodl::codegen::CodegenCppVisitorprotected + setup(const ast::Program &node)nmodl::codegen::CodegenCppVisitor + simulator_name() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + statement_to_skip(const ast::Statement &node)nmodl::codegen::CodegenCppVisitorprotectedstatic + SymbolType typedefnmodl::codegen::CodegenCppVisitorprotected + update_index_semantics()nmodl::codegen::CodegenCppVisitorprotected + visit_after_block(const ast::AfterBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_argument(const ast::Argument &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_assigned_block(const ast::AssignedBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_assigned_definition(const ast::AssignedDefinition &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_ba_block(const ast::BABlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_ba_block_type(const ast::BABlockType &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_bbcore_pointer(const ast::BbcorePointer &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_bbcore_pointer_var(const ast::BbcorePointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_before_block(const ast::BeforeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_binary_expression(const ast::BinaryExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_binary_operator(const ast::BinaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_block(const ast::Block &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_block_comment(const ast::BlockComment &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_boolean(const ast::Boolean &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_breakpoint_block(const ast::BreakpointBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_compartment(const ast::Compartment &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_conductance_hint(const ast::ConductanceHint &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_conserve(const ast::Conserve &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constant_block(const ast::ConstantBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constant_statement(const ast::ConstantStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constant_var(const ast::ConstantVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constructor_block(const ast::ConstructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_define(const ast::Define &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_derivative_block(const ast::DerivativeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_destructor_block(const ast::DestructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_diff_eq_expression(const ast::DiffEqExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_discrete_block(const ast::DiscreteBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_double(const ast::Double &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_double_unit(const ast::DoubleUnit &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_electrode_cur_var(const ast::ElectrodeCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_electrode_current(const ast::ElectrodeCurrent &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_else_if_statement(const ast::ElseIfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_else_statement(const ast::ElseStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_expression(const ast::Expression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_expression_statement(const ast::ExpressionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_extern_var(const ast::ExternVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_external(const ast::External &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_factor_def(const ast::FactorDef &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_float(const ast::Float &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_for_netcon(const ast::ForNetcon &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_from_statement(const ast::FromStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_function_block(const ast::FunctionBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_function_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_function_table_block(const ast::FunctionTableBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_global(const ast::Global &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_global_var(const ast::GlobalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_identifier(const ast::Identifier &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_if_statement(const ast::IfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_include(const ast::Include &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_independent_block(const ast::IndependentBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_indexed_name(const ast::IndexedName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_initial_block(const ast::InitialBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_integer(const ast::Integer &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_kinetic_block(const ast::KineticBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_lag_statement(const ast::LagStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_limits(const ast::Limits &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_lin_equation(const ast::LinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_line_comment(const ast::LineComment &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_linear_block(const ast::LinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_local_list_statement(const ast::LocalListStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_local_var(const ast::LocalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_lon_difuse(const ast::LonDifuse &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_model(const ast::Model &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_mutex_lock(const ast::MutexLock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_mutex_unlock(const ast::MutexUnlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_name(const ast::Name &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_net_receive_block(const ast::NetReceiveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_neuron_block(const ast::NeuronBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_node(const ast::Node &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_non_lin_equation(const ast::NonLinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_non_linear_block(const ast::NonLinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_nonspecific(const ast::Nonspecific &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_nonspecific_cur_var(const ast::NonspecificCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_nrn_state_block(const ast::NrnStateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_number(const ast::Number &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_number_range(const ast::NumberRange &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_ontology_statement(const ast::OntologyStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_param_assign(const ast::ParamAssign &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_param_block(const ast::ParamBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_paren_expression(const ast::ParenExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_pointer(const ast::Pointer &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_pointer_var(const ast::PointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_prime_name(const ast::PrimeName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_procedure_block(const ast::ProcedureBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_program(const ast::Program &program) overridenmodl::codegen::CodegenCppVisitorvirtual + visit_protect_statement(const ast::ProtectStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_range(const ast::Range &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_range_var(const ast::RangeVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_react_var_name(const ast::ReactVarName &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_reaction_operator(const ast::ReactionOperator &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_reaction_statement(const ast::ReactionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_read_ion_var(const ast::ReadIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_solution_expression(const ast::SolutionExpression &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + visit_solve_block(const ast::SolveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_state_block(const ast::StateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_statement(const ast::Statement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_statement_block(const ast::StatementBlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_string(const ast::String &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_suffix(const ast::Suffix &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_table_statement(const ast::TableStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_thread_safe(const ast::ThreadSafe &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unary_expression(const ast::UnaryExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unary_operator(const ast::UnaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_unit(const ast::Unit &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_unit_block(const ast::UnitBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unit_def(const ast::UnitDef &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unit_state(const ast::UnitState &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_update_dt(const ast::UpdateDt &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_useion(const ast::Useion &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_valence(const ast::Valence &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_var_name(const ast::VarName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_verbatim(const ast::Verbatim &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_watch(const ast::Watch &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_watch_statement(const ast::WatchStatement &node) overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + visit_while_statement(const ast::WhileStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_wrapped_expression(const ast::WrappedExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_write_ion_var(const ast::WriteIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + ~ConstVisitor()=defaultnmodl::visitor::ConstVisitorvirtual diff --git a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html index dbe45119c1..bc98e8ba01 100644 --- a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html +++ b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html @@ -524,9 +524,15 @@ virtual void print_atomic_reduction_pragma () override  Print atomic update pragma for reduction statements. More...
  -void print_function_call (const ast::FunctionCall &node) override - Print call to internal or external function. More...
-  +void print_net_send_call (const ast::FunctionCall &node) override + Print call to net_send. More...
+  +void print_net_move_call (const ast::FunctionCall &node) override + Print call to net_move. More...
+  +void print_net_event_call (const ast::FunctionCall &node) override + Print call to net_event. More...
+  void print_function_prototypes () override  Print function and procedures prototype declaration. More...
  @@ -775,6 +781,9 @@ void print_statement_block (const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)  Print any statement block in nmodl with option to (not) print braces. More...
  +virtual void print_function_call (const ast::FunctionCall &node) + Print call to internal or external function. More...
+  void rename_function_arguments ()  Rename function/procedure arguments that conflict with default arguments. More...
  @@ -1015,7 +1024,7 @@

Definition at line 579 of file codegen_neuron_cpp_visitor.hpp.

+

Definition at line 593 of file codegen_neuron_cpp_visitor.hpp.

@@ -1077,7 +1086,7 @@

Definition at line 601 of file codegen_neuron_cpp_visitor.hpp.

+

Definition at line 615 of file codegen_neuron_cpp_visitor.hpp.

@@ -1142,7 +1151,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 149 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 143 of file codegen_neuron_cpp_visitor.cpp.

@@ -1182,7 +1191,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 155 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 149 of file codegen_neuron_cpp_visitor.cpp.

@@ -1234,7 +1243,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 206 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 200 of file codegen_neuron_cpp_visitor.cpp.

@@ -1285,7 +1294,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 228 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 222 of file codegen_neuron_cpp_visitor.cpp.

@@ -1336,7 +1345,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 221 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 215 of file codegen_neuron_cpp_visitor.cpp.

@@ -1395,7 +1404,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 213 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 207 of file codegen_neuron_cpp_visitor.cpp.

@@ -1428,7 +1437,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 137 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 131 of file codegen_neuron_cpp_visitor.cpp.

@@ -1461,7 +1470,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 143 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 137 of file codegen_neuron_cpp_visitor.cpp.

@@ -1493,7 +1502,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 161 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 155 of file codegen_neuron_cpp_visitor.cpp.

@@ -1525,7 +1534,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 167 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 161 of file codegen_neuron_cpp_visitor.cpp.

@@ -1666,7 +1675,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 239 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 233 of file codegen_neuron_cpp_visitor.cpp.

@@ -1698,7 +1707,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 716 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 710 of file codegen_neuron_cpp_visitor.cpp.

@@ -1730,7 +1739,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 707 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 701 of file codegen_neuron_cpp_visitor.cpp.

@@ -1768,7 +1777,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 679 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 673 of file codegen_neuron_cpp_visitor.cpp.

@@ -1800,7 +1809,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 585 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 579 of file codegen_neuron_cpp_visitor.cpp.

@@ -1839,46 +1848,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 126 of file codegen_neuron_cpp_visitor.cpp.

- - - - -

◆ print_function_call()

- -
-
- - - - - -
- - - - - - - - -
void nmodl::codegen::CodegenNeuronCppVisitor::print_function_call (const ast::FunctionCallnode)
-
-overrideprotectedvirtual
-
- -

Print call to internal or external function.

-

TODO: Edit for NEURON.

-
Parameters
- - -
nodeThe AST node representing a function call
-
-
- -

Implements nmodl::codegen::CodegenCppVisitor.

- -

Definition at line 93 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 120 of file codegen_neuron_cpp_visitor.cpp.

@@ -1928,7 +1898,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 107 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 101 of file codegen_neuron_cpp_visitor.cpp.

@@ -1967,7 +1937,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 114 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 108 of file codegen_neuron_cpp_visitor.cpp.

@@ -1999,7 +1969,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 99 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 93 of file codegen_neuron_cpp_visitor.cpp.

@@ -2030,7 +2000,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 697 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 691 of file codegen_neuron_cpp_visitor.cpp.

@@ -2079,7 +2049,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 478 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 472 of file codegen_neuron_cpp_visitor.cpp.

@@ -2108,7 +2078,7 @@

Definition at line 623 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 617 of file codegen_neuron_cpp_visitor.cpp.

@@ -2141,7 +2111,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 344 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 338 of file codegen_neuron_cpp_visitor.cpp.

@@ -2172,7 +2142,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 611 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 605 of file codegen_neuron_cpp_visitor.cpp.

@@ -2201,7 +2171,7 @@

Definition at line 617 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 611 of file codegen_neuron_cpp_visitor.cpp.

@@ -2240,7 +2210,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 325 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 319 of file codegen_neuron_cpp_visitor.cpp.

@@ -2278,7 +2248,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 452 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 446 of file codegen_neuron_cpp_visitor.cpp.

@@ -2310,7 +2280,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 394 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 388 of file codegen_neuron_cpp_visitor.cpp.

@@ -2340,7 +2310,7 @@

Definition at line 640 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 634 of file codegen_neuron_cpp_visitor.cpp.

@@ -2371,7 +2341,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 669 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 663 of file codegen_neuron_cpp_visitor.cpp.

@@ -2402,7 +2372,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 674 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 668 of file codegen_neuron_cpp_visitor.cpp.

@@ -2433,7 +2403,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 189 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 183 of file codegen_neuron_cpp_visitor.cpp.

@@ -2464,7 +2434,121 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 195 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 189 of file codegen_neuron_cpp_visitor.cpp.

+ + + + +

◆ print_net_event_call()

+ +
+
+ + + + + +
+ + + + + + + + +
void nmodl::codegen::CodegenNeuronCppVisitor::print_net_event_call (const ast::FunctionCallnode)
+
+overrideprotectedvirtual
+
+ +

Print call to net_event.

+
Parameters
+ + +
nodeThe AST node representing the function call
+
+
+ +

Implements nmodl::codegen::CodegenCppVisitor.

+ +

Definition at line 737 of file codegen_neuron_cpp_visitor.cpp.

+ +
+
+ +

◆ print_net_move_call()

+ +
+
+ + + + + +
+ + + + + + + + +
void nmodl::codegen::CodegenNeuronCppVisitor::print_net_move_call (const ast::FunctionCallnode)
+
+overrideprotectedvirtual
+
+ +

Print call to net_move.

+
Parameters
+ + +
nodeThe AST node representing the function call
+
+
+ +

Implements nmodl::codegen::CodegenCppVisitor.

+ +

Definition at line 733 of file codegen_neuron_cpp_visitor.cpp.

+ +
+
+ +

◆ print_net_send_call()

+ +
+
+ + + + + +
+ + + + + + + + +
void nmodl::codegen::CodegenNeuronCppVisitor::print_net_send_call (const ast::FunctionCallnode)
+
+overrideprotectedvirtual
+
+ +

Print call to net_send.

+
Parameters
+ + +
nodeThe AST node representing the function call
+
+
+ +

Implements nmodl::codegen::CodegenCppVisitor.

+ +

Definition at line 729 of file codegen_neuron_cpp_visitor.cpp.

@@ -2493,7 +2577,7 @@

Definition at line 272 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 266 of file codegen_neuron_cpp_visitor.cpp.

@@ -2525,7 +2609,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 522 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 516 of file codegen_neuron_cpp_visitor.cpp.

@@ -2557,7 +2641,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 510 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 504 of file codegen_neuron_cpp_visitor.cpp.

@@ -2590,7 +2674,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 591 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 585 of file codegen_neuron_cpp_visitor.cpp.

@@ -2630,7 +2714,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 567 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 561 of file codegen_neuron_cpp_visitor.cpp.

@@ -2669,7 +2753,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 579 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 573 of file codegen_neuron_cpp_visitor.cpp.

@@ -2702,7 +2786,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 573 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 567 of file codegen_neuron_cpp_visitor.cpp.

@@ -2742,7 +2826,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 561 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 555 of file codegen_neuron_cpp_visitor.cpp.

@@ -2774,7 +2858,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 516 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 510 of file codegen_neuron_cpp_visitor.cpp.

@@ -2810,7 +2894,7 @@

Definition at line 484 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 478 of file codegen_neuron_cpp_visitor.cpp.

@@ -2839,7 +2923,7 @@

Definition at line 498 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 492 of file codegen_neuron_cpp_visitor.cpp.

@@ -2872,7 +2956,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 537 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 531 of file codegen_neuron_cpp_visitor.cpp.

@@ -2911,7 +2995,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 120 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 114 of file codegen_neuron_cpp_visitor.cpp.

@@ -2946,7 +3030,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 283 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 277 of file codegen_neuron_cpp_visitor.cpp.

@@ -2977,7 +3061,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 259 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 253 of file codegen_neuron_cpp_visitor.cpp.

@@ -3008,7 +3092,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 685 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 679 of file codegen_neuron_cpp_visitor.cpp.

@@ -3048,7 +3132,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 173 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 167 of file codegen_neuron_cpp_visitor.cpp.

@@ -3080,7 +3164,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 179 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 173 of file codegen_neuron_cpp_visitor.cpp.

@@ -3143,7 +3227,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 742 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 748 of file codegen_neuron_cpp_visitor.cpp.

@@ -3175,7 +3259,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 748 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 754 of file codegen_neuron_cpp_visitor.cpp.

diff --git a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.js b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.js index 16a778a3be..c5fbdf998a 100644 --- a/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.js +++ b/html/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.js @@ -22,7 +22,6 @@ var classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor = [ "print_data_structures", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aeb0635e7e6e488519882d930401b5c2b", null ], [ "print_fast_imem_calculation", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#abce8ff7e8bd0754c8d61066779b4e72f", null ], [ "print_function", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a8633f24f67f430477ff3bf4a0c6b36cb", null ], - [ "print_function_call", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3ef1a3189051f86fce9602c7b02b445a", null ], [ "print_function_declaration", "group__codegen__backends.html#gabd283274182774ed39c08a0714842d43", null ], [ "print_function_or_procedure", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad635ed74eba5b2c3e0aee2e29ca1167a", null ], [ "print_function_procedure_helper", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af6a5224b66dde062241120381b3cb8df", null ], @@ -41,6 +40,9 @@ var classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor = [ "print_namespace_end", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a6abde0bb8aa4c6bd11cd15303295e9f9", null ], [ "print_namespace_start", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9749309d724cd1f4a47989c9d76c92c3", null ], [ "print_namespace_stop", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa40457fee0fa38359bb1ef9487efd00e", null ], + [ "print_net_event_call", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adf3ecfb21886bca7be8a882e2166a919", null ], + [ "print_net_move_call", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af2f331ce244ac6fa94bbc94de9163fba", null ], + [ "print_net_send_call", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adbf8216b0f67ec9e714bee6aa52e1e3f", null ], [ "print_neuron_includes", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a62669c86daa6bdd6c1e67e93461ad747", null ], [ "print_nrn_alloc", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a76f144fae532604ab1a1065d9c645211", null ], [ "print_nrn_constructor", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a96edb3ade58fc8c569ac0c73a54fd091", null ], diff --git a/html/doxygen/classnmodl_1_1visitor_1_1_const_visitor.html b/html/doxygen/classnmodl_1_1visitor_1_1_const_visitor.html index 10dad75c17..3512ac3e7a 100644 --- a/html/doxygen/classnmodl_1_1visitor_1_1_const_visitor.html +++ b/html/doxygen/classnmodl_1_1visitor_1_1_const_visitor.html @@ -3398,7 +3398,7 @@

ast::SolutionExpression

-

Implemented in nmodl::codegen::CodegenCoreneuronCppVisitor, nmodl::visitor::test::CheckParentVisitor, nmodl::codegen::CodegenNeuronCppVisitor, nmodl::visitor::ConstAstVisitor, nmodl::visitor::JSONVisitor, and nmodl::visitor::NmodlPrintVisitor.

+

Implemented in nmodl::codegen::CodegenCoreneuronCppVisitor, nmodl::codegen::CodegenNeuronCppVisitor, nmodl::visitor::test::CheckParentVisitor, nmodl::visitor::ConstAstVisitor, nmodl::visitor::JSONVisitor, and nmodl::visitor::NmodlPrintVisitor.

diff --git a/html/doxygen/codegen__acc__visitor_8cpp_source.html b/html/doxygen/codegen__acc__visitor_8cpp_source.html index 1dbdc18a5a..e187ab17d4 100644 --- a/html/doxygen/codegen__acc__visitor_8cpp_source.html +++ b/html/doxygen/codegen__acc__visitor_8cpp_source.html @@ -509,7 +509,7 @@
@ NetReceive
net_receive block
bool point_process
if mod file is point process
virtual void print_dt_update_to_device() const override
update dt from host to device
-
std::string get_variable_name(const std::string &name, bool use_instance=true) const override
Determine variable name in the structure of mechanism properties.
+
std::string get_variable_name(const std::string &name, bool use_instance=true) const override
Determine variable name in the structure of mechanism properties.
void print_global_variable_device_update_annotation() override
update global variable from host to the device
bool electrode_current
if electrode current specified
void print_kernel_data_present_annotation_block_end() override
end of annotation like "acc enter data"
diff --git a/html/doxygen/codegen__coreneuron__cpp__visitor_8hpp_source.html b/html/doxygen/codegen__coreneuron__cpp__visitor_8hpp_source.html index 526a74ceb7..25427f185d 100644 --- a/html/doxygen/codegen__coreneuron__cpp__visitor_8hpp_source.html +++ b/html/doxygen/codegen__coreneuron__cpp__visitor_8hpp_source.html @@ -518,1102 +518,1094 @@
422 
423 
424  /**
-
425  * Print call to internal or external function
-
426  * \param node The AST node representing a function call
-
427  */
-
428  void print_function_call(const ast::FunctionCall& node) override;
-
429 
-
430 
-
431  /**
-
432  * Print top level (global scope) verbatim blocks
-
433  */
- -
435 
-
436 
-
437  /**
-
438  * Print function and procedures prototype declaration
-
439  */
-
440  void print_function_prototypes() override;
-
441 
-
442 
-
443  /**
-
444  * Check if the given name exist in the symbol
-
445  * \return \c return a tuple <true, array_length> if variable
-
446  * is an array otherwise <false, 0>
+
425  * Print top level (global scope) verbatim blocks
+
426  */
+ +
428 
+
429 
+
430  /**
+
431  * Print function and procedures prototype declaration
+
432  */
+
433  void print_function_prototypes() override;
+
434 
+
435 
+
436  /**
+
437  * Check if the given name exist in the symbol
+
438  * \return \c return a tuple <true, array_length> if variable
+
439  * is an array otherwise <false, 0>
+
440  */
+
441  std::tuple<bool, int> check_if_var_is_array(const std::string& name);
+
442 
+
443 
+
444  /**
+
445  * Print \c check\_function() for functions or procedure using table
+
446  * \param node The AST node representing a function or procedure block
447  */
-
448  std::tuple<bool, int> check_if_var_is_array(const std::string& name);
+
448  void print_table_check_function(const ast::Block& node);
449 
450 
451  /**
-
452  * Print \c check\_function() for functions or procedure using table
+
452  * Print replacement function for function or procedure using table
453  * \param node The AST node representing a function or procedure block
454  */
-
455  void print_table_check_function(const ast::Block& node);
+
456 
457 
458  /**
-
459  * Print replacement function for function or procedure using table
-
460  * \param node The AST node representing a function or procedure block
-
461  */
- -
463 
-
464 
-
465  /**
-
466  * Print check_table functions
-
467  */
- -
469 
-
470 
-
471  /**
-
472  * Print nmodl function or procedure (common code)
-
473  * \param node the AST node representing the function or procedure in NMODL
-
474  * \param name the name of the function or procedure
+
459  * Print check_table functions
+
460  */
+ +
462 
+
463 
+
464  /**
+
465  * Print nmodl function or procedure (common code)
+
466  * \param node the AST node representing the function or procedure in NMODL
+
467  * \param name the name of the function or procedure
+
468  */
+
469  void print_function_or_procedure(const ast::Block& node, const std::string& name) override;
+
470 
+
471 
+
472  /**
+
473  * Common helper function to help printing function or procedure blocks
+
474  * \param node the AST node representing the function or procedure in NMODL
475  */
-
476  void print_function_or_procedure(const ast::Block& node, const std::string& name) override;
+
476  void print_function_procedure_helper(const ast::Block& node) override;
477 
478 
479  /**
-
480  * Common helper function to help printing function or procedure blocks
-
481  * \param node the AST node representing the function or procedure in NMODL
+
480  * Print NMODL procedure in target backend code
+
481  * \param node
482  */
-
483  void print_function_procedure_helper(const ast::Block& node) override;
+
483  virtual void print_procedure(const ast::ProcedureBlock& node) override;
484 
485 
486  /**
-
487  * Print NMODL procedure in target backend code
+
487  * Print NMODL function in target backend code
488  * \param node
489  */
-
490  virtual void print_procedure(const ast::ProcedureBlock& node) override;
+
490  void print_function(const ast::FunctionBlock& node) override;
491 
492 
493  /**
-
494  * Print NMODL function in target backend code
+
494  * Print NMODL function_table in target backend code
495  * \param node
496  */
-
497  void print_function(const ast::FunctionBlock& node) override;
+
498 
-
499 
-
500  /**
-
501  * Print NMODL function_table in target backend code
-
502  * \param node
-
503  */
- -
505 
-
506 
-
507  bool is_functor_const(const ast::StatementBlock& variable_block,
-
508  const ast::StatementBlock& functor_block);
-
509 
-
510 
-
511  /**
-
512  * \brief Based on the \c EigenNewtonSolverBlock passed print the definition needed for its
-
513  * functor
-
514  *
-
515  * \param node \c EigenNewtonSolverBlock for which to print the functor
-
516  */
- -
518 
+
499 
+
500  bool is_functor_const(const ast::StatementBlock& variable_block,
+
501  const ast::StatementBlock& functor_block);
+
502 
+
503 
+
504  /**
+
505  * \brief Based on the \c EigenNewtonSolverBlock passed print the definition needed for its
+
506  * functor
+
507  *
+
508  * \param node \c EigenNewtonSolverBlock for which to print the functor
+
509  */
+ +
511 
+
512 
+
513  virtual void print_eigen_linear_solver(const std::string& float_type, int N);
+
514 
+
515 
+
516  /****************************************************************************************/
+
517  /* Code-specific helper routines */
+
518  /****************************************************************************************/
519 
-
520  virtual void print_eigen_linear_solver(const std::string& float_type, int N);
-
521 
-
522 
-
523  /****************************************************************************************/
-
524  /* Code-specific helper routines */
-
525  /****************************************************************************************/
+
520 
+
521  /**
+
522  * Arguments for functions that are defined and used internally.
+
523  * \return the method arguments
+
524  */
+
525  std::string internal_method_arguments() override;
526 
527 
528  /**
-
529  * Arguments for functions that are defined and used internally.
-
530  * \return the method arguments
+
529  * Parameters for internally defined functions
+
530  * \return the method parameters
531  */
-
532  std::string internal_method_arguments() override;
+
533 
534 
535  /**
-
536  * Parameters for internally defined functions
-
537  * \return the method parameters
+
536  * Arguments for external functions called from generated code
+
537  * \return A string representing the arguments passed to an external function
538  */
- +
539  const char* external_method_arguments() noexcept override;
540 
541 
542  /**
-
543  * Arguments for external functions called from generated code
-
544  * \return A string representing the arguments passed to an external function
-
545  */
-
546  const char* external_method_arguments() noexcept override;
-
547 
-
548 
-
549  /**
-
550  * Parameters for functions in generated code that are called back from external code
-
551  *
-
552  * Functions registered in NEURON during initialization for callback must adhere to a prescribed
-
553  * calling convention. This method generates the string representing the function parameters for
-
554  * these externally called functions.
-
555  * \param table
-
556  * \return A string representing the parameters of the function
-
557  */
-
558  const char* external_method_parameters(bool table = false) noexcept override;
-
559 
-
560 
-
561  /**
-
562  * Arguments for "_threadargs_" macro in neuron implementation
-
563  */
-
564  std::string nrn_thread_arguments() const override;
-
565 
-
566 
-
567  /**
-
568  * Arguments for "_threadargs_" macro in neuron implementation
-
569  */
-
570  std::string nrn_thread_internal_arguments() override;
-
571 
-
572 
-
573  /**
-
574  * Replace commonly used verbatim variables
-
575  * \param name A variable name to be checked and possibly updated
-
576  * \return The possibly replace variable name
-
577  */
-
578  std::string replace_if_verbatim_variable(std::string name);
-
579 
-
580 
-
581  /**
-
582  * Process a verbatim block for possible variable renaming
-
583  * \param text The verbatim code to be processed
-
584  * \return The code with all variables renamed as needed
-
585  */
-
586  std::string process_verbatim_text(std::string const& text) override;
-
587 
-
588 
-
589  /**
-
590  * Arguments for register_mech or point_register_mech function
-
591  */
-
592  std::string register_mechanism_arguments() const override;
-
593 
-
594 
-
595  /**
-
596  * Return ion variable name and corresponding ion read variable name
-
597  * \param name The ion variable name
-
598  * \return The ion read variable name
-
599  */
-
600  static std::pair<std::string, std::string> read_ion_variable_name(const std::string& name);
-
601 
-
602 
-
603  /**
-
604  * Return ion variable name and corresponding ion write variable name
-
605  * \param name The ion variable name
-
606  * \return The ion write variable name
-
607  */
-
608  static std::pair<std::string, std::string> write_ion_variable_name(const std::string& name);
-
609 
-
610 
-
611  /**
-
612  * Generate Function call statement for nrn_wrote_conc
-
613  * \param ion_name The name of the ion variable
-
614  * \param concentration The name of the concentration variable
-
615  * \param index
-
616  * \return The string representing the function call
-
617  */
-
618  std::string conc_write_statement(const std::string& ion_name,
-
619  const std::string& concentration,
-
620  int index);
-
621 
-
622  /**
-
623  * Process shadow update statement
-
624  *
-
625  * If the statement requires reduction then add it to vector of reduction statement and return
-
626  * statement using shadow update
-
627  *
-
628  * \param statement The statement that might require shadow updates
-
629  * \param type The target backend code block type
-
630  * \return The generated target backend code
-
631  */
-
632  std::string process_shadow_update_statement(const ShadowUseStatement& statement,
-
633  BlockType type);
-
634 
-
635 
-
636  /****************************************************************************************/
-
637  /* Code-specific printing routines for code generations */
-
638  /****************************************************************************************/
+
543  * Parameters for functions in generated code that are called back from external code
+
544  *
+
545  * Functions registered in NEURON during initialization for callback must adhere to a prescribed
+
546  * calling convention. This method generates the string representing the function parameters for
+
547  * these externally called functions.
+
548  * \param table
+
549  * \return A string representing the parameters of the function
+
550  */
+
551  const char* external_method_parameters(bool table = false) noexcept override;
+
552 
+
553 
+
554  /**
+
555  * Arguments for "_threadargs_" macro in neuron implementation
+
556  */
+
557  std::string nrn_thread_arguments() const override;
+
558 
+
559 
+
560  /**
+
561  * Arguments for "_threadargs_" macro in neuron implementation
+
562  */
+
563  std::string nrn_thread_internal_arguments() override;
+
564 
+
565 
+
566  /**
+
567  * Replace commonly used verbatim variables
+
568  * \param name A variable name to be checked and possibly updated
+
569  * \return The possibly replace variable name
+
570  */
+
571  std::string replace_if_verbatim_variable(std::string name);
+
572 
+
573 
+
574  /**
+
575  * Process a verbatim block for possible variable renaming
+
576  * \param text The verbatim code to be processed
+
577  * \return The code with all variables renamed as needed
+
578  */
+
579  std::string process_verbatim_text(std::string const& text) override;
+
580 
+
581 
+
582  /**
+
583  * Arguments for register_mech or point_register_mech function
+
584  */
+
585  std::string register_mechanism_arguments() const override;
+
586 
+
587 
+
588  /**
+
589  * Return ion variable name and corresponding ion read variable name
+
590  * \param name The ion variable name
+
591  * \return The ion read variable name
+
592  */
+
593  static std::pair<std::string, std::string> read_ion_variable_name(const std::string& name);
+
594 
+
595 
+
596  /**
+
597  * Return ion variable name and corresponding ion write variable name
+
598  * \param name The ion variable name
+
599  * \return The ion write variable name
+
600  */
+
601  static std::pair<std::string, std::string> write_ion_variable_name(const std::string& name);
+
602 
+
603 
+
604  /**
+
605  * Generate Function call statement for nrn_wrote_conc
+
606  * \param ion_name The name of the ion variable
+
607  * \param concentration The name of the concentration variable
+
608  * \param index
+
609  * \return The string representing the function call
+
610  */
+
611  std::string conc_write_statement(const std::string& ion_name,
+
612  const std::string& concentration,
+
613  int index);
+
614 
+
615  /**
+
616  * Process shadow update statement
+
617  *
+
618  * If the statement requires reduction then add it to vector of reduction statement and return
+
619  * statement using shadow update
+
620  *
+
621  * \param statement The statement that might require shadow updates
+
622  * \param type The target backend code block type
+
623  * \return The generated target backend code
+
624  */
+
625  std::string process_shadow_update_statement(const ShadowUseStatement& statement,
+
626  BlockType type);
+
627 
+
628 
+
629  /****************************************************************************************/
+
630  /* Code-specific printing routines for code generations */
+
631  /****************************************************************************************/
+
632 
+
633 
+
634  /**
+
635  * Print the getter method for index position of first pointer variable
+
636  *
+
637  */
+
639 
640 
641  /**
-
642  * Print the getter method for index position of first pointer variable
+
642  * Print the getter methods for float and integer variables count
643  *
644  */
- +
646 
647 
648  /**
-
649  * Print the getter methods for float and integer variables count
+
649  * Print the getter method for getting number of arguments for net_receive
650  *
651  */
- +
653 
654 
655  /**
-
656  * Print the getter method for getting number of arguments for net_receive
+
656  * Print the getter method for returning mechtype
657  *
658  */
- +
659  void print_mech_type_getter();
660 
661 
662  /**
-
663  * Print the getter method for returning mechtype
+
663  * Print the getter method for returning membrane list from NrnThread
664  *
665  */
-
666  void print_mech_type_getter();
+
666  void print_memb_list_getter();
667 
668 
669  /**
-
670  * Print the getter method for returning membrane list from NrnThread
-
671  *
-
672  */
-
673  void print_memb_list_getter();
-
674 
-
675 
-
676  /**
-
677  * Prints the start of the \c coreneuron namespace
-
678  */
-
679  void print_namespace_start() override;
-
680 
-
681 
-
682  /**
-
683  * Prints the end of the \c coreneuron namespace
+
670  * Prints the start of the \c coreneuron namespace
+
671  */
+
672  void print_namespace_start() override;
+
673 
+
674 
+
675  /**
+
676  * Prints the end of the \c coreneuron namespace
+
677  */
+
678  void print_namespace_stop() override;
+
679 
+
680 
+
681  /**
+
682  * Print the getter method for thread variables and ids
+
683  *
684  */
-
685  void print_namespace_stop() override;
+
685  void print_thread_getters();
686 
-
687 
-
688  /**
-
689  * Print the getter method for thread variables and ids
-
690  *
-
691  */
-
692  void print_thread_getters();
-
693 
-
694 
-
695  /****************************************************************************************/
-
696  /* Routines for returning variable name */
-
697  /****************************************************************************************/
-
698 
-
699 
-
700  /**
-
701  * Determine the updated name if the ion variable has been optimized
-
702  * \param name The ion variable name
-
703  * \return The updated name of the variable has been optimized (e.g. \c ena --> \c ion_ena)
-
704  */
-
705  std::string update_if_ion_variable_name(const std::string& name) const;
-
706 
-
707 
-
708  /**
-
709  * Determine the name of a \c float variable given its symbol
-
710  *
-
711  * This function typically returns the accessor expression in backend code for the given symbol.
-
712  * Since the model variables are stored in data arrays and accessed by offset, this function
-
713  * will return the C++ string representing the array access at the correct offset
-
714  *
-
715  * \param symbol The symbol of a variable for which we want to obtain its name
-
716  * \param use_instance Should the variable be accessed via instance or data array
-
717  * \return The backend code string representing the access to the given variable
-
718  * symbol
-
719  */
-
720  std::string float_variable_name(const SymbolType& symbol, bool use_instance) const override;
-
721 
-
722 
-
723  /**
-
724  * Determine the name of an \c int variable given its symbol
-
725  *
-
726  * This function typically returns the accessor expression in backend code for the given symbol.
-
727  * Since the model variables are stored in data arrays and accessed by offset, this function
-
728  * will return the C++ string representing the array access at the correct offset
-
729  *
-
730  * \param symbol The symbol of a variable for which we want to obtain its name
-
731  * \param name The name of the index variable
-
732  * \param use_instance Should the variable be accessed via instance or data array
-
733  * \return The backend code string representing the access to the given variable
-
734  * symbol
-
735  */
-
736  std::string int_variable_name(const IndexVariableInfo& symbol,
-
737  const std::string& name,
-
738  bool use_instance) const override;
-
739 
-
740 
-
741  /**
-
742  * Determine the variable name for a global variable given its symbol
-
743  * \param symbol The symbol of a variable for which we want to obtain its name
-
744  * \param use_instance Should the variable be accessed via the (host-only)
-
745  * global variable or the instance-specific copy (also available on GPU).
-
746  * \return The C++ string representing the access to the global variable
-
747  */
-
748  std::string global_variable_name(const SymbolType& symbol,
-
749  bool use_instance = true) const override;
-
750 
-
751 
-
752  /**
-
753  * Determine variable name in the structure of mechanism properties
-
754  *
-
755  * \param name Variable name that is being printed
-
756  * \param use_instance Should the variable be accessed via instance or data array
-
757  * \return The C++ string representing the access to the variable in the neuron
-
758  * thread structure
-
759  */
-
760  std::string get_variable_name(const std::string& name, bool use_instance = true) const override;
-
761 
-
762 
-
763  /****************************************************************************************/
-
764  /* Main printing routines for code generation */
-
765  /****************************************************************************************/
-
766 
-
767 
-
768  /**
-
769  * Print top file header printed in generated code
-
770  */
-
771  void print_backend_info() override;
-
772 
-
773 
-
774  /**
-
775  * Print standard C/C++ includes
-
776  */
-
777  void print_standard_includes() override;
+
687 
+
688  /****************************************************************************************/
+
689  /* Routines for returning variable name */
+
690  /****************************************************************************************/
+
691 
+
692 
+
693  /**
+
694  * Determine the updated name if the ion variable has been optimized
+
695  * \param name The ion variable name
+
696  * \return The updated name of the variable has been optimized (e.g. \c ena --> \c ion_ena)
+
697  */
+
698  std::string update_if_ion_variable_name(const std::string& name) const;
+
699 
+
700 
+
701  /**
+
702  * Determine the name of a \c float variable given its symbol
+
703  *
+
704  * This function typically returns the accessor expression in backend code for the given symbol.
+
705  * Since the model variables are stored in data arrays and accessed by offset, this function
+
706  * will return the C++ string representing the array access at the correct offset
+
707  *
+
708  * \param symbol The symbol of a variable for which we want to obtain its name
+
709  * \param use_instance Should the variable be accessed via instance or data array
+
710  * \return The backend code string representing the access to the given variable
+
711  * symbol
+
712  */
+
713  std::string float_variable_name(const SymbolType& symbol, bool use_instance) const override;
+
714 
+
715 
+
716  /**
+
717  * Determine the name of an \c int variable given its symbol
+
718  *
+
719  * This function typically returns the accessor expression in backend code for the given symbol.
+
720  * Since the model variables are stored in data arrays and accessed by offset, this function
+
721  * will return the C++ string representing the array access at the correct offset
+
722  *
+
723  * \param symbol The symbol of a variable for which we want to obtain its name
+
724  * \param name The name of the index variable
+
725  * \param use_instance Should the variable be accessed via instance or data array
+
726  * \return The backend code string representing the access to the given variable
+
727  * symbol
+
728  */
+
729  std::string int_variable_name(const IndexVariableInfo& symbol,
+
730  const std::string& name,
+
731  bool use_instance) const override;
+
732 
+
733 
+
734  /**
+
735  * Determine the variable name for a global variable given its symbol
+
736  * \param symbol The symbol of a variable for which we want to obtain its name
+
737  * \param use_instance Should the variable be accessed via the (host-only)
+
738  * global variable or the instance-specific copy (also available on GPU).
+
739  * \return The C++ string representing the access to the global variable
+
740  */
+
741  std::string global_variable_name(const SymbolType& symbol,
+
742  bool use_instance = true) const override;
+
743 
+
744 
+
745  /**
+
746  * Determine variable name in the structure of mechanism properties
+
747  *
+
748  * \param name Variable name that is being printed
+
749  * \param use_instance Should the variable be accessed via instance or data array
+
750  * \return The C++ string representing the access to the variable in the neuron
+
751  * thread structure
+
752  */
+
753  std::string get_variable_name(const std::string& name, bool use_instance = true) const override;
+
754 
+
755 
+
756  /****************************************************************************************/
+
757  /* Main printing routines for code generation */
+
758  /****************************************************************************************/
+
759 
+
760 
+
761  /**
+
762  * Print top file header printed in generated code
+
763  */
+
764  void print_backend_info() override;
+
765 
+
766 
+
767  /**
+
768  * Print standard C/C++ includes
+
769  */
+
770  void print_standard_includes() override;
+
771 
+
772 
+
773  /**
+
774  * Print includes from coreneuron
+
775  */
+ +
777 
778 
-
779 
-
780  /**
-
781  * Print includes from coreneuron
-
782  */
- -
784 
-
785 
-
786  void print_sdlists_init(bool print_initializers) override;
-
787 
-
788 
-
789  /**
-
790  * Print the structure that wraps all global variables used in the NMODL
-
791  *
-
792  * \param print_initializers Whether to include default values in the struct
-
793  * definition (true: int foo{42}; false: int foo;)
-
794  */
-
795  void print_mechanism_global_var_structure(bool print_initializers) override;
-
796 
-
797 
-
798  /**
-
799  * Print static assertions about the global variable struct.
+
779  void print_sdlists_init(bool print_initializers) override;
+
780 
+
781 
+
782  /**
+
783  * Print the structure that wraps all global variables used in the NMODL
+
784  *
+
785  * \param print_initializers Whether to include default values in the struct
+
786  * definition (true: int foo{42}; false: int foo;)
+
787  */
+
788  void print_mechanism_global_var_structure(bool print_initializers) override;
+
789 
+
790 
+
791  /**
+
792  * Print static assertions about the global variable struct.
+
793  */
+
794  virtual void print_global_var_struct_assertions() const;
+
795 
+
796 
+
797  /**
+
798  * Print byte arrays that register scalar and vector variables for hoc interface
+
799  *
800  */
-
801  virtual void print_global_var_struct_assertions() const;
+
801  void print_global_variables_for_hoc() override;
802 
803 
804  /**
-
805  * Print byte arrays that register scalar and vector variables for hoc interface
+
805  * Print the mechanism registration function
806  *
807  */
-
808  void print_global_variables_for_hoc() override;
+
808  void print_mechanism_register() override;
809 
810 
811  /**
-
812  * Print the mechanism registration function
-
813  *
-
814  */
-
815  void print_mechanism_register() override;
-
816 
-
817 
-
818  /**
-
819  * Print thread related memory allocation and deallocation callbacks
-
820  */
- -
822 
-
823 
-
824  /**
-
825  * Print structure of ion variables used for local copies
+
812  * Print thread related memory allocation and deallocation callbacks
+
813  */
+ +
815 
+
816 
+
817  /**
+
818  * Print structure of ion variables used for local copies
+
819  */
+ +
821 
+
822 
+
823  /**
+
824  * Print constructor of ion variables
+
825  * \param members The ion variable names
826  */
- +
827  virtual void print_ion_var_constructor(const std::vector<std::string>& members);
828 
829 
830  /**
-
831  * Print constructor of ion variables
-
832  * \param members The ion variable names
-
833  */
-
834  virtual void print_ion_var_constructor(const std::vector<std::string>& members);
-
835 
-
836 
-
837  /**
-
838  * Print the ion variable struct
-
839  */
-
840  virtual void print_ion_variable();
-
841 
-
842 
-
843  /**
-
844  * Print the pragma annotation to update global variables from host to the device
-
845  *
-
846  * \note This is not used for the C++ backend
-
847  */
- -
849 
-
850 
-
851  /**
-
852  * Print the function that initialize range variable with different data type
+
831  * Print the ion variable struct
+
832  */
+
833  virtual void print_ion_variable();
+
834 
+
835 
+
836  /**
+
837  * Print the pragma annotation to update global variables from host to the device
+
838  *
+
839  * \note This is not used for the C++ backend
+
840  */
+ +
842 
+
843 
+
844  /**
+
845  * Print the function that initialize range variable with different data type
+
846  */
+ +
848 
+
849 
+
850  /**
+
851  * Returns floating point type for given range variable symbol
+
852  * \param symbol A range variable symbol
853  */
- +
854  std::string get_range_var_float_type(const SymbolType& symbol);
855 
856 
857  /**
-
858  * Returns floating point type for given range variable symbol
-
859  * \param symbol A range variable symbol
-
860  */
-
861  std::string get_range_var_float_type(const SymbolType& symbol);
-
862 
-
863 
-
864  /**
-
865  * Print initial block statements
-
866  *
-
867  * Generate the target backend code corresponding to the NMODL initial block statements
-
868  *
-
869  * \param node The AST Node representing a NMODL initial block
+
858  * Print initial block statements
+
859  *
+
860  * Generate the target backend code corresponding to the NMODL initial block statements
+
861  *
+
862  * \param node The AST Node representing a NMODL initial block
+
863  */
+
864  void print_initial_block(const ast::InitialBlock* node);
+
865 
+
866 
+
867  /**
+
868  * Print common code for global functions like nrn_init, nrn_cur and nrn_state
+
869  * \param type The target backend code block type
870  */
-
871  void print_initial_block(const ast::InitialBlock* node);
-
872 
-
873 
-
874  /**
-
875  * Print common code for global functions like nrn_init, nrn_cur and nrn_state
-
876  * \param type The target backend code block type
-
877  */
- -
879  const std::string& function_name = "") override;
+ +
872  const std::string& function_name = "") override;
+
873 
+
874 
+
875  /**
+
876  * Print the \c nrn\_init function definition
+
877  * \param skip_init_check \c true to generate code executing the initialization conditionally
+
878  */
+
879  void print_nrn_init(bool skip_init_check = true);
880 
881 
882  /**
-
883  * Print the \c nrn\_init function definition
-
884  * \param skip_init_check \c true to generate code executing the initialization conditionally
-
885  */
-
886  void print_nrn_init(bool skip_init_check = true);
-
887 
-
888 
-
889  /**
-
890  * Print NMODL before / after block in target backend code
-
891  * \param node AST node of type before/after type being printed
-
892  * \param block_id Index of the before/after block
+
883  * Print NMODL before / after block in target backend code
+
884  * \param node AST node of type before/after type being printed
+
885  * \param block_id Index of the before/after block
+
886  */
+
887  virtual void print_before_after_block(const ast::Block* node, size_t block_id);
+
888 
+
889 
+
890  /**
+
891  * Print nrn_constructor function definition
+
892  *
893  */
-
894  virtual void print_before_after_block(const ast::Block* node, size_t block_id);
+
894  void print_nrn_constructor() override;
895 
896 
897  /**
-
898  * Print nrn_constructor function definition
+
898  * Print nrn_destructor function definition
899  *
900  */
-
901  void print_nrn_constructor() override;
+
901  void print_nrn_destructor() override;
902 
903 
904  /**
-
905  * Print nrn_destructor function definition
-
906  *
-
907  */
-
908  void print_nrn_destructor() override;
-
909 
-
910 
-
911  /**
-
912  * Go through the map of \c EigenNewtonSolverBlock s and their corresponding functor names
-
913  * and print the functor definitions before the definitions of the functions of the generated
-
914  * file
+
905  * Go through the map of \c EigenNewtonSolverBlock s and their corresponding functor names
+
906  * and print the functor definitions before the definitions of the functions of the generated
+
907  * file
+
908  *
+
909  */
+ +
911 
+
912 
+
913  /**
+
914  * Print nrn_alloc function definition
915  *
916  */
- +
917  void print_nrn_alloc() override;
918 
919 
920  /**
-
921  * Print nrn_alloc function definition
+
921  * Print watch activate function
922  *
923  */
-
924  void print_nrn_alloc() override;
+
924  void print_watch_activate();
925 
926 
927  /**
928  * Print watch activate function
-
929  *
-
930  */
-
931  void print_watch_activate();
-
932 
-
933 
-
934  /**
-
935  * Print watch activate function
-
936  */
-
937  void print_watch_check();
-
938 
-
939 
-
940  /**
-
941  * Print the common code section for net receive related methods
-
942  *
-
943  * \param node The AST node representing the corresponding NMODL block
-
944  * \param need_mech_inst \c true if a local \c inst variable needs to be defined in generated
-
945  * code
+
929  */
+
930  void print_watch_check();
+
931 
+
932 
+
933  /**
+
934  * Print the common code section for net receive related methods
+
935  *
+
936  * \param node The AST node representing the corresponding NMODL block
+
937  * \param need_mech_inst \c true if a local \c inst variable needs to be defined in generated
+
938  * code
+
939  */
+
940  void print_net_receive_common_code(const ast::Block& node, bool need_mech_inst = true);
+
941 
+
942 
+
943  /**
+
944  * Print call to \c net\_send
+
945  * \param node The AST node representing the function call
946  */
-
947  void print_net_receive_common_code(const ast::Block& node, bool need_mech_inst = true);
+
947  void print_net_send_call(const ast::FunctionCall& node) override;
948 
949 
950  /**
-
951  * Print call to \c net\_send
+
951  * Print call to net\_move
952  * \param node The AST node representing the function call
953  */
-
954  void print_net_send_call(const ast::FunctionCall& node);
+
954  void print_net_move_call(const ast::FunctionCall& node) override;
955 
956 
957  /**
-
958  * Print call to net\_move
+
958  * Print call to net\_event
959  * \param node The AST node representing the function call
960  */
-
961  void print_net_move_call(const ast::FunctionCall& node);
+
961  void print_net_event_call(const ast::FunctionCall& node) override;
962 
963 
964  /**
-
965  * Print call to net\_event
-
966  * \param node The AST node representing the function call
-
967  */
-
968  void print_net_event_call(const ast::FunctionCall& node);
-
969 
-
970 
-
971  /**
-
972  * Print initial block in the net receive block
-
973  */
-
974  void print_net_init();
-
975 
-
976 
-
977  /**
-
978  * Print send event move block used in net receive as well as watch
+
965  * Print initial block in the net receive block
+
966  */
+
967  void print_net_init();
+
968 
+
969 
+
970  /**
+
971  * Print send event move block used in net receive as well as watch
+
972  */
+
973  void print_send_event_move();
+
974 
+
975 
+
976  /**
+
977  * Generate the target backend code for the \c net\_receive\_buffering function delcaration
+
978  * \return The target code string
979  */
-
980  void print_send_event_move();
+
980  virtual std::string net_receive_buffering_declaration();
981 
982 
983  /**
-
984  * Generate the target backend code for the \c net\_receive\_buffering function delcaration
-
985  * \return The target code string
-
986  */
-
987  virtual std::string net_receive_buffering_declaration();
-
988 
-
989 
-
990  /**
-
991  * Print the target backend code for defining and checking a local \c Memb\_list variable
-
992  */
-
993  virtual void print_get_memb_list();
-
994 
-
995 
-
996  /**
-
997  * Print the code for the main \c net\_receive loop
-
998  */
-
999  virtual void print_net_receive_loop_begin();
-
1000 
-
1001 
-
1002  /**
-
1003  * Print the code for closing the main \c net\_receive loop
-
1004  */
-
1005  virtual void print_net_receive_loop_end();
-
1006 
-
1007 
-
1008  /**
-
1009  * Print kernel for buffering net_receive events
-
1010  *
-
1011  * This kernel is only needed for accelerator backends where \c net\_receive needs to be
-
1012  * executed in two stages as the actual communication must be done in the host code. \param
-
1013  * need_mech_inst \c true if the generated code needs a local inst variable to be defined
-
1014  */
-
1015  void print_net_receive_buffering(bool need_mech_inst = true);
-
1016 
-
1017 
-
1018  /**
-
1019  * Print the code related to the update of NetSendBuffer_t cnt. For GPU this needs to be done
-
1020  * with atomic operation, on CPU it's not needed.
-
1021  *
+
984  * Print the target backend code for defining and checking a local \c Memb\_list variable
+
985  */
+
986  virtual void print_get_memb_list();
+
987 
+
988 
+
989  /**
+
990  * Print the code for the main \c net\_receive loop
+
991  */
+
992  virtual void print_net_receive_loop_begin();
+
993 
+
994 
+
995  /**
+
996  * Print the code for closing the main \c net\_receive loop
+
997  */
+
998  virtual void print_net_receive_loop_end();
+
999 
+
1000 
+
1001  /**
+
1002  * Print kernel for buffering net_receive events
+
1003  *
+
1004  * This kernel is only needed for accelerator backends where \c net\_receive needs to be
+
1005  * executed in two stages as the actual communication must be done in the host code. \param
+
1006  * need_mech_inst \c true if the generated code needs a local inst variable to be defined
+
1007  */
+
1008  void print_net_receive_buffering(bool need_mech_inst = true);
+
1009 
+
1010 
+
1011  /**
+
1012  * Print the code related to the update of NetSendBuffer_t cnt. For GPU this needs to be done
+
1013  * with atomic operation, on CPU it's not needed.
+
1014  *
+
1015  */
+
1016  virtual void print_net_send_buffering_cnt_update() const;
+
1017 
+
1018 
+
1019  /**
+
1020  * Print statement that grows NetSendBuffering_t structure if needed.
+
1021  * This function should be overridden for backends that cannot dynamically reallocate the buffer
1022  */
-
1023  virtual void print_net_send_buffering_cnt_update() const;
+
1023  virtual void print_net_send_buffering_grow();
1024 
1025 
1026  /**
-
1027  * Print statement that grows NetSendBuffering_t structure if needed.
-
1028  * This function should be overridden for backends that cannot dynamically reallocate the buffer
-
1029  */
-
1030  virtual void print_net_send_buffering_grow();
-
1031 
-
1032 
-
1033  /**
-
1034  * Print kernel for buffering net_send events
-
1035  *
-
1036  * This kernel is only needed for accelerator backends where \c net\_send needs to be executed
-
1037  * in two stages as the actual communication must be done in the host code.
-
1038  */
-
1039  void print_net_send_buffering();
-
1040 
-
1041 
-
1042  /**
-
1043  * Print \c net\_receive kernel function definition
-
1044  */
-
1045  void print_net_receive_kernel();
-
1046 
-
1047 
-
1048  /**
-
1049  * Print \c net\_receive function definition
-
1050  */
-
1051  void print_net_receive();
-
1052 
-
1053 
-
1054  /**
-
1055  * Print derivative kernel when \c derivimplicit method is used
-
1056  *
-
1057  * \param block The corresponding AST node representing an NMODL \c derivimplicit block
-
1058  */
-
1059  void print_derivimplicit_kernel(const ast::Block& block);
+
1027  * Print kernel for buffering net_send events
+
1028  *
+
1029  * This kernel is only needed for accelerator backends where \c net\_send needs to be executed
+
1030  * in two stages as the actual communication must be done in the host code.
+
1031  */
+
1032  void print_net_send_buffering();
+
1033 
+
1034 
+
1035  /**
+
1036  * Print \c net\_receive kernel function definition
+
1037  */
+
1038  void print_net_receive_kernel();
+
1039 
+
1040 
+
1041  /**
+
1042  * Print \c net\_receive function definition
+
1043  */
+
1044  void print_net_receive();
+
1045 
+
1046 
+
1047  /**
+
1048  * Print derivative kernel when \c derivimplicit method is used
+
1049  *
+
1050  * \param block The corresponding AST node representing an NMODL \c derivimplicit block
+
1051  */
+
1052  void print_derivimplicit_kernel(const ast::Block& block);
+
1053 
+
1054 
+
1055  /**
+
1056  * Print code block to transfer newtonspace structure to device
+
1057  */
+
1058  virtual void print_newtonspace_transfer_to_device() const;
+
1059 
1060 
-
1061 
-
1062  /**
-
1063  * Print code block to transfer newtonspace structure to device
-
1064  */
-
1065  virtual void print_newtonspace_transfer_to_device() const;
-
1066 
-
1067 
-
1068  /****************************************************************************************/
-
1069  /* Print nrn_state routine */
-
1070  /****************************************************************************************/
+
1061  /****************************************************************************************/
+
1062  /* Print nrn_state routine */
+
1063  /****************************************************************************************/
+
1064 
+
1065 
+
1066  /**
+
1067  * Print nrn_state / state update function definition
+
1068  */
+
1069  void print_nrn_state() override;
+
1070 
1071 
-
1072 
-
1073  /**
-
1074  * Print nrn_state / state update function definition
-
1075  */
-
1076  void print_nrn_state() override;
-
1077 
-
1078 
-
1079  /****************************************************************************************/
-
1080  /* Print nrn_cur related routines */
-
1081  /****************************************************************************************/
-
1082 
-
1083 
-
1084  /**
-
1085  * Print the \c nrn_current kernel
-
1086  *
-
1087  * \note nrn_cur_kernel will have two calls to nrn_current if no conductance keywords specified
-
1088  * \param node the AST node representing the NMODL breakpoint block
-
1089  */
-
1090  void print_nrn_current(const ast::BreakpointBlock& node) override;
-
1091 
-
1092 
-
1093  /**
-
1094  * Print the \c nrn\_cur kernel with NMODL \c conductance keyword provisions
-
1095  *
-
1096  * If the NMODL \c conductance keyword is used in the \c breakpoint block, then
-
1097  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
-
1098  *
-
1099  * \param node the AST node representing the NMODL breakpoint block
-
1100  */
-
1101  void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock& node) override;
-
1102 
-
1103 
-
1104  /**
-
1105  * Print the \c nrn\_cur kernel without NMODL \c conductance keyword provisions
-
1106  *
-
1107  * If the NMODL \c conductance keyword is \b not used in the \c breakpoint block, then
-
1108  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
+
1072  /****************************************************************************************/
+
1073  /* Print nrn_cur related routines */
+
1074  /****************************************************************************************/
+
1075 
+
1076 
+
1077  /**
+
1078  * Print the \c nrn_current kernel
+
1079  *
+
1080  * \note nrn_cur_kernel will have two calls to nrn_current if no conductance keywords specified
+
1081  * \param node the AST node representing the NMODL breakpoint block
+
1082  */
+
1083  void print_nrn_current(const ast::BreakpointBlock& node) override;
+
1084 
+
1085 
+
1086  /**
+
1087  * Print the \c nrn\_cur kernel with NMODL \c conductance keyword provisions
+
1088  *
+
1089  * If the NMODL \c conductance keyword is used in the \c breakpoint block, then
+
1090  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
+
1091  *
+
1092  * \param node the AST node representing the NMODL breakpoint block
+
1093  */
+
1094  void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock& node) override;
+
1095 
+
1096 
+
1097  /**
+
1098  * Print the \c nrn\_cur kernel without NMODL \c conductance keyword provisions
+
1099  *
+
1100  * If the NMODL \c conductance keyword is \b not used in the \c breakpoint block, then
+
1101  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
+
1102  */
+
1103  void print_nrn_cur_non_conductance_kernel() override;
+
1104 
+
1105 
+
1106  /**
+
1107  * Print main body of nrn_cur function
+
1108  * \param node the AST node representing the NMODL breakpoint block
1109  */
-
1110  void print_nrn_cur_non_conductance_kernel() override;
+
1110  void print_nrn_cur_kernel(const ast::BreakpointBlock& node) override;
1111 
1112 
1113  /**
-
1114  * Print main body of nrn_cur function
-
1115  * \param node the AST node representing the NMODL breakpoint block
-
1116  */
-
1117  void print_nrn_cur_kernel(const ast::BreakpointBlock& node) override;
-
1118 
-
1119 
-
1120  /**
-
1121  * Print fast membrane current calculation code
-
1122  */
-
1123  virtual void print_fast_imem_calculation() override;
+
1114  * Print fast membrane current calculation code
+
1115  */
+
1116  virtual void print_fast_imem_calculation() override;
+
1117 
+
1118 
+
1119  /**
+
1120  * Print nrn_cur / current update function definition
+
1121  */
+
1122  void print_nrn_cur() override;
+
1123 
1124 
-
1125 
-
1126  /**
-
1127  * Print nrn_cur / current update function definition
-
1128  */
-
1129  void print_nrn_cur() override;
-
1130 
-
1131 
-
1132  /****************************************************************************************/
-
1133  /* Main code printing entry points */
-
1134  /****************************************************************************************/
+
1125  /****************************************************************************************/
+
1126  /* Main code printing entry points */
+
1127  /****************************************************************************************/
+
1128 
+
1129 
+
1130  /**
+
1131  * Print all includes
+
1132  *
+
1133  */
+
1134  void print_headers_include() override;
1135 
1136 
1137  /**
-
1138  * Print all includes
+
1138  * Print start of namespaces
1139  *
1140  */
-
1141  void print_headers_include() override;
+
1141  void print_namespace_begin() override;
1142 
1143 
1144  /**
-
1145  * Print start of namespaces
+
1145  * Print end of namespaces
1146  *
1147  */
-
1148  void print_namespace_begin() override;
+
1148  void print_namespace_end() override;
1149 
1150 
1151  /**
-
1152  * Print end of namespaces
+
1152  * Print common getters
1153  *
1154  */
-
1155  void print_namespace_end() override;
+
1155  void print_common_getters();
1156 
1157 
1158  /**
-
1159  * Print common getters
-
1160  *
+
1159  * Print all classes
+
1160  * \param print_initializers Whether to include default values.
1161  */
-
1162  void print_common_getters();
+
1162  void print_data_structures(bool print_initializers) override;
1163 
1164 
1165  /**
-
1166  * Print all classes
-
1167  * \param print_initializers Whether to include default values.
-
1168  */
-
1169  void print_data_structures(bool print_initializers) override;
-
1170 
-
1171 
-
1172  /**
-
1173  * Set v_unused (voltage) for NRN_PRCELLSTATE feature
-
1174  */
-
1175  void print_v_unused() const override;
-
1176 
-
1177 
-
1178  /**
-
1179  * Set g_unused (conductance) for NRN_PRCELLSTATE feature
+
1166  * Set v_unused (voltage) for NRN_PRCELLSTATE feature
+
1167  */
+
1168  void print_v_unused() const override;
+
1169 
+
1170 
+
1171  /**
+
1172  * Set g_unused (conductance) for NRN_PRCELLSTATE feature
+
1173  */
+
1174  void print_g_unused() const override;
+
1175 
+
1176 
+
1177  /**
+
1178  * Print all compute functions for every backend
+
1179  *
1180  */
-
1181  void print_g_unused() const override;
+
1181  virtual void print_compute_functions() override;
1182 
1183 
1184  /**
-
1185  * Print all compute functions for every backend
+
1185  * Print entry point to code generation
1186  *
1187  */
-
1188  virtual void print_compute_functions() override;
+
1188  virtual void print_codegen_routines() override;
1189 
-
1190 
-
1191  /**
-
1192  * Print entry point to code generation
-
1193  *
-
1194  */
-
1195  virtual void print_codegen_routines() override;
-
1196 
-
1197 
-
1198  /****************************************************************************************/
-
1199  /* Overloaded visitor routines */
-
1200  /****************************************************************************************/
-
1201 
+
1190 
+
1191  /****************************************************************************************/
+
1192  /* Overloaded visitor routines */
+
1193  /****************************************************************************************/
+
1194 
+
1195 
+
1196  void visit_derivimplicit_callback(const ast::DerivimplicitCallback& node) override;
+
1197  void visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock& node) override;
+
1198  void visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock& node) override;
+
1199  void visit_for_netcon(const ast::ForNetcon& node) override;
+
1200  virtual void visit_solution_expression(const ast::SolutionExpression& node) override;
+
1201  virtual void visit_watch_statement(const ast::WatchStatement& node) override;
1202 
-
1203  void visit_derivimplicit_callback(const ast::DerivimplicitCallback& node) override;
-
1204  void visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock& node) override;
-
1205  void visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock& node) override;
-
1206  void visit_for_netcon(const ast::ForNetcon& node) override;
-
1207  virtual void visit_solution_expression(const ast::SolutionExpression& node) override;
-
1208  virtual void visit_watch_statement(const ast::WatchStatement& node) override;
-
1209 
-
1210 
-
1211  /**
-
1212  * Print prototype declarations of functions or procedures
-
1213  * \tparam T The AST node type of the node (must be of nmodl::ast::Ast or subclass)
-
1214  * \param node The AST node representing the function or procedure block
-
1215  * \param name A user defined name for the function
-
1216  */
-
1217  template <typename T>
-
1218  void print_function_declaration(const T& node, const std::string& name);
-
1219 
-
1220 
-
1221  public:
-
1222  /**
-
1223  * \brief Constructs the C++ code generator visitor
+
1203 
+
1204  /**
+
1205  * Print prototype declarations of functions or procedures
+
1206  * \tparam T The AST node type of the node (must be of nmodl::ast::Ast or subclass)
+
1207  * \param node The AST node representing the function or procedure block
+
1208  * \param name A user defined name for the function
+
1209  */
+
1210  template <typename T>
+
1211  void print_function_declaration(const T& node, const std::string& name);
+
1212 
+
1213 
+
1214  public:
+
1215  /**
+
1216  * \brief Constructs the C++ code generator visitor
+
1217  *
+
1218  * This constructor instantiates an NMODL C++ code generator and allows writing generated code
+
1219  * directly to a file in \c [output_dir]/[mod_filename].cpp.
+
1220  *
+
1221  * \note No code generation is performed at this stage. Since the code
+
1222  * generator classes are all based on \c AstVisitor the AST must be visited using e.g. \c
+
1223  * visit_program in order to generate the C++ code corresponding to the AST.
1224  *
-
1225  * This constructor instantiates an NMODL C++ code generator and allows writing generated code
-
1226  * directly to a file in \c [output_dir]/[mod_filename].cpp.
-
1227  *
-
1228  * \note No code generation is performed at this stage. Since the code
-
1229  * generator classes are all based on \c AstVisitor the AST must be visited using e.g. \c
-
1230  * visit_program in order to generate the C++ code corresponding to the AST.
-
1231  *
-
1232  * \param mod_filename The name of the model for which code should be generated.
-
1233  * It is used for constructing an output filename.
-
1234  * \param output_dir The directory where target C++ file should be generated.
-
1235  * \param float_type The float type to use in the generated code. The string will be used
-
1236  * as-is in the target code. This defaults to \c double.
-
1237  */
- -
1239  const std::string& output_dir,
-
1240  std::string float_type,
-
1241  const bool optimize_ionvar_copies)
- -
1243 
-
1244  /**
-
1245  * \copybrief nmodl::codegen::CodegenCoreneuronCppVisitor
+
1225  * \param mod_filename The name of the model for which code should be generated.
+
1226  * It is used for constructing an output filename.
+
1227  * \param output_dir The directory where target C++ file should be generated.
+
1228  * \param float_type The float type to use in the generated code. The string will be used
+
1229  * as-is in the target code. This defaults to \c double.
+
1230  */
+ +
1232  const std::string& output_dir,
+
1233  std::string float_type,
+
1234  const bool optimize_ionvar_copies)
+ +
1236 
+
1237  /**
+
1238  * \copybrief nmodl::codegen::CodegenCoreneuronCppVisitor
+
1239  *
+
1240  * This constructor instantiates an NMODL C++ code generator and allows writing generated code
+
1241  * into an output stream.
+
1242  *
+
1243  * \note No code generation is performed at this stage. Since the code
+
1244  * generator classes are all based on \c AstVisitor the AST must be visited using e.g. \c
+
1245  * visit_program in order to generate the C++ code corresponding to the AST.
1246  *
-
1247  * This constructor instantiates an NMODL C++ code generator and allows writing generated code
-
1248  * into an output stream.
-
1249  *
-
1250  * \note No code generation is performed at this stage. Since the code
-
1251  * generator classes are all based on \c AstVisitor the AST must be visited using e.g. \c
-
1252  * visit_program in order to generate the C++ code corresponding to the AST.
-
1253  *
-
1254  * \param mod_filename The name of the model for which code should be generated.
-
1255  * It is used for constructing an output filename.
-
1256  * \param stream The output stream onto which to write the generated code
-
1257  * \param float_type The float type to use in the generated code. The string will be used
-
1258  * as-is in the target code. This defaults to \c double.
-
1259  */
- -
1261  std::ostream& stream,
-
1262  std::string float_type,
-
1263  const bool optimize_ionvar_copies)
- -
1265 
-
1266 
-
1267  /****************************************************************************************/
-
1268  /* Public printing routines for code generation for use in unit tests */
-
1269  /****************************************************************************************/
-
1270 
-
1271 
-
1272  /**
-
1273  * Print the function that initialize instance structure
-
1274  */
- -
1276 
-
1277 
-
1278  /**
-
1279  * Print the structure that wraps all range and int variables required for the NMODL
-
1280  *
-
1281  * \param print_initializers Whether or not default values for variables
-
1282  * be included in the struct declaration.
-
1283  */
-
1284  void print_mechanism_range_var_structure(bool print_initializers) override;
-
1285 };
-
1286 
-
1287 
-
1288 /**
-
1289  * \details If there is an argument with name (say alpha) same as range variable (say alpha),
-
1290  * we want to avoid it being printed as instance->alpha. And hence we disable variable
-
1291  * name lookup during prototype declaration. Note that the name of procedure can be
-
1292  * different in case of table statement.
-
1293  */
-
1294 template <typename T>
- -
1296  const std::string& name) {
- -
1298  auto type = default_float_data_type();
+
1247  * \param mod_filename The name of the model for which code should be generated.
+
1248  * It is used for constructing an output filename.
+
1249  * \param stream The output stream onto which to write the generated code
+
1250  * \param float_type The float type to use in the generated code. The string will be used
+
1251  * as-is in the target code. This defaults to \c double.
+
1252  */
+ +
1254  std::ostream& stream,
+
1255  std::string float_type,
+
1256  const bool optimize_ionvar_copies)
+ +
1258 
+
1259 
+
1260  /****************************************************************************************/
+
1261  /* Public printing routines for code generation for use in unit tests */
+
1262  /****************************************************************************************/
+
1263 
+
1264 
+
1265  /**
+
1266  * Print the function that initialize instance structure
+
1267  */
+ +
1269 
+
1270 
+
1271  /**
+
1272  * Print the structure that wraps all range and int variables required for the NMODL
+
1273  *
+
1274  * \param print_initializers Whether or not default values for variables
+
1275  * be included in the struct declaration.
+
1276  */
+
1277  void print_mechanism_range_var_structure(bool print_initializers) override;
+
1278 };
+
1279 
+
1280 
+
1281 /**
+
1282  * \details If there is an argument with name (say alpha) same as range variable (say alpha),
+
1283  * we want to avoid it being printed as instance->alpha. And hence we disable variable
+
1284  * name lookup during prototype declaration. Note that the name of procedure can be
+
1285  * different in case of table statement.
+
1286  */
+
1287 template <typename T>
+ +
1289  const std::string& name) {
+ +
1291  auto type = default_float_data_type();
+
1292 
+
1293  // internal and user provided arguments
+
1294  auto internal_params = internal_method_parameters();
+
1295  const auto& params = node.get_parameters();
+
1296  for (const auto& param: params) {
+
1297  internal_params.emplace_back("", type, "", param.get()->get_node_name());
+
1298  }
1299 
-
1300  // internal and user provided arguments
-
1301  auto internal_params = internal_method_parameters();
-
1302  const auto& params = node.get_parameters();
-
1303  for (const auto& param: params) {
-
1304  internal_params.emplace_back("", type, "", param.get()->get_node_name());
-
1305  }
-
1306 
-
1307  // procedures have "int" return type by default
-
1308  const char* return_type = "int";
-
1309  if (node.is_function_block()) {
-
1310  return_type = default_float_data_type();
-
1311  }
+
1300  // procedures have "int" return type by default
+
1301  const char* return_type = "int";
+
1302  if (node.is_function_block()) {
+
1303  return_type = default_float_data_type();
+
1304  }
+
1305 
+ +
1307  printer->add_indent();
+
1308  printer->fmt_text("inline {} {}({})",
+
1309  return_type,
+
1310  method_name(name),
+
1311  get_parameter_str(internal_params));
1312 
- -
1314  printer->add_indent();
-
1315  printer->fmt_text("inline {} {}({})",
-
1316  return_type,
-
1317  method_name(name),
-
1318  get_parameter_str(internal_params));
-
1319 
- -
1321 }
-
1322 
-
1323 /** \} */ // end of codegen_backends
-
1324 
-
1325 } // namespace codegen
-
1326 } // namespace nmodl
+ +
1314 }
+
1315 
+
1316 /** \} */ // end of codegen_backends
+
1317 
+
1318 } // namespace codegen
+
1319 } // namespace nmodl
-
virtual void print_procedure(const ast::ProcedureBlock &node) override
Print NMODL procedure in target backend code.
+
virtual void print_procedure(const ast::ProcedureBlock &node) override
Print NMODL procedure in target backend code.
virtual void print_device_method_annotation()
Print the backend specific device method annotation.
-
void print_coreneuron_includes()
Print includes from coreneuron.
-
virtual std::string net_receive_buffering_declaration()
Generate the target backend code for the net_receive_buffering function delcaration.
+
void print_coreneuron_includes()
Print includes from coreneuron.
+
virtual std::string net_receive_buffering_declaration()
Generate the target backend code for the net_receive_buffering function delcaration.
virtual bool nrn_cur_reduction_loop_required()
Check if reduction block in nrn_cur required.
virtual void print_backend_namespace_start()
Prints the start of namespace for the backend-specific code.
-
virtual void visit_solution_expression(const ast::SolutionExpression &node) override
visit node of type ast::SolutionExpression
-
void print_mechanism_range_var_structure(bool print_initializers) override
Print the structure that wraps all range and int variables required for the NMODL.
+
void print_net_move_call(const ast::FunctionCall &node) override
Print call to net_move.
+
virtual void visit_solution_expression(const ast::SolutionExpression &node) override
visit node of type ast::SolutionExpression
+
void print_mechanism_range_var_structure(bool print_initializers) override
Print the structure that wraps all range and int variables required for the NMODL.
std::string global_struct_instance() const
Name of the (host-only) global instance of global_struct
virtual void print_net_send_buf_count_update_to_host() const
Print the code to update NetSendBuffer_t count from device to host.
Visitor for printing C++ code compatible with legacy api of CoreNEURON
-
void print_function_prototypes() override
Print function and procedures prototype declaration.
-
void print_functors_definitions()
Go through the map of EigenNewtonSolverBlock s and their corresponding functor names and print the fu...
-
void print_namespace_stop() override
Prints the end of the coreneuron namespace.
+
void print_function_prototypes() override
Print function and procedures prototype declaration.
+
void print_functors_definitions()
Go through the map of EigenNewtonSolverBlock s and their corresponding functor names and print the fu...
+
void print_namespace_stop() override
Prints the end of the coreneuron namespace.
Helper to represent information about index/int variables.
-
void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
-
virtual void print_ion_variable()
Print the ion variable struct.
-
void print_derivimplicit_kernel(const ast::Block &block)
Print derivative kernel when derivimplicit method is used.
+
void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
+
virtual void print_ion_variable()
Print the ion variable struct.
+
void print_derivimplicit_kernel(const ast::Block &block)
Print derivative kernel when derivimplicit method is used.
virtual void print_device_stream_wait() const
Print the code to synchronise/wait on stream specific to NrnThread.
-
static std::pair< std::string, std::string > read_ion_variable_name(const std::string &name)
Return ion variable name and corresponding ion read variable name.
+
static std::pair< std::string, std::string > read_ion_variable_name(const std::string &name)
Return ion variable name and corresponding ion read variable name.
virtual void print_instance_struct_delete_from_device()
Delete the instance struct from the device.
virtual void print_net_send_buf_count_update_to_device() const
Print the code to update NetSendBuffer_t count from host to device.
codegen::CodegenInfo info
All ast information for code generation.
-
void print_functor_definition(const ast::EigenNewtonSolverBlock &node)
Based on the EigenNewtonSolverBlock passed print the definition needed for its functor.
-
std::string global_variable_name(const SymbolType &symbol, bool use_instance=true) const override
Determine the variable name for a global variable given its symbol.
+
void print_functor_definition(const ast::EigenNewtonSolverBlock &node)
Based on the EigenNewtonSolverBlock passed print the definition needed for its functor.
+
std::string global_variable_name(const SymbolType &symbol, bool use_instance=true) const override
Determine the variable name for a global variable given its symbol.
-
void visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) override
visit node of type ast::EigenLinearSolverBlock
-
virtual void print_newtonspace_transfer_to_device() const
Print code block to transfer newtonspace structure to device.
+
void visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) override
visit node of type ast::EigenLinearSolverBlock
+
virtual void print_newtonspace_transfer_to_device() const
Print code block to transfer newtonspace structure to device.
int thread_data_index
thread_data_index indicates number of threads being allocated.
-
void print_namespace_end() override
Print end of namespaces.
-
virtual void print_net_receive_loop_begin()
Print the code for the main net_receive loop.
+
void print_namespace_end() override
Print end of namespaces.
+
void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
+
virtual void print_net_receive_loop_begin()
Print the code for the main net_receive loop.
bool optimize_ionvar_copies
Flag to indicate if visitor should avoid ion variable copies.
virtual void print_kernel_data_present_annotation_block_begin()
Print accelerator annotations indicating data presence on device.
-
void print_backend_info() override
Print top file header printed in generated code.
-
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
-
std::string update_if_ion_variable_name(const std::string &name) const
Determine the updated name if the ion variable has been optimized.
- -
std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const override
Determine the name of an int variable given its symbol.
-
std::tuple< bool, int > check_if_var_is_array(const std::string &name)
Check if the given name exist in the symbol.
-
void print_initial_block(const ast::InitialBlock *node)
Print initial block statements.
-
void print_net_receive_kernel()
Print net_receive kernel function definition.
-
void print_thread_getters()
Print the getter method for thread variables and ids.
+
void print_backend_info() override
Print top file header printed in generated code.
+
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
+
std::string update_if_ion_variable_name(const std::string &name) const
Determine the updated name if the ion variable has been optimized.
+ +
std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const override
Determine the name of an int variable given its symbol.
+
std::tuple< bool, int > check_if_var_is_array(const std::string &name)
Check if the given name exist in the symbol.
+
void print_initial_block(const ast::InitialBlock *node)
Print initial block statements.
+
void print_net_receive_kernel()
Print net_receive kernel function definition.
+
void print_thread_getters()
Print the getter method for thread variables and ids.
std::string simulator_name() override
Name of the simulator the code was generated for.
-
void print_net_send_buffering()
Print kernel for buffering net_send events.
+
void print_net_send_buffering()
Print kernel for buffering net_send events.
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
int num_thread_objects() const noexcept
Determine the number of threads to allocate.
-
virtual void print_fast_imem_calculation() override
Print fast membrane current calculation code.
-
void print_function_declaration(const T &node, const std::string &name)
Print prototype declarations of functions or procedures.
+
virtual void print_fast_imem_calculation() override
Print fast membrane current calculation code.
+
void print_function_declaration(const T &node, const std::string &name)
Print prototype declarations of functions or procedures.
virtual void print_dt_update_to_device() const
Print the code to update dt from host to device.
virtual void print_net_init_acc_serial_annotation_block_end()
Print accelerator kernels end annotation for net_init kernel.
-
void print_net_init()
Print initial block in the net receive block.
-
void print_nrn_destructor() override
Print nrn_destructor function definition.
-
void print_sdlists_init(bool print_initializers) override
+
void print_net_init()
Print initial block in the net receive block.
+
void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
+
void print_nrn_destructor() override
Print nrn_destructor function definition.
+
void print_sdlists_init(bool print_initializers) override
Implement classes for representing symbol table at block and file scope.
std::vector< std::string > ion_read_statements(BlockType type) const
For a given output block type, return statements for all read ion variables.
- -
void print_send_event_move()
Print send event move block used in net receive as well as watch.
-
void print_table_replacement_function(const ast::Block &node)
Print replacement function for function or procedure using table.
-
std::string conc_write_statement(const std::string &ion_name, const std::string &concentration, int index)
Generate Function call statement for nrn_wrote_conc.
+ +
void print_send_event_move()
Print send event move block used in net receive as well as watch.
+
void print_table_replacement_function(const ast::Block &node)
Print replacement function for function or procedure using table.
+
std::string conc_write_statement(const std::string &ion_name, const std::string &concentration, int index)
Generate Function call statement for nrn_wrote_conc.
virtual void print_atomic_reduction_pragma() override
Print atomic update pragma for reduction statements.
std::string mod_suffix
name of the suffix
virtual void print_instance_struct_copy_to_device()
Transfer the instance struct to the device.
-
void print_global_variables_for_hoc() override
Print byte arrays that register scalar and vector variables for hoc interface.
+
void print_global_variables_for_hoc() override
Print byte arrays that register scalar and vector variables for hoc interface.
parser::NmodlParser::symbol_type SymbolType
Definition: nmodl_utils.hpp:26
-
void print_function_or_procedure(const ast::Block &node, const std::string &name) override
Print nmodl function or procedure (common code)
-
void print_net_receive_common_code(const ast::Block &node, bool need_mech_inst=true)
Print the common code section for net receive related methods.
-
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
+
void print_function_or_procedure(const ast::Block &node, const std::string &name) override
Print nmodl function or procedure (common code)
+
void print_net_receive_common_code(const ast::Block &node, bool need_mech_inst=true)
Print the common code section for net receive related methods.
+
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
const char * default_float_data_type() const noexcept
Default data type for floating point elements.
-
void print_first_pointer_var_index_getter()
Print the getter method for index position of first pointer variable.
-
void print_setup_range_variable()
Print the function that initialize range variable with different data type.
-
std::string internal_method_arguments() override
Arguments for functions that are defined and used internally.
+
void print_first_pointer_var_index_getter()
Print the getter method for index position of first pointer variable.
+
void print_setup_range_variable()
Print the function that initialize range variable with different data type.
+
std::string internal_method_arguments() override
Arguments for functions that are defined and used internally.
virtual void print_instance_struct_transfer_routine_declarations()
Print declarations of the functions used by print_instance_struct_copy_to_device and print_instance_s...
-
void print_net_move_call(const ast::FunctionCall &node)
Print call to net_move.
-
std::string nrn_thread_arguments() const override
Arguments for "_threadargs_" macro in neuron implementation.
+
std::string nrn_thread_arguments() const override
Arguments for "_threadargs_" macro in neuron implementation.
Represent newton solver solution block based on Eigen.
-
void print_net_receive_arg_size_getter()
Print the getter method for getting number of arguments for net_receive.
-
bool is_functor_const(const ast::StatementBlock &variable_block, const ast::StatementBlock &functor_block)
Checks whether the functor_block generated by sympy solver modifies any variable outside its scope.
+
void print_net_receive_arg_size_getter()
Print the getter method for getting number of arguments for net_receive.
+
bool is_functor_const(const ast::StatementBlock &variable_block, const ast::StatementBlock &functor_block)
Checks whether the functor_block generated by sympy solver modifies any variable outside its scope.
Visitor for printing C++ code compatible with legacy api of CoreNEURON
Base class for all block scoped nodes.
Definition: block.hpp:41
Represents a INITIAL block in the NMODL.
virtual void print_nrn_cur_matrix_shadow_update()
Print the update to matrix elements with/without shadow vectors.
-
std::string register_mechanism_arguments() const override
Arguments for register_mech or point_register_mech function.
+
std::string register_mechanism_arguments() const override
Arguments for register_mech or point_register_mech function.
virtual void print_net_init_acc_serial_annotation_block_begin()
Print accelerator kernels begin annotation for net_init kernel.
virtual void print_deriv_advance_flag_transfer_to_device() const
Print the code to copy derivative advance flag to device.
-
std::string process_shadow_update_statement(const ShadowUseStatement &statement, BlockType type)
Process shadow update statement.
+
std::string process_shadow_update_statement(const ShadowUseStatement &statement, BlockType type)
Process shadow update statement.
Represent WATCH statement in NMODL.
-
virtual void print_eigen_linear_solver(const std::string &float_type, int N)
-
virtual void print_before_after_block(const ast::Block *node, size_t block_id)
Print NMODL before / after block in target backend code.
+
virtual void print_eigen_linear_solver(const std::string &float_type, int N)
+
virtual void print_before_after_block(const ast::Block *node, size_t block_id)
Print NMODL before / after block in target backend code.
Represents a BREAKPOINT block in NMODL.
-
CodegenCoreneuronCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies)
Visitor for printing C++ code compatible with legacy api of CoreNEURON
+
CodegenCoreneuronCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies)
Visitor for printing C++ code compatible with legacy api of CoreNEURON
-
static std::pair< std::string, std::string > write_ion_variable_name(const std::string &name)
Return ion variable name and corresponding ion write variable name.
+
static std::pair< std::string, std::string > write_ion_variable_name(const std::string &name)
Return ion variable name and corresponding ion write variable name.
Helper class for printing C/C++ code.
-
void print_ion_var_structure()
Print structure of ion variables used for local copies.
-
ParamVector internal_method_parameters() override
Parameters for internally defined functions.
+
void print_ion_var_structure()
Print structure of ion variables used for local copies.
+
ParamVector internal_method_parameters() override
Parameters for internally defined functions.
int position_of_int_var(const std::string &name) const override
Determine the position in the data array for a given int variable.
virtual void print_channel_iteration_block_parallel_hint(BlockType type, const ast::Block *block)
Print pragma annotations for channel iterations.
virtual bool is_constant_variable(const std::string &name) const
Check if variable is qualified as constant.
-
void print_function_procedure_helper(const ast::Block &node) override
Common helper function to help printing function or procedure blocks.
-
const char * external_method_parameters(bool table=false) noexcept override
Parameters for functions in generated code that are called back from external code.
-
void visit_for_netcon(const ast::ForNetcon &node) override
visit node of type ast::ForNetcon
-
virtual void print_compute_functions() override
Print all compute functions for every backend.
-
void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
Print the nrn_cur kernel with NMODL conductance keyword provisions.
+
void print_function_procedure_helper(const ast::Block &node) override
Common helper function to help printing function or procedure blocks.
+
const char * external_method_parameters(bool table=false) noexcept override
Parameters for functions in generated code that are called back from external code.
+
void visit_for_netcon(const ast::ForNetcon &node) override
visit node of type ast::ForNetcon
+
virtual void print_compute_functions() override
Print all compute functions for every backend.
+
void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
Print the nrn_cur kernel with NMODL conductance keyword provisions.
virtual void print_memory_allocation_routine() const
Print memory allocation routine.
-
void print_check_table_thread_function()
Print check_table functions.
-
void print_namespace_begin() override
Print start of namespaces.
+
void print_check_table_thread_function()
Print check_table functions.
+
void print_namespace_begin() override
Print start of namespaces.
virtual std::string backend_name() const override
Name of the code generation backend.
virtual void print_rhs_d_shadow_variables()
Print the setup method for setting matrix shadow vectors.
-
std::string process_verbatim_text(std::string const &text) override
Process a verbatim block for possible variable renaming.
-
void print_net_receive()
Print net_receive function definition.
+
std::string process_verbatim_text(std::string const &text) override
Process a verbatim block for possible variable renaming.
+
void print_net_receive()
Print net_receive function definition.
bool vectorize
true if mod file is vectorizable (which should be always true for coreneuron) But there are some bloc...
std::string breakpoint_current(std::string current) const
Determine the variable name for the "current" used in breakpoint block taking into account intermedia...
-
void print_function(const ast::FunctionBlock &node) override
Print NMODL function in target backend code.
-
void print_top_verbatim_blocks()
Print top level (global scope) verbatim blocks.
+
void print_function(const ast::FunctionBlock &node) override
Print NMODL function in target backend code.
+
void print_top_verbatim_blocks()
Print top level (global scope) verbatim blocks.
Various types to store code generation specific information.
std::vector< std::string > ion_read_statements_optimized(BlockType type) const
For a given output block type, return minimal statements for all read ion variables.
Represent linear solver solution block based on Eigen.
-
void print_mechanism_global_var_structure(bool print_initializers) override
Print the structure that wraps all global variables used in the NMODL.
-
void print_net_send_call(const ast::FunctionCall &node)
Print call to net_send.
-
void visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) override
visit node of type ast::EigenNewtonSolverBlock
-
void print_nrn_constructor() override
Print nrn_constructor function definition.
+
void print_mechanism_global_var_structure(bool print_initializers) override
Print the structure that wraps all global variables used in the NMODL.
+
void visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) override
visit node of type ast::EigenNewtonSolverBlock
+
void print_nrn_constructor() override
Print nrn_constructor function definition.
virtual void print_kernel_data_present_annotation_block_end()
Print matching block end of accelerator annotations for data presence on device.
virtual void print_instance_struct_transfer_routines(std::vector< std::string > const &)
Print the definitions of the functions used by print_instance_struct_copy_to_device and print_instanc...
-
void print_nrn_alloc() override
Print nrn_alloc function definition.
+
void print_nrn_alloc() override
Print nrn_alloc function definition.
virtual void print_nrn_cur_matrix_shadow_reduction()
Print the reduction to matrix elements from shadow vectors.
-
void print_memb_list_getter()
Print the getter method for returning membrane list from NrnThread.
+
void print_memb_list_getter()
Print the getter method for returning membrane list from NrnThread.
static std::string get_parameter_str(const ParamVector &params)
Generate the string representing the procedure parameter declaration.
- -
const char * external_method_arguments() noexcept override
Arguments for external functions called from generated code.
-
void print_instance_variable_setup()
Print the function that initialize instance structure.
-
void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
+ +
const char * external_method_arguments() noexcept override
Arguments for external functions called from generated code.
+
void print_instance_variable_setup()
Print the function that initialize instance structure.
+
void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
Represents block encapsulating list of statements.
-
std::string get_variable_name(const std::string &name, bool use_instance=true) const override
Determine variable name in the structure of mechanism properties.
-
void print_namespace_start() override
Prints the start of the coreneuron namespace.
+
std::string get_variable_name(const std::string &name, bool use_instance=true) const override
Determine variable name in the structure of mechanism properties.
+
void print_namespace_start() override
Prints the start of the coreneuron namespace.
virtual void print_abort_routine() const
Print backend specific abort routine.
-
void print_table_check_function(const ast::Block &node)
Print check_function() for functions or procedure using table.
-
void print_nrn_cur() override
Print nrn_cur / current update function definition.
-
std::string get_range_var_float_type(const SymbolType &symbol)
Returns floating point type for given range variable symbol.
+
void print_table_check_function(const ast::Block &node)
Print check_function() for functions or procedure using table.
+
void print_nrn_cur() override
Print nrn_cur / current update function definition.
+
std::string get_range_var_float_type(const SymbolType &symbol)
Returns floating point type for given range variable symbol.
bool ion_variable_struct_required() const
Check if a structure for ion variables is required.
-
virtual void print_net_send_buffering_cnt_update() const
Print the code related to the update of NetSendBuffer_t cnt.
-
void print_thread_memory_callbacks()
Print thread related memory allocation and deallocation callbacks.
+
virtual void print_net_send_buffering_cnt_update() const
Print the code related to the update of NetSendBuffer_t cnt.
+
void print_thread_memory_callbacks()
Print thread related memory allocation and deallocation callbacks.
Represent a callback to NEURON's derivimplicit solver.
Represents ion write statement during code generation.
-
void print_net_receive_buffering(bool need_mech_inst=true)
Print kernel for buffering net_receive events.
-
virtual void print_global_function_common_code(BlockType type, const std::string &function_name="") override
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
+
void print_net_receive_buffering(bool need_mech_inst=true)
Print kernel for buffering net_receive events.
+
virtual void print_global_function_common_code(BlockType type, const std::string &function_name="") override
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
std::string float_type
Data type of floating point variables.
Implement logger based on spdlog library.
virtual void print_global_var_struct_decl()
Instantiate global var instance.
Represent solution of a block in the AST.
bool enable_variable_name_lookup
Variable name should be converted to instance name (but not for function arguments)
BlockType
Helper to represent various block types.
-
void print_mechanism_register() override
Print the mechanism registration function.
+
void print_mechanism_register() override
Print the mechanism registration function.
virtual void print_global_method_annotation()
Print backend specific global method annotation.
-
void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
Print main body of nrn_cur function.
-
std::string nrn_thread_internal_arguments() override
Arguments for "_threadargs_" macro in neuron implementation.
+
void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
Print main body of nrn_cur function.
+
std::string nrn_thread_internal_arguments() override
Arguments for "_threadargs_" macro in neuron implementation.
bool optimize_ion_variable_copies() const
Check if ion variable copies should be avoided.
virtual void print_device_atomic_capture_annotation() const
Print pragma annotation for increase and capture of variable in automatic way.
-
void visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) override
visit node of type ast::DerivimplicitCallback
+
void visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) override
visit node of type ast::DerivimplicitCallback
std::vector< ShadowUseStatement > ion_write_statements(BlockType type)
For a given output block type, return statements for writing back ion variables.
Visitor for printing C++ code compatible with legacy api of CoreNEURON
-
virtual void print_get_memb_list()
Print the target backend code for defining and checking a local Memb_list variable.
-
void print_num_variable_getter()
Print the getter methods for float and integer variables count.
+
virtual void print_get_memb_list()
Print the target backend code for defining and checking a local Memb_list variable.
+
void print_num_variable_getter()
Print the getter methods for float and integer variables count.
std::string mod_filename
Name of mod file (without .mod suffix)
-
void print_standard_includes() override
Print standard C/C++ includes.
-
virtual void print_net_receive_loop_end()
Print the code for closing the main net_receive loop.
-
void print_mech_type_getter()
Print the getter method for returning mechtype.
-
std::string float_variable_name(const SymbolType &symbol, bool use_instance) const override
Determine the name of a float variable given its symbol.
+
void print_standard_includes() override
Print standard C/C++ includes.
+
virtual void print_net_receive_loop_end()
Print the code for closing the main net_receive loop.
+
void print_mech_type_getter()
Print the getter method for returning mechtype.
+
std::string float_variable_name(const SymbolType &symbol, bool use_instance) const override
Determine the name of a float variable given its symbol.
std::string global_struct() const
Name of structure that wraps global variables.
-
virtual void print_global_variable_device_update_annotation()
Print the pragma annotation to update global variables from host to the device.
+
virtual void print_global_variable_device_update_annotation()
Print the pragma annotation to update global variables from host to the device.
std::unique_ptr< CodePrinter > printer
Code printer object for target (C++)
-
void print_function_tables(const ast::FunctionTableBlock &node)
Print NMODL function_table in target backend code.
-
std::string method_name(const std::string &name) const
Constructs the name of a function or procedure.
-
virtual void visit_watch_statement(const ast::WatchStatement &node) override
visit node of type ast::WatchStatement
-
void print_nrn_cur_non_conductance_kernel() override
Print the nrn_cur kernel without NMODL conductance keyword provisions.
+
void print_function_tables(const ast::FunctionTableBlock &node)
Print NMODL function_table in target backend code.
+
std::string method_name(const std::string &name) const
Constructs the name of a function or procedure.
+
virtual void visit_watch_statement(const ast::WatchStatement &node) override
visit node of type ast::WatchStatement
+
void print_nrn_cur_non_conductance_kernel() override
Print the nrn_cur kernel without NMODL conductance keyword provisions.
virtual void print_backend_includes()
Print backend specific includes (none needed for C++ backend)
-
virtual void print_global_var_struct_assertions() const
Print static assertions about the global variable struct.
+
virtual void print_global_var_struct_assertions() const
Print static assertions about the global variable struct.
std::string process_verbatim_token(const std::string &token)
Process a token in a verbatim block for possible variable renaming.
-
void print_nrn_state() override
Print nrn_state / state update function definition.
-
void print_function_call(const ast::FunctionCall &node) override
Print call to internal or external function.
-
virtual void print_codegen_routines() override
Print entry point to code generation.
- -
virtual void print_net_send_buffering_grow()
Print statement that grows NetSendBuffering_t structure if needed.
+
void print_nrn_state() override
Print nrn_state / state update function definition.
+
virtual void print_codegen_routines() override
Print entry point to code generation.
+ +
virtual void print_net_send_buffering_grow()
Print statement that grows NetSendBuffering_t structure if needed.
virtual void print_backend_namespace_stop()
Prints the end of namespace for the backend-specific code.
-
void print_net_event_call(const ast::FunctionCall &node)
Print call to net_event.
virtual void print_net_send_buf_update_to_host() const
Print the code to update NetSendBuffer_t from device to host.
-
void print_data_structures(bool print_initializers) override
Print all classes.
-
std::string replace_if_verbatim_variable(std::string name)
Replace commonly used verbatim variables.
-
virtual void print_ion_var_constructor(const std::vector< std::string > &members)
Print constructor of ion variables.
+
void print_data_structures(bool print_initializers) override
Print all classes.
+
std::string replace_if_verbatim_variable(std::string name)
Replace commonly used verbatim variables.
+
virtual void print_ion_var_constructor(const std::vector< std::string > &members)
Print constructor of ion variables.
int position_of_float_var(const std::string &name) const override
Determine the position in the data array for a given float variable.
std::string instance_struct() const
Name of structure that wraps range variables.
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
diff --git a/html/doxygen/codegen__cpp__visitor_8cpp_source.html b/html/doxygen/codegen__cpp__visitor_8cpp_source.html index 5bcc1a3013..0d7ffedffd 100644 --- a/html/doxygen/codegen__cpp__visitor_8cpp_source.html +++ b/html/doxygen/codegen__cpp__visitor_8cpp_source.html @@ -310,750 +310,787 @@
214 /* Main printing routines for code generation */
215 /****************************************************************************************/
216 
-
217 
- -
219  printer->add_line("#ifndef NRN_PRCELLSTATE");
-
220  printer->add_line("#define NRN_PRCELLSTATE 0");
-
221  printer->add_line("#endif");
-
222 }
+ +
218  const auto& name = node.get_node_name();
+
219  auto function_name = name;
+
220  if (defined_method(name)) {
+
221  function_name = method_name(name);
+
222  }
223 
-
224 
- -
226  auto variable_printer = [&](const std::vector<SymbolType>& variables) {
-
227  for (const auto& v: variables) {
-
228  auto name = v->get_name();
-
229  if (!info.point_process) {
-
230  name += "_" + info.mod_suffix;
-
231  }
-
232  if (v->is_array()) {
-
233  name += fmt::format("[{}]", v->get_length());
-
234  }
-
235  printer->add_line(add_escape_quote(name), ",");
-
236  }
-
237  };
+
224  if (is_net_send(name)) {
+
225  print_net_send_call(node);
+
226  return;
+
227  }
+
228 
+
229  if (is_net_move(name)) {
+
230  print_net_move_call(node);
+
231  return;
+
232  }
+
233 
+
234  if (is_net_event(name)) {
+
235  print_net_event_call(node);
+
236  return;
+
237  }
238 
-
239  printer->add_newline(2);
-
240  printer->add_line("/** channel information */");
-
241  printer->fmt_line("static const char *{}[] = {{", get_channel_info_var_name());
-
242  printer->increase_indent();
-
243  printer->add_line(add_escape_quote(nmodl_version()), ",");
-
244  printer->add_line(add_escape_quote(info.mod_suffix), ",");
-
245  variable_printer(info.range_parameter_vars);
-
246  printer->add_line("0,");
-
247  variable_printer(info.range_assigned_vars);
-
248  printer->add_line("0,");
-
249  variable_printer(info.range_state_vars);
-
250  printer->add_line("0,");
-
251  variable_printer(info.pointer_variables);
-
252  printer->add_line("0");
-
253  printer->decrease_indent();
-
254  printer->add_line("};");
-
255 }
-
256 
-
257 
-
258 /****************************************************************************************/
-
259 /* Printing routines for code generation */
-
260 /****************************************************************************************/
-
261 
-
262 
- -
264  bool open_brace,
-
265  bool close_brace) {
-
266  if (open_brace) {
-
267  printer->push_block();
-
268  }
-
269 
-
270  const auto& statements = node.get_statements();
-
271  for (const auto& statement: statements) {
-
272  if (statement_to_skip(*statement)) {
-
273  continue;
-
274  }
-
275  /// not necessary to add indent for verbatim block (pretty-printing)
-
276  if (!statement->is_verbatim() && !statement->is_mutex_lock() &&
-
277  !statement->is_mutex_unlock() && !statement->is_protect_statement()) {
-
278  printer->add_indent();
-
279  }
-
280  statement->accept(*this);
-
281  if (need_semicolon(*statement)) {
-
282  printer->add_text(';');
-
283  }
-
284  if (!statement->is_mutex_lock() && !statement->is_mutex_unlock()) {
-
285  printer->add_newline();
-
286  }
-
287  }
-
288 
-
289  if (close_brace) {
-
290  printer->pop_block_nl(0);
-
291  }
-
292 }
+
239  const auto& arguments = node.get_arguments();
+
240  printer->add_text(function_name, '(');
+
241 
+
242  if (defined_method(name)) {
+
243  printer->add_text(internal_method_arguments());
+
244  if (!arguments.empty()) {
+
245  printer->add_text(", ");
+
246  }
+
247  }
+
248 
+
249  print_vector_elements(arguments, ", ");
+
250  printer->add_text(')');
+
251 }
+
252 
+
253 
+ +
255  printer->add_line("#ifndef NRN_PRCELLSTATE");
+
256  printer->add_line("#define NRN_PRCELLSTATE 0");
+
257  printer->add_line("#endif");
+
258 }
+
259 
+
260 
+ +
262  auto variable_printer = [&](const std::vector<SymbolType>& variables) {
+
263  for (const auto& v: variables) {
+
264  auto name = v->get_name();
+
265  if (!info.point_process) {
+
266  name += "_" + info.mod_suffix;
+
267  }
+
268  if (v->is_array()) {
+
269  name += fmt::format("[{}]", v->get_length());
+
270  }
+
271  printer->add_line(add_escape_quote(name), ",");
+
272  }
+
273  };
+
274 
+
275  printer->add_newline(2);
+
276  printer->add_line("/** channel information */");
+
277  printer->fmt_line("static const char *{}[] = {{", get_channel_info_var_name());
+
278  printer->increase_indent();
+
279  printer->add_line(add_escape_quote(nmodl_version()), ",");
+
280  printer->add_line(add_escape_quote(info.mod_suffix), ",");
+
281  variable_printer(info.range_parameter_vars);
+
282  printer->add_line("0,");
+
283  variable_printer(info.range_assigned_vars);
+
284  printer->add_line("0,");
+
285  variable_printer(info.range_state_vars);
+
286  printer->add_line("0,");
+
287  variable_printer(info.pointer_variables);
+
288  printer->add_line("0");
+
289  printer->decrease_indent();
+
290  printer->add_line("};");
+
291 }
+
292 
293 
-
294 
-
295 /**
-
296  * \todo Issue with verbatim renaming. e.g. pattern.mod has info struct with
-
297  * index variable. If we use "index" instead of "indexes" as default argument
-
298  * then during verbatim replacement we don't know the index is which one. This
-
299  * is because verbatim renaming pass has already stripped out prefixes from
-
300  * the text.
-
301  */
- -
303  const auto& default_arguments = stringutils::split_string(nrn_thread_arguments(), ',');
-
304  for (const auto& dirty_arg: default_arguments) {
-
305  const auto& arg = stringutils::trim(dirty_arg);
-
306  RenameVisitor v(arg, "arg_" + arg);
-
307  for (const auto& function: info.functions) {
-
308  if (has_parameter_of_name(function, arg)) {
-
309  function->accept(v);
-
310  }
-
311  }
-
312  for (const auto& function: info.procedures) {
-
313  if (has_parameter_of_name(function, arg)) {
-
314  function->accept(v);
-
315  }
-
316  }
-
317  }
-
318 }
-
319 
-
320 
-
321 /****************************************************************************************/
-
322 /* Main code printing entry points */
-
323 /****************************************************************************************/
+
294 /****************************************************************************************/
+
295 /* Printing routines for code generation */
+
296 /****************************************************************************************/
+
297 
+
298 
+ +
300  bool open_brace,
+
301  bool close_brace) {
+
302  if (open_brace) {
+
303  printer->push_block();
+
304  }
+
305 
+
306  const auto& statements = node.get_statements();
+
307  for (const auto& statement: statements) {
+
308  if (statement_to_skip(*statement)) {
+
309  continue;
+
310  }
+
311  /// not necessary to add indent for verbatim block (pretty-printing)
+
312  if (!statement->is_verbatim() && !statement->is_mutex_lock() &&
+
313  !statement->is_mutex_unlock() && !statement->is_protect_statement()) {
+
314  printer->add_indent();
+
315  }
+
316  statement->accept(*this);
+
317  if (need_semicolon(*statement)) {
+
318  printer->add_text(';');
+
319  }
+
320  if (!statement->is_mutex_lock() && !statement->is_mutex_unlock()) {
+
321  printer->add_newline();
+
322  }
+
323  }
324 
-
325 
-
326 /**
-
327  * NMODL constants from unit database
-
328  *
-
329  */
- -
331  if (!info.factor_definitions.empty()) {
-
332  printer->add_newline(2);
-
333  printer->add_line("/** constants used in nmodl from UNITS */");
-
334  for (const auto& it: info.factor_definitions) {
-
335  const std::string format_string = "static const double {} = {};";
-
336  printer->fmt_line(format_string, it->get_node_name(), it->get_value()->get_value());
-
337  }
-
338  }
-
339 }
-
340 
-
341 
-
342 /****************************************************************************************/
-
343 /* Overloaded visitor routines */
-
344 /****************************************************************************************/
-
345 
-
346 
-
347 extern const std::regex regex_special_chars{R"([-[\]{}()*+?.,\^$|#\s])"};
-
348 
-
349 
- -
351  if (!codegen) {
-
352  return;
+
325  if (close_brace) {
+
326  printer->pop_block_nl(0);
+
327  }
+
328 }
+
329 
+
330 
+
331 /**
+
332  * \todo Issue with verbatim renaming. e.g. pattern.mod has info struct with
+
333  * index variable. If we use "index" instead of "indexes" as default argument
+
334  * then during verbatim replacement we don't know the index is which one. This
+
335  * is because verbatim renaming pass has already stripped out prefixes from
+
336  * the text.
+
337  */
+ +
339  const auto& default_arguments = stringutils::split_string(nrn_thread_arguments(), ',');
+
340  for (const auto& dirty_arg: default_arguments) {
+
341  const auto& arg = stringutils::trim(dirty_arg);
+
342  RenameVisitor v(arg, "arg_" + arg);
+
343  for (const auto& function: info.functions) {
+
344  if (has_parameter_of_name(function, arg)) {
+
345  function->accept(v);
+
346  }
+
347  }
+
348  for (const auto& function: info.procedures) {
+
349  if (has_parameter_of_name(function, arg)) {
+
350  function->accept(v);
+
351  }
+
352  }
353  }
-
354  std::string name = node.eval();
-
355  if (enable_variable_name_lookup) {
-
356  name = get_variable_name(name);
-
357  }
-
358  printer->add_text(name);
-
359 }
+
354 }
+
355 
+
356 
+
357 /****************************************************************************************/
+
358 /* Main code printing entry points */
+
359 /****************************************************************************************/
360 
-
361 
- -
363  if (!codegen) {
-
364  return;
-
365  }
-
366  const auto& value = node.get_value();
-
367  printer->add_text(std::to_string(value));
-
368 }
-
369 
-
370 
- -
372  if (!codegen) {
-
373  return;
+
361 
+
362 /**
+
363  * NMODL constants from unit database
+
364  *
+
365  */
+ +
367  if (!info.factor_definitions.empty()) {
+
368  printer->add_newline(2);
+
369  printer->add_line("/** constants used in nmodl from UNITS */");
+
370  for (const auto& it: info.factor_definitions) {
+
371  const std::string format_string = "static const double {} = {};";
+
372  printer->fmt_line(format_string, it->get_node_name(), it->get_value()->get_value());
+
373  }
374  }
-
375  printer->add_text(format_float_string(node.get_value()));
-
376 }
+
375 }
+
376 
377 
-
378 
- -
380  if (!codegen) {
-
381  return;
-
382  }
-
383  printer->add_text(format_double_string(node.get_value()));
-
384 }
-
385 
-
386 
- -
388  if (!codegen) {
-
389  return;
-
390  }
-
391  printer->add_text(std::to_string(static_cast<int>(node.eval())));
-
392 }
-
393 
-
394 
- -
396  if (!codegen) {
-
397  return;
-
398  }
-
399  node.visit_children(*this);
-
400 }
-
401 
-
402 
- -
404  // do not print units
-
405 }
+
378 /****************************************************************************************/
+
379 /* Overloaded visitor routines */
+
380 /****************************************************************************************/
+
381 
+
382 
+
383 extern const std::regex regex_special_chars{R"([-[\]{}()*+?.,\^$|#\s])"};
+
384 
+
385 
+ +
387  if (!codegen) {
+
388  return;
+
389  }
+
390  std::string name = node.eval();
+
391  if (enable_variable_name_lookup) {
+
392  name = get_variable_name(name);
+
393  }
+
394  printer->add_text(name);
+
395 }
+
396 
+
397 
+ +
399  if (!codegen) {
+
400  return;
+
401  }
+
402  const auto& value = node.get_value();
+
403  printer->add_text(std::to_string(value));
+
404 }
+
405 
406 
-
407 
- -
409  throw std::runtime_error("PRIME encountered during code generation, ODEs not solved?");
-
410 }
-
411 
-
412 
-
413 /**
-
414  * \todo : Validate how @ is being handled in neuron implementation
-
415  */
- -
417  if (!codegen) {
-
418  return;
-
419  }
-
420  const auto& name = node.get_name();
-
421  const auto& at_index = node.get_at();
-
422  const auto& index = node.get_index();
-
423  name->accept(*this);
-
424  if (at_index) {
-
425  printer->add_text("@");
-
426  at_index->accept(*this);
-
427  }
-
428  if (index) {
-
429  printer->add_text("[");
-
430  printer->add_text("static_cast<int>(");
-
431  index->accept(*this);
-
432  printer->add_text(")");
-
433  printer->add_text("]");
+ +
408  if (!codegen) {
+
409  return;
+
410  }
+
411  printer->add_text(format_float_string(node.get_value()));
+
412 }
+
413 
+
414 
+ +
416  if (!codegen) {
+
417  return;
+
418  }
+
419  printer->add_text(format_double_string(node.get_value()));
+
420 }
+
421 
+
422 
+ +
424  if (!codegen) {
+
425  return;
+
426  }
+
427  printer->add_text(std::to_string(static_cast<int>(node.eval())));
+
428 }
+
429 
+
430 
+ +
432  if (!codegen) {
+
433  return;
434  }
-
435 }
-
436 
+
435  node.visit_children(*this);
+
436 }
437 
- -
439  if (!codegen) {
-
440  return;
-
441  }
-
442  node.get_name()->accept(*this);
-
443  printer->add_text("[");
-
444  printer->add_text("static_cast<int>(");
-
445  node.get_length()->accept(*this);
-
446  printer->add_text(")");
-
447  printer->add_text("]");
-
448 }
-
449 
-
450 
- -
452  if (!codegen) {
-
453  return;
-
454  }
-
455  printer->add_text(local_var_type(), ' ');
-
456  print_vector_elements(node.get_variables(), ", ");
-
457 }
-
458 
-
459 
- -
461  if (!codegen) {
-
462  return;
+
438 
+ +
440  // do not print units
+
441 }
+
442 
+
443 
+ +
445  throw std::runtime_error("PRIME encountered during code generation, ODEs not solved?");
+
446 }
+
447 
+
448 
+
449 /**
+
450  * \todo : Validate how @ is being handled in neuron implementation
+
451  */
+ +
453  if (!codegen) {
+
454  return;
+
455  }
+
456  const auto& name = node.get_name();
+
457  const auto& at_index = node.get_at();
+
458  const auto& index = node.get_index();
+
459  name->accept(*this);
+
460  if (at_index) {
+
461  printer->add_text("@");
+
462  at_index->accept(*this);
463  }
-
464  printer->add_text("if (");
-
465  node.get_condition()->accept(*this);
-
466  printer->add_text(") ");
-
467  node.get_statement_block()->accept(*this);
-
468  print_vector_elements(node.get_elseifs(), "");
-
469  const auto& elses = node.get_elses();
-
470  if (elses) {
-
471  elses->accept(*this);
-
472  }
-
473 }
-
474 
-
475 
- -
477  if (!codegen) {
-
478  return;
-
479  }
-
480  printer->add_text(" else if (");
-
481  node.get_condition()->accept(*this);
-
482  printer->add_text(") ");
-
483  node.get_statement_block()->accept(*this);
+
464  if (index) {
+
465  printer->add_text("[");
+
466  printer->add_text("static_cast<int>(");
+
467  index->accept(*this);
+
468  printer->add_text(")");
+
469  printer->add_text("]");
+
470  }
+
471 }
+
472 
+
473 
+ +
475  if (!codegen) {
+
476  return;
+
477  }
+
478  node.get_name()->accept(*this);
+
479  printer->add_text("[");
+
480  printer->add_text("static_cast<int>(");
+
481  node.get_length()->accept(*this);
+
482  printer->add_text(")");
+
483  printer->add_text("]");
484 }
485 
486 
- +
488  if (!codegen) {
489  return;
490  }
-
491  printer->add_text(" else ");
-
492  node.visit_children(*this);
+
491  printer->add_text(local_var_type(), ' ');
+
492  print_vector_elements(node.get_variables(), ", ");
493 }
494 
495 
- -
497  printer->add_text("while (");
-
498  node.get_condition()->accept(*this);
-
499  printer->add_text(") ");
-
500  node.get_statement_block()->accept(*this);
-
501 }
-
502 
-
503 
- -
505  if (!codegen) {
-
506  return;
-
507  }
-
508  auto name = node.get_node_name();
-
509  const auto& from = node.get_from();
-
510  const auto& to = node.get_to();
-
511  const auto& inc = node.get_increment();
-
512  const auto& block = node.get_statement_block();
-
513  printer->fmt_text("for (int {} = ", name);
-
514  from->accept(*this);
-
515  printer->fmt_text("; {} <= ", name);
-
516  to->accept(*this);
-
517  if (inc) {
-
518  printer->fmt_text("; {} += ", name);
-
519  inc->accept(*this);
-
520  } else {
-
521  printer->fmt_text("; {}++", name);
-
522  }
-
523  printer->add_text(") ");
-
524  block->accept(*this);
-
525 }
-
526 
-
527 
- -
529  if (!codegen) {
-
530  return;
-
531  }
-
532  printer->add_text("(");
-
533  node.get_expression()->accept(*this);
-
534  printer->add_text(")");
-
535 }
-
536 
-
537 
- -
539  if (!codegen) {
-
540  return;
-
541  }
-
542  auto op = node.get_op().eval();
-
543  const auto& lhs = node.get_lhs();
-
544  const auto& rhs = node.get_rhs();
-
545  if (op == "^") {
-
546  printer->add_text("pow(");
-
547  lhs->accept(*this);
-
548  printer->add_text(", ");
-
549  rhs->accept(*this);
-
550  printer->add_text(")");
-
551  } else {
-
552  lhs->accept(*this);
-
553  printer->add_text(" " + op + " ");
-
554  rhs->accept(*this);
-
555  }
-
556 }
-
557 
-
558 
- -
560  if (!codegen) {
-
561  return;
-
562  }
-
563  printer->add_text(node.eval());
-
564 }
-
565 
-
566 
- -
568  if (!codegen) {
-
569  return;
-
570  }
-
571  printer->add_text(" " + node.eval());
-
572 }
+ +
497  if (!codegen) {
+
498  return;
+
499  }
+
500  printer->add_text("if (");
+
501  node.get_condition()->accept(*this);
+
502  printer->add_text(") ");
+
503  node.get_statement_block()->accept(*this);
+
504  print_vector_elements(node.get_elseifs(), "");
+
505  const auto& elses = node.get_elses();
+
506  if (elses) {
+
507  elses->accept(*this);
+
508  }
+
509 }
+
510 
+
511 
+ +
513  if (!codegen) {
+
514  return;
+
515  }
+
516  printer->add_text(" else if (");
+
517  node.get_condition()->accept(*this);
+
518  printer->add_text(") ");
+
519  node.get_statement_block()->accept(*this);
+
520 }
+
521 
+
522 
+ +
524  if (!codegen) {
+
525  return;
+
526  }
+
527  printer->add_text(" else ");
+
528  node.visit_children(*this);
+
529 }
+
530 
+
531 
+ +
533  printer->add_text("while (");
+
534  node.get_condition()->accept(*this);
+
535  printer->add_text(") ");
+
536  node.get_statement_block()->accept(*this);
+
537 }
+
538 
+
539 
+ +
541  if (!codegen) {
+
542  return;
+
543  }
+
544  auto name = node.get_node_name();
+
545  const auto& from = node.get_from();
+
546  const auto& to = node.get_to();
+
547  const auto& inc = node.get_increment();
+
548  const auto& block = node.get_statement_block();
+
549  printer->fmt_text("for (int {} = ", name);
+
550  from->accept(*this);
+
551  printer->fmt_text("; {} <= ", name);
+
552  to->accept(*this);
+
553  if (inc) {
+
554  printer->fmt_text("; {} += ", name);
+
555  inc->accept(*this);
+
556  } else {
+
557  printer->fmt_text("; {}++", name);
+
558  }
+
559  printer->add_text(") ");
+
560  block->accept(*this);
+
561 }
+
562 
+
563 
+ +
565  if (!codegen) {
+
566  return;
+
567  }
+
568  printer->add_text("(");
+
569  node.get_expression()->accept(*this);
+
570  printer->add_text(")");
+
571 }
+
572 
573 
-
574 
-
575 /**
-
576  * \details Statement block is top level construct (for every nmodl block).
-
577  * Sometime we want to analyse ast nodes even if code generation is
-
578  * false. Hence we visit children even if code generation is false.
-
579  */
- -
581  if (!codegen) {
-
582  node.visit_children(*this);
-
583  return;
-
584  }
-
585  print_statement_block(node);
-
586 }
-
587 
-
588 
- -
590  if (!codegen) {
-
591  return;
-
592  }
-
593  print_function_call(node);
-
594 }
-
595 
-
596 
- -
598  if (!codegen) {
-
599  return;
-
600  }
-
601  const auto& text = node.get_statement()->eval();
-
602  const auto& result = process_verbatim_text(text);
-
603 
-
604  const auto& statements = stringutils::split_string(result, '\n');
-
605  for (const auto& statement: statements) {
-
606  const auto& trimed_stmt = stringutils::trim_newline(statement);
-
607  if (trimed_stmt.find_first_not_of(' ') != std::string::npos) {
-
608  printer->add_line(trimed_stmt);
-
609  }
-
610  }
-
611 }
-
612 
-
613 
- -
615  // dt change statement should be pulled outside already
-
616 }
-
617 
-
618 
- -
620  print_atomic_reduction_pragma();
-
621  printer->add_indent();
-
622  node.get_expression()->accept(*this);
-
623  printer->add_text(";");
-
624 }
-
625 
-
626 
- -
628  printer->fmt_line("#pragma omp critical ({})", info.mod_suffix);
-
629  printer->add_indent();
-
630  printer->push_block();
-
631 }
+ +
575  if (!codegen) {
+
576  return;
+
577  }
+
578  auto op = node.get_op().eval();
+
579  const auto& lhs = node.get_lhs();
+
580  const auto& rhs = node.get_rhs();
+
581  if (op == "^") {
+
582  printer->add_text("pow(");
+
583  lhs->accept(*this);
+
584  printer->add_text(", ");
+
585  rhs->accept(*this);
+
586  printer->add_text(")");
+
587  } else {
+
588  lhs->accept(*this);
+
589  printer->add_text(" " + op + " ");
+
590  rhs->accept(*this);
+
591  }
+
592 }
+
593 
+
594 
+ +
596  if (!codegen) {
+
597  return;
+
598  }
+
599  printer->add_text(node.eval());
+
600 }
+
601 
+
602 
+ +
604  if (!codegen) {
+
605  return;
+
606  }
+
607  printer->add_text(" " + node.eval());
+
608 }
+
609 
+
610 
+
611 /**
+
612  * \details Statement block is top level construct (for every nmodl block).
+
613  * Sometime we want to analyse ast nodes even if code generation is
+
614  * false. Hence we visit children even if code generation is false.
+
615  */
+ +
617  if (!codegen) {
+
618  node.visit_children(*this);
+
619  return;
+
620  }
+
621  print_statement_block(node);
+
622 }
+
623 
+
624 
+ +
626  if (!codegen) {
+
627  return;
+
628  }
+
629  print_function_call(node);
+
630 }
+
631 
632 
-
633 
- -
635  printer->pop_block();
-
636 }
-
637 
-
638 
-
639 /**
-
640  * \details Once variables are populated, update index semantics to register with coreneuron
-
641  */
-
642 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
- -
644  int index = 0;
-
645  info.semantics.clear();
-
646 
-
647  if (info.point_process) {
-
648  info.semantics.emplace_back(index++, naming::AREA_SEMANTIC, 1);
-
649  info.semantics.emplace_back(index++, naming::POINT_PROCESS_SEMANTIC, 1);
-
650  }
-
651  for (const auto& ion: info.ions) {
-
652  for (auto i = 0; i < ion.reads.size(); ++i) {
-
653  info.semantics.emplace_back(index++, ion.name + "_ion", 1);
-
654  }
-
655  for (const auto& var: ion.writes) {
-
656  /// add if variable is not present in the read list
-
657  if (std::find(ion.reads.begin(), ion.reads.end(), var) == ion.reads.end()) {
-
658  info.semantics.emplace_back(index++, ion.name + "_ion", 1);
-
659  }
-
660  if (ion.is_ionic_current(var)) {
-
661  info.semantics.emplace_back(index++, ion.name + "_ion", 1);
-
662  }
-
663  }
-
664  if (ion.need_style) {
-
665  info.semantics.emplace_back(index++, fmt::format("{}_ion", ion.name), 1);
-
666  info.semantics.emplace_back(index++, fmt::format("#{}_ion", ion.name), 1);
-
667  }
-
668  }
-
669  for (auto& var: info.pointer_variables) {
-
670  if (info.first_pointer_var_index == -1) {
-
671  info.first_pointer_var_index = index;
-
672  }
-
673  int size = var->get_length();
-
674  if (var->has_any_property(NmodlType::pointer_var)) {
-
675  info.semantics.emplace_back(index, naming::POINTER_SEMANTIC, size);
-
676  } else {
-
677  info.semantics.emplace_back(index, naming::CORE_POINTER_SEMANTIC, size);
-
678  }
-
679  index += size;
-
680  }
-
681 
-
682  if (info.diam_used) {
-
683  info.semantics.emplace_back(index++, naming::DIAM_VARIABLE, 1);
-
684  }
-
685 
-
686  if (info.area_used) {
-
687  info.semantics.emplace_back(index++, naming::AREA_VARIABLE, 1);
-
688  }
-
689 
-
690  if (info.net_send_used) {
-
691  info.semantics.emplace_back(index++, naming::NET_SEND_SEMANTIC, 1);
-
692  }
-
693 
-
694  /*
-
695  * Number of semantics for watch is one greater than number of
-
696  * actual watch statements in the mod file
-
697  */
-
698  if (!info.watch_statements.empty()) {
-
699  for (int i = 0; i < info.watch_statements.size() + 1; i++) {
-
700  info.semantics.emplace_back(index++, naming::WATCH_SEMANTIC, 1);
-
701  }
-
702  }
-
703 
-
704  if (info.for_netcon_used) {
-
705  info.semantics.emplace_back(index++, naming::FOR_NETCON_SEMANTIC, 1);
-
706  }
-
707 }
-
708 
-
709 
-
710 std::vector<CodegenCppVisitor::SymbolType> CodegenCppVisitor::get_float_variables() const {
-
711  // sort with definition order
-
712  auto comparator = [](const SymbolType& first, const SymbolType& second) -> bool {
-
713  return first->get_definition_order() < second->get_definition_order();
-
714  };
-
715 
-
716  auto assigned = info.assigned_vars;
-
717  auto states = info.state_vars;
-
718 
-
719  // each state variable has corresponding Dstate variable
-
720  for (const auto& state: states) {
-
721  auto name = "D" + state->get_name();
-
722  auto symbol = make_symbol(name);
-
723  if (state->is_array()) {
-
724  symbol->set_as_array(state->get_length());
-
725  }
-
726  symbol->set_definition_order(state->get_definition_order());
-
727  assigned.push_back(symbol);
+ +
634  if (!codegen) {
+
635  return;
+
636  }
+
637  const auto& text = node.get_statement()->eval();
+
638  const auto& result = process_verbatim_text(text);
+
639 
+
640  const auto& statements = stringutils::split_string(result, '\n');
+
641  for (const auto& statement: statements) {
+
642  const auto& trimed_stmt = stringutils::trim_newline(statement);
+
643  if (trimed_stmt.find_first_not_of(' ') != std::string::npos) {
+
644  printer->add_line(trimed_stmt);
+
645  }
+
646  }
+
647 }
+
648 
+
649 
+ +
651  // dt change statement should be pulled outside already
+
652 }
+
653 
+
654 
+ +
656  print_atomic_reduction_pragma();
+
657  printer->add_indent();
+
658  node.get_expression()->accept(*this);
+
659  printer->add_text(";");
+
660 }
+
661 
+
662 
+ +
664  printer->fmt_line("#pragma omp critical ({})", info.mod_suffix);
+
665  printer->add_indent();
+
666  printer->push_block();
+
667 }
+
668 
+
669 
+ +
671  printer->pop_block();
+
672 }
+
673 
+
674 
+
675 /**
+
676  * \details Once variables are populated, update index semantics to register with coreneuron
+
677  */
+
678 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
+ +
680  int index = 0;
+
681  info.semantics.clear();
+
682 
+
683  if (info.point_process) {
+
684  info.semantics.emplace_back(index++, naming::AREA_SEMANTIC, 1);
+
685  info.semantics.emplace_back(index++, naming::POINT_PROCESS_SEMANTIC, 1);
+
686  }
+
687  for (const auto& ion: info.ions) {
+
688  for (auto i = 0; i < ion.reads.size(); ++i) {
+
689  info.semantics.emplace_back(index++, ion.name + "_ion", 1);
+
690  }
+
691  for (const auto& var: ion.writes) {
+
692  /// add if variable is not present in the read list
+
693  if (std::find(ion.reads.begin(), ion.reads.end(), var) == ion.reads.end()) {
+
694  info.semantics.emplace_back(index++, ion.name + "_ion", 1);
+
695  }
+
696  if (ion.is_ionic_current(var)) {
+
697  info.semantics.emplace_back(index++, ion.name + "_ion", 1);
+
698  }
+
699  }
+
700  if (ion.need_style) {
+
701  info.semantics.emplace_back(index++, fmt::format("{}_ion", ion.name), 1);
+
702  info.semantics.emplace_back(index++, fmt::format("#{}_ion", ion.name), 1);
+
703  }
+
704  }
+
705  for (auto& var: info.pointer_variables) {
+
706  if (info.first_pointer_var_index == -1) {
+
707  info.first_pointer_var_index = index;
+
708  }
+
709  int size = var->get_length();
+
710  if (var->has_any_property(NmodlType::pointer_var)) {
+
711  info.semantics.emplace_back(index, naming::POINTER_SEMANTIC, size);
+
712  } else {
+
713  info.semantics.emplace_back(index, naming::CORE_POINTER_SEMANTIC, size);
+
714  }
+
715  index += size;
+
716  }
+
717 
+
718  if (info.diam_used) {
+
719  info.semantics.emplace_back(index++, naming::DIAM_VARIABLE, 1);
+
720  }
+
721 
+
722  if (info.area_used) {
+
723  info.semantics.emplace_back(index++, naming::AREA_VARIABLE, 1);
+
724  }
+
725 
+
726  if (info.net_send_used) {
+
727  info.semantics.emplace_back(index++, naming::NET_SEND_SEMANTIC, 1);
728  }
-
729  std::sort(assigned.begin(), assigned.end(), comparator);
-
730 
-
731  auto variables = info.range_parameter_vars;
-
732  variables.insert(variables.end(),
-
733  info.range_assigned_vars.begin(),
-
734  info.range_assigned_vars.end());
-
735  variables.insert(variables.end(), info.range_state_vars.begin(), info.range_state_vars.end());
-
736  variables.insert(variables.end(), assigned.begin(), assigned.end());
-
737 
-
738  if (info.vectorize) {
-
739  variables.push_back(make_symbol(naming::VOLTAGE_UNUSED_VARIABLE));
-
740  }
-
741 
-
742  if (breakpoint_exist()) {
-
743  std::string name = info.vectorize ? naming::CONDUCTANCE_UNUSED_VARIABLE
- +
729 
+
730  /*
+
731  * Number of semantics for watch is one greater than number of
+
732  * actual watch statements in the mod file
+
733  */
+
734  if (!info.watch_statements.empty()) {
+
735  for (int i = 0; i < info.watch_statements.size() + 1; i++) {
+
736  info.semantics.emplace_back(index++, naming::WATCH_SEMANTIC, 1);
+
737  }
+
738  }
+
739 
+
740  if (info.for_netcon_used) {
+
741  info.semantics.emplace_back(index++, naming::FOR_NETCON_SEMANTIC, 1);
+
742  }
+
743 }
+
744 
745 
-
746  // make sure conductance variable like `g` is not already defined
-
747  if (auto r = std::find_if(variables.cbegin(),
-
748  variables.cend(),
-
749  [&](const auto& s) { return name == s->get_name(); });
-
750  r == variables.cend()) {
-
751  variables.push_back(make_symbol(name));
-
752  }
-
753  }
+
746 std::vector<CodegenCppVisitor::SymbolType> CodegenCppVisitor::get_float_variables() const {
+
747  // sort with definition order
+
748  auto comparator = [](const SymbolType& first, const SymbolType& second) -> bool {
+
749  return first->get_definition_order() < second->get_definition_order();
+
750  };
+
751 
+
752  auto assigned = info.assigned_vars;
+
753  auto states = info.state_vars;
754 
-
755  if (net_receive_exist()) {
-
756  variables.push_back(make_symbol(naming::T_SAVE_VARIABLE));
-
757  }
-
758  return variables;
-
759 }
-
760 
-
761 
-
762 /**
-
763  * IndexVariableInfo has following constructor arguments:
-
764  * - symbol
-
765  * - is_vdata (false)
-
766  * - is_index (false
-
767  * - is_integer (false)
-
768  *
-
769  * Which variables are constant qualified?
-
770  *
-
771  * - node area is read only
-
772  * - read ion variables are read only
-
773  * - style_ionname is index / offset
-
774  */
-
775 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
-
776 std::vector<IndexVariableInfo> CodegenCppVisitor::get_int_variables() {
-
777  std::vector<IndexVariableInfo> variables;
-
778  if (info.point_process) {
-
779  variables.emplace_back(make_symbol(naming::NODE_AREA_VARIABLE));
-
780  variables.back().is_constant = true;
-
781  /// note that this variable is not printed in neuron implementation
-
782  if (info.artificial_cell) {
-
783  variables.emplace_back(make_symbol(naming::POINT_PROCESS_VARIABLE), true);
-
784  } else {
-
785  variables.emplace_back(make_symbol(naming::POINT_PROCESS_VARIABLE), false, false, true);
-
786  variables.back().is_constant = true;
-
787  }
-
788  }
-
789 
-
790  for (auto& ion: info.ions) {
-
791  bool need_style = false;
-
792  std::unordered_map<std::string, int> ion_vars; // used to keep track of the variables to
-
793  // not have doubles between read/write. Same
-
794  // name variables are allowed
-
795  // See if we need to add extra readion statements to match NEURON with SoA data
-
796  auto const has_var = [&ion](const char* suffix) -> bool {
-
797  auto const pred = [name = ion.name + suffix](auto const& x) { return x == name; };
-
798  return std::any_of(ion.reads.begin(), ion.reads.end(), pred) ||
-
799  std::any_of(ion.writes.begin(), ion.writes.end(), pred);
-
800  };
-
801  auto const add_implicit_read = [&ion](const char* suffix) {
-
802  auto name = ion.name + suffix;
-
803  ion.reads.push_back(name);
-
804  ion.implicit_reads.push_back(std::move(name));
-
805  };
-
806  bool const have_ionin{has_var("i")}, have_ionout{has_var("o")};
-
807  if (have_ionin && !have_ionout) {
-
808  add_implicit_read("o");
-
809  } else if (have_ionout && !have_ionin) {
-
810  add_implicit_read("i");
-
811  }
-
812  for (const auto& var: ion.reads) {
-
813  const std::string name = naming::ION_VARNAME_PREFIX + var;
-
814  variables.emplace_back(make_symbol(name));
-
815  variables.back().is_constant = true;
-
816  ion_vars[name] = static_cast<int>(variables.size() - 1);
-
817  }
-
818 
-
819  /// symbol for di_ion_dv var
-
820  std::shared_ptr<symtab::Symbol> ion_di_dv_var = nullptr;
-
821 
-
822  for (const auto& var: ion.writes) {
-
823  const std::string name = naming::ION_VARNAME_PREFIX + var;
-
824 
-
825  const auto ion_vars_it = ion_vars.find(name);
-
826  if (ion_vars_it != ion_vars.end()) {
-
827  variables[ion_vars_it->second].is_constant = false;
-
828  } else {
-
829  variables.emplace_back(make_symbol(naming::ION_VARNAME_PREFIX + var));
-
830  }
-
831  if (ion.is_ionic_current(var)) {
-
832  ion_di_dv_var = make_symbol(std::string(naming::ION_VARNAME_PREFIX) + "di" +
-
833  ion.name + "dv");
-
834  }
-
835  if (ion.is_intra_cell_conc(var) || ion.is_extra_cell_conc(var)) {
-
836  need_style = true;
-
837  }
-
838  }
-
839 
-
840  /// insert after read/write variables but before style ion variable
-
841  if (ion_di_dv_var != nullptr) {
-
842  variables.emplace_back(ion_di_dv_var);
-
843  }
-
844 
-
845  if (need_style) {
-
846  variables.emplace_back(make_symbol(naming::ION_VARNAME_PREFIX + ion.name + "_erev"));
-
847  variables.emplace_back(make_symbol("style_" + ion.name), false, true);
-
848  variables.back().is_constant = true;
-
849  }
-
850  }
-
851 
-
852  for (const auto& var: info.pointer_variables) {
-
853  auto name = var->get_name();
-
854  if (var->has_any_property(NmodlType::pointer_var)) {
-
855  variables.emplace_back(make_symbol(name));
-
856  } else {
-
857  variables.emplace_back(make_symbol(name), true);
-
858  }
-
859  }
+
755  // each state variable has corresponding Dstate variable
+
756  for (const auto& state: states) {
+
757  auto name = "D" + state->get_name();
+
758  auto symbol = make_symbol(name);
+
759  if (state->is_array()) {
+
760  symbol->set_as_array(state->get_length());
+
761  }
+
762  symbol->set_definition_order(state->get_definition_order());
+
763  assigned.push_back(symbol);
+
764  }
+
765  std::sort(assigned.begin(), assigned.end(), comparator);
+
766 
+
767  auto variables = info.range_parameter_vars;
+
768  variables.insert(variables.end(),
+
769  info.range_assigned_vars.begin(),
+
770  info.range_assigned_vars.end());
+
771  variables.insert(variables.end(), info.range_state_vars.begin(), info.range_state_vars.end());
+
772  variables.insert(variables.end(), assigned.begin(), assigned.end());
+
773 
+
774  if (info.vectorize) {
+
775  variables.push_back(make_symbol(naming::VOLTAGE_UNUSED_VARIABLE));
+
776  }
+
777 
+
778  if (breakpoint_exist()) {
+
779  std::string name = info.vectorize ? naming::CONDUCTANCE_UNUSED_VARIABLE
+ +
781 
+
782  // make sure conductance variable like `g` is not already defined
+
783  if (auto r = std::find_if(variables.cbegin(),
+
784  variables.cend(),
+
785  [&](const auto& s) { return name == s->get_name(); });
+
786  r == variables.cend()) {
+
787  variables.push_back(make_symbol(name));
+
788  }
+
789  }
+
790 
+
791  if (net_receive_exist()) {
+
792  variables.push_back(make_symbol(naming::T_SAVE_VARIABLE));
+
793  }
+
794  return variables;
+
795 }
+
796 
+
797 
+
798 /**
+
799  * IndexVariableInfo has following constructor arguments:
+
800  * - symbol
+
801  * - is_vdata (false)
+
802  * - is_index (false
+
803  * - is_integer (false)
+
804  *
+
805  * Which variables are constant qualified?
+
806  *
+
807  * - node area is read only
+
808  * - read ion variables are read only
+
809  * - style_ionname is index / offset
+
810  */
+
811 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
+
812 std::vector<IndexVariableInfo> CodegenCppVisitor::get_int_variables() {
+
813  std::vector<IndexVariableInfo> variables;
+
814  if (info.point_process) {
+
815  variables.emplace_back(make_symbol(naming::NODE_AREA_VARIABLE));
+
816  variables.back().is_constant = true;
+
817  /// note that this variable is not printed in neuron implementation
+
818  if (info.artificial_cell) {
+
819  variables.emplace_back(make_symbol(naming::POINT_PROCESS_VARIABLE), true);
+
820  } else {
+
821  variables.emplace_back(make_symbol(naming::POINT_PROCESS_VARIABLE), false, false, true);
+
822  variables.back().is_constant = true;
+
823  }
+
824  }
+
825 
+
826  for (auto& ion: info.ions) {
+
827  bool need_style = false;
+
828  std::unordered_map<std::string, int> ion_vars; // used to keep track of the variables to
+
829  // not have doubles between read/write. Same
+
830  // name variables are allowed
+
831  // See if we need to add extra readion statements to match NEURON with SoA data
+
832  auto const has_var = [&ion](const char* suffix) -> bool {
+
833  auto const pred = [name = ion.name + suffix](auto const& x) { return x == name; };
+
834  return std::any_of(ion.reads.begin(), ion.reads.end(), pred) ||
+
835  std::any_of(ion.writes.begin(), ion.writes.end(), pred);
+
836  };
+
837  auto const add_implicit_read = [&ion](const char* suffix) {
+
838  auto name = ion.name + suffix;
+
839  ion.reads.push_back(name);
+
840  ion.implicit_reads.push_back(std::move(name));
+
841  };
+
842  bool const have_ionin{has_var("i")}, have_ionout{has_var("o")};
+
843  if (have_ionin && !have_ionout) {
+
844  add_implicit_read("o");
+
845  } else if (have_ionout && !have_ionin) {
+
846  add_implicit_read("i");
+
847  }
+
848  for (const auto& var: ion.reads) {
+
849  const std::string name = naming::ION_VARNAME_PREFIX + var;
+
850  variables.emplace_back(make_symbol(name));
+
851  variables.back().is_constant = true;
+
852  ion_vars[name] = static_cast<int>(variables.size() - 1);
+
853  }
+
854 
+
855  /// symbol for di_ion_dv var
+
856  std::shared_ptr<symtab::Symbol> ion_di_dv_var = nullptr;
+
857 
+
858  for (const auto& var: ion.writes) {
+
859  const std::string name = naming::ION_VARNAME_PREFIX + var;
860 
-
861  if (info.diam_used) {
-
862  variables.emplace_back(make_symbol(naming::DIAM_VARIABLE));
-
863  }
-
864 
-
865  if (info.area_used) {
-
866  variables.emplace_back(make_symbol(naming::AREA_VARIABLE));
-
867  }
-
868 
-
869  // for non-artificial cell, when net_receive buffering is enabled
-
870  // then tqitem is an offset
-
871  if (info.net_send_used) {
-
872  if (info.artificial_cell) {
-
873  variables.emplace_back(make_symbol(naming::TQITEM_VARIABLE), true);
-
874  } else {
-
875  variables.emplace_back(make_symbol(naming::TQITEM_VARIABLE), false, false, true);
-
876  variables.back().is_constant = true;
-
877  }
-
878  info.tqitem_index = static_cast<int>(variables.size() - 1);
-
879  }
-
880 
-
881  /**
-
882  * \note Variables for watch statements : there is one extra variable
-
883  * used in coreneuron compared to actual watch statements for compatibility
-
884  * with neuron (which uses one extra Datum variable)
-
885  */
-
886  if (!info.watch_statements.empty()) {
-
887  for (int i = 0; i < info.watch_statements.size() + 1; i++) {
-
888  variables.emplace_back(make_symbol(fmt::format("watch{}", i)), false, false, true);
-
889  }
-
890  }
-
891  return variables;
-
892 }
-
893 
-
894 
- -
896  program_symtab = node.get_symbol_table();
-
897 
- -
899  info = v.analyze(node);
-
900  info.mod_file = mod_filename;
-
901 
-
902  if (!info.vectorize) {
-
903  logger->warn(
-
904  "CodegenCoreneuronCppVisitor : MOD file uses non-thread safe constructs of NMODL");
-
905  }
-
906 
-
907  codegen_float_variables = get_float_variables();
-
908  codegen_int_variables = get_int_variables();
-
909 
-
910  update_index_semantics();
-
911  rename_function_arguments();
-
912 }
-
913 
- -
915  if (type == BlockType::Initial) {
-
916  return method_name(naming::NRN_INIT_METHOD);
-
917  }
-
918  if (type == BlockType::Constructor) {
-
919  return method_name(naming::NRN_CONSTRUCTOR_METHOD);
-
920  }
-
921  if (type == BlockType::Destructor) {
-
922  return method_name(naming::NRN_DESTRUCTOR_METHOD);
-
923  }
-
924  if (type == BlockType::State) {
-
925  return method_name(naming::NRN_STATE_METHOD);
+
861  const auto ion_vars_it = ion_vars.find(name);
+
862  if (ion_vars_it != ion_vars.end()) {
+
863  variables[ion_vars_it->second].is_constant = false;
+
864  } else {
+
865  variables.emplace_back(make_symbol(naming::ION_VARNAME_PREFIX + var));
+
866  }
+
867  if (ion.is_ionic_current(var)) {
+
868  ion_di_dv_var = make_symbol(std::string(naming::ION_VARNAME_PREFIX) + "di" +
+
869  ion.name + "dv");
+
870  }
+
871  if (ion.is_intra_cell_conc(var) || ion.is_extra_cell_conc(var)) {
+
872  need_style = true;
+
873  }
+
874  }
+
875 
+
876  /// insert after read/write variables but before style ion variable
+
877  if (ion_di_dv_var != nullptr) {
+
878  variables.emplace_back(ion_di_dv_var);
+
879  }
+
880 
+
881  if (need_style) {
+
882  variables.emplace_back(make_symbol(naming::ION_VARNAME_PREFIX + ion.name + "_erev"));
+
883  variables.emplace_back(make_symbol("style_" + ion.name), false, true);
+
884  variables.back().is_constant = true;
+
885  }
+
886  }
+
887 
+
888  for (const auto& var: info.pointer_variables) {
+
889  auto name = var->get_name();
+
890  if (var->has_any_property(NmodlType::pointer_var)) {
+
891  variables.emplace_back(make_symbol(name));
+
892  } else {
+
893  variables.emplace_back(make_symbol(name), true);
+
894  }
+
895  }
+
896 
+
897  if (info.diam_used) {
+
898  variables.emplace_back(make_symbol(naming::DIAM_VARIABLE));
+
899  }
+
900 
+
901  if (info.area_used) {
+
902  variables.emplace_back(make_symbol(naming::AREA_VARIABLE));
+
903  }
+
904 
+
905  // for non-artificial cell, when net_receive buffering is enabled
+
906  // then tqitem is an offset
+
907  if (info.net_send_used) {
+
908  if (info.artificial_cell) {
+
909  variables.emplace_back(make_symbol(naming::TQITEM_VARIABLE), true);
+
910  } else {
+
911  variables.emplace_back(make_symbol(naming::TQITEM_VARIABLE), false, false, true);
+
912  variables.back().is_constant = true;
+
913  }
+
914  info.tqitem_index = static_cast<int>(variables.size() - 1);
+
915  }
+
916 
+
917  /**
+
918  * \note Variables for watch statements : there is one extra variable
+
919  * used in coreneuron compared to actual watch statements for compatibility
+
920  * with neuron (which uses one extra Datum variable)
+
921  */
+
922  if (!info.watch_statements.empty()) {
+
923  for (int i = 0; i < info.watch_statements.size() + 1; i++) {
+
924  variables.emplace_back(make_symbol(fmt::format("watch{}", i)), false, false, true);
+
925  }
926  }
-
927  if (type == BlockType::Equation) {
-
928  return method_name(naming::NRN_CUR_METHOD);
-
929  }
-
930  if (type == BlockType::Watch) {
-
931  return method_name(naming::NRN_WATCH_CHECK_METHOD);
-
932  }
-
933  throw std::logic_error("compute_method_name not implemented");
-
934 }
-
935 
-
936 
- -
938  setup(node);
-
939  print_codegen_routines();
-
940 }
-
941 
-
942 } // namespace codegen
-
943 } // namespace nmodl
+
927  return variables;
+
928 }
+
929 
+
930 
+ +
932  program_symtab = node.get_symbol_table();
+
933 
+ +
935  info = v.analyze(node);
+
936  info.mod_file = mod_filename;
+
937 
+
938  if (!info.vectorize) {
+
939  logger->warn(
+
940  "CodegenCoreneuronCppVisitor : MOD file uses non-thread safe constructs of NMODL");
+
941  }
+
942 
+
943  codegen_float_variables = get_float_variables();
+
944  codegen_int_variables = get_int_variables();
+
945 
+
946  update_index_semantics();
+
947  rename_function_arguments();
+
948 }
+
949 
+ +
951  if (type == BlockType::Initial) {
+
952  return method_name(naming::NRN_INIT_METHOD);
+
953  }
+
954  if (type == BlockType::Constructor) {
+
955  return method_name(naming::NRN_CONSTRUCTOR_METHOD);
+
956  }
+
957  if (type == BlockType::Destructor) {
+
958  return method_name(naming::NRN_DESTRUCTOR_METHOD);
+
959  }
+
960  if (type == BlockType::State) {
+
961  return method_name(naming::NRN_STATE_METHOD);
+
962  }
+
963  if (type == BlockType::Equation) {
+
964  return method_name(naming::NRN_CUR_METHOD);
+
965  }
+
966  if (type == BlockType::Watch) {
+
967  return method_name(naming::NRN_WATCH_CHECK_METHOD);
+
968  }
+
969  throw std::logic_error("compute_method_name not implemented");
+
970 }
+
971 
+
972 
+ +
974  setup(node);
+
975  print_codegen_routines();
+
976 }
+
977 
+
978 } // namespace codegen
+
979 } // namespace nmodl
+
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:6971
std::shared_ptr< Expression > get_length() const noexcept
Getter for member variable IndexedName::length.
static bool need_semicolon(const ast::Statement &node)
Check if a semicolon is required at the end of given statement.
-
void update_index_semantics()
populate all index semantics needed for registration with coreneuron
+
void update_index_semantics()
populate all index semantics needed for registration with coreneuron
std::string format_double_string< CodegenCppVisitor >(const std::string &s_value)
const LocalVarVector & get_variables() const noexcept
Getter for member variable LocalListStatement::variables.
Represents a C code block.
Definition: verbatim.hpp:38
static constexpr char NET_SEND_SEMANTIC[]
semantic type for net send call
-
void visit_name(const ast::Name &node) override
visit node of type ast::Name
+
void visit_name(const ast::Name &node) override
visit node of type ast::Name
bool has_parameter_of_name(const T &node, const std::string &name)
Check if function or procedure node has parameter with given name.
int int_variables_size() const
Number of integer variables in the model.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:791
-
void visit_if_statement(const ast::IfStatement &node) override
visit node of type ast::IfStatement
-
void visit_else_statement(const ast::ElseStatement &node) override
visit node of type ast::ElseStatement
+
void visit_if_statement(const ast::IfStatement &node) override
visit node of type ast::IfStatement
+
void visit_else_statement(const ast::ElseStatement &node) override
visit node of type ast::ElseStatement
bool breakpoint_exist() const noexcept
Check if breakpoint node exist.
@ Destructor
destructor block
Represents a double variable.
Definition: double.hpp:53
@@ -1065,9 +1102,9 @@
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:3068
virtual bool is_conductance_hint() const noexcept
Check if the ast node is an instance of ast::ConductanceHint.
Definition: ast.cpp:222
int float_variables_size() const
Number of float variables in the model.
-
void visit_from_statement(const ast::FromStatement &node) override
visit node of type ast::FromStatement
-
void print_mechanism_info()
Print backend code for byte array that has mechanism information (to be registered with NEURON/CoreNE...
-
void visit_prime_name(const ast::PrimeName &node) override
visit node of type ast::PrimeName
+
void visit_from_statement(const ast::FromStatement &node) override
visit node of type ast::FromStatement
+
void print_mechanism_info()
Print backend code for byte array that has mechanism information (to be registered with NEURON/CoreNE...
+
void visit_prime_name(const ast::PrimeName &node) override
visit node of type ast::PrimeName
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
@ index
index / int variables
static constexpr char NRN_CONSTRUCTOR_METHOD[]
nrn_constructor method in generated code
@@ -1076,39 +1113,39 @@
std::shared_ptr< Identifier > get_name() const noexcept
Getter for member variable IndexedName::name.
bool range_variable_setup_required() const noexcept
Check if setup_range_variable function is required.
Represent MUTEXLOCK statement in NMODL.
Definition: mutex_lock.hpp:38
-
void print_statement_block(const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)
Print any statement block in nmodl with option to (not) print braces.
+
void print_statement_block(const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)
Print any statement block in nmodl with option to (not) print braces.
const std::string & get_value() const noexcept
Getter for member variable Double::value.
Definition: double.hpp:158
virtual bool is_protect_statement() const noexcept
Check if the ast node is an instance of ast::ProtectStatement.
Definition: ast.cpp:226
-
void visit_binary_expression(const ast::BinaryExpression &node) override
visit node of type ast::BinaryExpression
+
void visit_binary_expression(const ast::BinaryExpression &node) override
visit node of type ast::BinaryExpression
Represents a variable.
Definition: var_name.hpp:43
Represents an integer variable.
Definition: integer.hpp:49
-
std::vector< SymbolType > get_float_variables() const
Determine all float variables required during code generation.
+
std::vector< SymbolType > get_float_variables() const
Determine all float variables required during code generation.
virtual bool is_expression_statement() const noexcept
Check if the ast node is an instance of ast::ExpressionStatement.
Definition: ast.cpp:224
static constexpr char NODE_AREA_VARIABLE[]
inbuilt neuron variable for area of the compartment
-
void visit_paren_expression(const ast::ParenExpression &node) override
visit node of type ast::ParenExpression
+
void visit_paren_expression(const ast::ParenExpression &node) override
visit node of type ast::ParenExpression
bool net_receive_buffering_required() const noexcept
Check if net receive/send buffering kernels required.
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:9765
std::shared_ptr< Expression > get_index() const noexcept
Getter for member variable VarName::index.
Definition: var_name.hpp:182
logger_type logger
Definition: logger.cpp:34
-
void visit_mutex_unlock(const ast::MutexUnlock &node) override
visit node of type ast::MutexUnlock
+
void visit_mutex_unlock(const ast::MutexUnlock &node) override
visit node of type ast::MutexUnlock
std::shared_ptr< String > get_statement() const noexcept
Getter for member variable Verbatim::statement.
Definition: verbatim.hpp:157
-
void visit_unit(const ast::Unit &node) override
visit node of type ast::Unit
+
void visit_unit(const ast::Unit &node) override
visit node of type ast::Unit
std::shared_ptr< Expression > get_rhs() const noexcept
Getter for member variable BinaryExpression::rhs.
bool eval() const
Return value of the ast node.
Definition: boolean.hpp:243
-
void visit_update_dt(const ast::UpdateDt &node) override
visit node of type ast::UpdateDt
+
void visit_update_dt(const ast::UpdateDt &node) override
visit node of type ast::UpdateDt
Helper visitor to gather AST information to help code generation.
std::shared_ptr< Expression > get_increment() const noexcept
Getter for member variable FromStatement::increment.
static constexpr char CONDUCTANCE_VARIABLE[]
range variable for conductance
std::shared_ptr< Integer > get_at() const noexcept
Getter for member variable VarName::at.
Definition: var_name.hpp:173
static std::string trim_newline(std::string text)
static constexpr char DEFAULT_FLOAT_TYPE[]
default float variable type
-
std::vector< IndexVariableInfo > get_int_variables()
Determine all int variables required during code generation.
+
std::vector< IndexVariableInfo > get_int_variables()
Determine all int variables required during code generation.
Visitor for printing C++ code compatible with legacy api of CoreNEURON
const StatementVector & get_statements() const noexcept
Getter for member variable StatementBlock::statements.
-
void visit_function_call(const ast::FunctionCall &node) override
visit node of type ast::FunctionCall
+
void visit_function_call(const ast::FunctionCall &node) override
visit node of type ast::FunctionCall
const ElseIfStatementVector & get_elseifs() const noexcept
Getter for member variable IfStatement::elseifs.
virtual bool is_mutex_lock() const noexcept
Check if the ast node is an instance of ast::MutexLock.
Definition: ast.cpp:240
std::shared_ptr< Expression > get_condition() const noexcept
Getter for member variable IfStatement::condition.
@@ -1121,35 +1158,36 @@
virtual bool is_verbatim() const noexcept
Check if the ast node is an instance of ast::Verbatim.
Definition: ast.cpp:278
Represents specific element of an array variable.
std::string eval() const
Return value of the ast node.
Definition: string.hpp:237
-
const std::regex regex_special_chars
+
const std::regex regex_special_chars
std::shared_ptr< Expression > get_from() const noexcept
Getter for member variable FromStatement::from.
-
void setup(const ast::Program &node)
Setup the target backend code generator.
-
void visit_unary_operator(const ast::UnaryOperator &node) override
visit node of type ast::UnaryOperator
+
void setup(const ast::Program &node)
Setup the target backend code generator.
+
void visit_unary_operator(const ast::UnaryOperator &node) override
visit node of type ast::UnaryOperator
static constexpr char POINT_PROCESS_SEMANTIC[]
semantic type for point process variable
-
void visit_mutex_lock(const ast::MutexLock &node) override
visit node of type ast::MutexLock
-
void visit_boolean(const ast::Boolean &node) override
visit node of type ast::Boolean
+
void visit_mutex_lock(const ast::MutexLock &node) override
visit node of type ast::MutexLock
+
void visit_boolean(const ast::Boolean &node) override
visit node of type ast::Boolean
virtual bool is_else_if_statement() const noexcept
Check if the ast node is an instance of ast::ElseIfStatement.
Definition: ast.cpp:234
bool nrn_cur_required() const noexcept
Check if nrn_cur function is required.
virtual bool is_table_statement() const noexcept
Check if the ast node is an instance of ast::TableStatement.
Definition: ast.cpp:256
@ Constructor
constructor block
Represent MUTEXUNLOCK statement in NMODL.
-
void visit_double(const ast::Double &node) override
visit node of type ast::Double
+
void visit_double(const ast::Double &node) override
visit node of type ast::Double
bool net_send_buffer_required() const noexcept
Check if net_send_buffer is required.
-
void visit_float(const ast::Float &node) override
visit node of type ast::Float
-
void visit_string(const ast::String &node) override
visit node of type ast::String
+
void visit_float(const ast::Float &node) override
visit node of type ast::Float
+
void visit_string(const ast::String &node) override
visit node of type ast::String
Represent semantic information for index variable.
std::string to_string(const T &obj)
virtual bool is_block_comment() const noexcept
Check if the ast node is an instance of ast::BlockComment.
Definition: ast.cpp:282
std::string format_float_string(const std::string &s_value)
Handles the float constants format being printed in the generated code.
static constexpr char NRN_INIT_METHOD[]
nrn_init method in generated code
+
const ExpressionVector & get_arguments() const noexcept
Getter for member variable FunctionCall::arguments.
static constexpr char POINTER_SEMANTIC[]
semantic type for pointer variable
static constexpr char AREA_SEMANTIC[]
semantic type for area variable
-
void visit_var_name(const ast::VarName &node) override
+
void visit_var_name(const ast::VarName &node) override
std::string mod_file
name of mod file
-
void print_nmodl_constants()
Print the nmodl constants used in backend code.
+
void print_nmodl_constants()
Print the nmodl constants used in backend code.
std::shared_ptr< Expression > get_expression() const noexcept
Getter for member variable ParenExpression::expression.
const BinaryOperator & get_op() const noexcept
Getter for member variable BinaryExpression::op.
virtual bool is_from_statement() const noexcept
Check if the ast node is an instance of ast::FromStatement.
Definition: ast.cpp:228
@@ -1166,7 +1204,7 @@
virtual bool is_mutex_unlock() const noexcept
Check if the ast node is an instance of ast::MutexUnlock.
Definition: ast.cpp:242
codegen::CodegenInfo analyze(const ast::Program &node)
run visitor and return information for code generation
std::shared_ptr< StatementBlock > get_statement_block() const noexcept override
Getter for member variable WhileStatement::statement_block.
-
void visit_integer(const ast::Integer &node) override
visit node of type ast::Integer
+
void visit_integer(const ast::Integer &node) override
visit node of type ast::Integer
Statement to indicate a change in timestep in a given block.
Definition: update_dt.hpp:38
std::string format_float_string(const std::string &value)
Convert a given float value to its string representation.
@@ -1179,36 +1217,37 @@
bool net_receive_required() const noexcept
Check if net_receive function is required.
static constexpr char CORE_POINTER_SEMANTIC[]
semantic type for core pointer variable
-
void rename_function_arguments()
Rename function/procedure arguments that conflict with default arguments.
-
void visit_local_list_statement(const ast::LocalListStatement &node) override
visit node of type ast::LocalListStatement
-
void visit_protect_statement(const ast::ProtectStatement &node) override
visit node of type ast::ProtectStatement
+
void rename_function_arguments()
Rename function/procedure arguments that conflict with default arguments.
+
void visit_local_list_statement(const ast::LocalListStatement &node) override
visit node of type ast::LocalListStatement
+
void visit_protect_statement(const ast::ProtectStatement &node) override
visit node of type ast::ProtectStatement
static constexpr char WATCH_SEMANTIC[]
semantic type for watch statement
Operator used in ast::BinaryExpression.
bool defined_method(const std::string &name) const
Check if given method is defined in this model.
std::shared_ptr< Expression > get_condition() const noexcept
Getter for member variable ElseIfStatement::condition.
+
virtual void print_function_call(const ast::FunctionCall &node)
Print call to internal or external function.
Helper visitor to gather AST information to help code generation.
BlockType
Helper to represent various block types.
std::shared_ptr< Identifier > get_name() const noexcept
Getter for member variable VarName::name.
Definition: var_name.hpp:164
symtab::SymbolTable * get_symbol_table() const override
Return associated symbol table for the current ast node.
Definition: program.hpp:153
static constexpr char NRN_STATE_METHOD[]
nrn_state method in generated code
-
void visit_binary_operator(const ast::BinaryOperator &node) override
visit node of type ast::BinaryOperator
+
void visit_binary_operator(const ast::BinaryOperator &node) override
visit node of type ast::BinaryOperator
virtual bool is_solve_block() const noexcept
Check if the ast node is an instance of ast::SolveBlock.
Definition: ast.cpp:146
-
void visit_else_if_statement(const ast::ElseIfStatement &node) override
visit node of type ast::ElseIfStatement
+
void visit_else_if_statement(const ast::ElseIfStatement &node) override
visit node of type ast::ElseIfStatement
std::shared_ptr< ElseStatement > get_elses() const noexcept
Getter for member variable IfStatement::elses.
std::shared_ptr< Expression > get_lhs() const noexcept
Getter for member variable BinaryExpression::lhs.
virtual bool is_line_comment() const noexcept
Check if the ast node is an instance of ast::LineComment.
Definition: ast.cpp:280
-
std::string compute_method_name(BlockType type) const
+
std::string compute_method_name(BlockType type) const
static constexpr char AREA_VARIABLE[]
similar to node_area but user can explicitly declare it as area
Represents a name.
Definition: name.hpp:44
virtual bool is_while_statement() const noexcept
Check if the ast node is an instance of ast::WhileStatement.
Definition: ast.cpp:230
-
void visit_program(const ast::Program &program) override
Main and only member function to call after creating an instance of this class.
+
void visit_program(const ast::Program &program) override
Main and only member function to call after creating an instance of this class.
virtual bool is_else_statement() const noexcept
Check if the ast node is an instance of ast::ElseStatement.
Definition: ast.cpp:236
std::shared_ptr< StatementBlock > get_statement_block() const noexcept override
Getter for member variable FromStatement::statement_block.
Represents top level AST node for whole NMODL input.
Definition: program.hpp:39
-
void visit_indexed_name(const ast::IndexedName &node) override
visit node of type ast::IndexedName
+
void visit_indexed_name(const ast::IndexedName &node) override
visit node of type ast::IndexedName
std::shared_ptr< Expression > get_to() const noexcept
Getter for member variable FromStatement::to.
static constexpr char T_SAVE_VARIABLE[]
variable t indicating last execution time of net receive block
-
void print_prcellstate_macros() const
Print declaration of macro NRN_PRCELLSTATE for debugging.
+
void print_prcellstate_macros() const
Print declaration of macro NRN_PRCELLSTATE for debugging.
static constexpr char FOR_NETCON_SEMANTIC[]
semantic type for for_netcon statement
std::string format_double_string(const std::string &s_value)
Handles the double constants format being printed in the generated code.
Blindly rename given variable to new name
@@ -1216,7 +1255,7 @@
bool nrn_state_required() const noexcept
Check if nrn_state function is required.
static constexpr char DIAM_VARIABLE[]
inbuilt neuron variable for diameter of the compartment
-
void visit_verbatim(const ast::Verbatim &node) override
visit node of type ast::Verbatim
+
void visit_verbatim(const ast::Verbatim &node) override
visit node of type ast::Verbatim
Represents binary expression in the NMODL.
static constexpr char NRN_DESTRUCTOR_METHOD[]
nrn_destructor method in generated code
static constexpr char CONDUCTANCE_UNUSED_VARIABLE[]
range variable when conductance is not used (for vectorized model)
@@ -1228,11 +1267,11 @@
Auto generated AST classes declaration.
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:9106
-
void visit_while_statement(const ast::WhileStatement &node) override
visit node of type ast::WhileStatement
+
void visit_while_statement(const ast::WhileStatement &node) override
visit node of type ast::WhileStatement
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
static constexpr char ION_VARNAME_PREFIX[]
prefix for ion variable
std::shared_ptr< Expression > get_condition() const noexcept
Getter for member variable WhileStatement::condition.
-
void visit_statement_block(const ast::StatementBlock &node) override
+
void visit_statement_block(const ast::StatementBlock &node) override
virtual void print_nrn_constructor()=0
Print nrn_constructor function definition.
bool is_last(Iter iter, const Cont &cont)
Check if the iterator is pointing to last element in the container.
static bool need_semicolon(const ast::Statement &node)
Check if a semicolon is required at the end of given statement.
-
void update_index_semantics()
populate all index semantics needed for registration with coreneuron
-
CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies)
This constructor is private, only the derived classes' public constructors are public.
+
void update_index_semantics()
populate all index semantics needed for registration with coreneuron
+
CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies)
This constructor is private, only the derived classes' public constructors are public.
virtual std::string register_mechanism_arguments() const =0
Arguments for register_mech or point_register_mech function.
virtual void print_g_unused() const =0
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
bool is_index
if this is pure index (e.g.
Represents a C code block.
Definition: verbatim.hpp:38
-
void visit_name(const ast::Name &node) override
visit node of type ast::Name
+
void visit_name(const ast::Name &node) override
visit node of type ast::Name
bool has_parameter_of_name(const T &node, const std::string &name)
Check if function or procedure node has parameter with given name.
int int_variables_size() const
Number of integer variables in the model.
virtual void print_sdlists_init(bool print_initializers)=0
-
void visit_if_statement(const ast::IfStatement &node) override
visit node of type ast::IfStatement
+
void visit_if_statement(const ast::IfStatement &node) override
visit node of type ast::IfStatement
@ global
global variables
-
void visit_else_statement(const ast::ElseStatement &node) override
visit node of type ast::ElseStatement
+
void visit_else_statement(const ast::ElseStatement &node) override
visit node of type ast::ElseStatement
Helper to represent information about index/int variables.
bool breakpoint_exist() const noexcept
Check if breakpoint node exist.
Concrete constant visitor for all AST classes.
@@ -1311,12 +1330,12 @@
bool printing_top_verbatim_blocks
true if currently printing top level verbatim blocks
int float_variables_size() const
Number of float variables in the model.
bool is_constant
if the variable is qualified as constant (this is property of IndexVariable)
-
void visit_from_statement(const ast::FromStatement &node) override
visit node of type ast::FromStatement
+
void visit_from_statement(const ast::FromStatement &node) override
visit node of type ast::FromStatement
bool printing_net_init
true if currently initial block of net_receive being printed
-
void print_mechanism_info()
Print backend code for byte array that has mechanism information (to be registered with NEURON/CoreNE...
+
void print_mechanism_info()
Print backend code for byte array that has mechanism information (to be registered with NEURON/CoreNE...
virtual void print_global_function_common_code(BlockType type, const std::string &function_name="")=0
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
virtual void print_standard_includes()=0
Print standard C/C++ includes.
-
void visit_prime_name(const ast::PrimeName &node) override
visit node of type ast::PrimeName
+
void visit_prime_name(const ast::PrimeName &node) override
visit node of type ast::PrimeName
virtual void print_nrn_cur_non_conductance_kernel()=0
Print the nrn_cur kernel without NMODL conductance keyword provisions.
virtual void print_function_procedure_helper(const ast::Block &node)=0
Common helper function to help printing function or procedure blocks.
@@ -1329,36 +1348,37 @@
virtual std::string nrn_thread_arguments() const =0
Arguments for "_threadargs_" macro in neuron implementation.
bool range_variable_setup_required() const noexcept
Check if setup_range_variable function is required.
Represent MUTEXLOCK statement in NMODL.
Definition: mutex_lock.hpp:38
-
void print_statement_block(const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)
Print any statement block in nmodl with option to (not) print braces.
+
void print_statement_block(const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)
Print any statement block in nmodl with option to (not) print braces.
virtual std::string global_variable_name(const SymbolType &symbol, bool use_instance=true) const =0
Determine the variable name for a global variable given its symbol.
-
void visit_binary_expression(const ast::BinaryExpression &node) override
visit node of type ast::BinaryExpression
+
void visit_binary_expression(const ast::BinaryExpression &node) override
visit node of type ast::BinaryExpression
Represents a variable.
Definition: var_name.hpp:43
Represents an integer variable.
Definition: integer.hpp:49
@ BlockTypeEnd
fake ending block type for loops on the enums. Keep it at the end
-
std::vector< SymbolType > get_float_variables() const
Determine all float variables required during code generation.
+
std::vector< SymbolType > get_float_variables() const
Determine all float variables required during code generation.
+
virtual void print_net_move_call(const ast::FunctionCall &node)=0
Print call to net_move.
const char * default_int_data_type() const noexcept
Default data type for integer (offset) elements.
std::string mod_suffix
name of the suffix
parser::NmodlParser::symbol_type SymbolType
Definition: nmodl_utils.hpp:26
Represent information collected from AST for code generation.
-
void visit_paren_expression(const ast::ParenExpression &node) override
visit node of type ast::ParenExpression
+
void visit_paren_expression(const ast::ParenExpression &node) override
visit node of type ast::ParenExpression
const char * default_float_data_type() const noexcept
Default data type for floating point elements.
bool net_receive_buffering_required() const noexcept
Check if net receive/send buffering kernels required.
virtual void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node)=0
Print the nrn_cur kernel with NMODL conductance keyword provisions.
-
void visit_mutex_unlock(const ast::MutexUnlock &node) override
visit node of type ast::MutexUnlock
+
void visit_mutex_unlock(const ast::MutexUnlock &node) override
visit node of type ast::MutexUnlock
bool is_integer
if this is an integer (e.g.
virtual std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const =0
Determine the name of an int variable given its symbol.
-
void visit_unit(const ast::Unit &node) override
visit node of type ast::Unit
-
void visit_update_dt(const ast::UpdateDt &node) override
visit node of type ast::UpdateDt
-
void print_vector_elements(const std::vector< T > &elements, const std::string &separator, const std::string &prefix="")
Print the items in a vector as a list.
+
void visit_unit(const ast::Unit &node) override
visit node of type ast::Unit
+
void visit_update_dt(const ast::UpdateDt &node) override
visit node of type ast::UpdateDt
+
void print_vector_elements(const std::vector< T > &elements, const std::string &separator, const std::string &prefix="")
Print the items in a vector as a list.
IndexVariableInfo(std::shared_ptr< symtab::Symbol > symbol, bool is_vdata=false, bool is_index=false, bool is_integer=false)
static constexpr char DEFAULT_FLOAT_TYPE[]
default float variable type
-
std::vector< IndexVariableInfo > get_int_variables()
Determine all int variables required during code generation.
+
std::vector< IndexVariableInfo > get_int_variables()
Determine all int variables required during code generation.
virtual std::string nrn_thread_internal_arguments()=0
Arguments for "_threadargs_" macro in neuron implementation.
-
void visit_function_call(const ast::FunctionCall &node) override
visit node of type ast::FunctionCall
+
void visit_function_call(const ast::FunctionCall &node) override
visit node of type ast::FunctionCall
Base class for all block scoped nodes.
Definition: block.hpp:41
virtual int position_of_int_var(const std::string &name) const =0
Determine the position in the data array for a given int variable.
@@ -1368,29 +1388,30 @@
bool is_net_move(const std::string &name) const noexcept
Checks if given function name is net_move.
Represents a float variable.
Definition: float.hpp:44
virtual void print_mechanism_global_var_structure(bool print_initializers)=0
Print the structure that wraps all global variables used in the NMODL.
-
virtual void print_function_call(const ast::FunctionCall &node)=0
Print call to internal or external function.
Represents a BREAKPOINT block in NMODL.
virtual void print_compute_functions()=0
Print all compute functions for every backend.
std::vector< SymbolType > codegen_global_variables
All global variables for the model.
Represents specific element of an array variable.
virtual std::string simulator_name()=0
Name of the simulator the code was generated for.
-
void setup(const ast::Program &node)
Setup the target backend code generator.
-
void visit_unary_operator(const ast::UnaryOperator &node) override
visit node of type ast::UnaryOperator
-
void visit_mutex_lock(const ast::MutexLock &node) override
visit node of type ast::MutexLock
-
void visit_boolean(const ast::Boolean &node) override
visit node of type ast::Boolean
+
void setup(const ast::Program &node)
Setup the target backend code generator.
+
void visit_unary_operator(const ast::UnaryOperator &node) override
visit node of type ast::UnaryOperator
+
void visit_mutex_lock(const ast::MutexLock &node) override
visit node of type ast::MutexLock
+
virtual void print_net_event_call(const ast::FunctionCall &node)=0
Print call to net_event.
+
void visit_boolean(const ast::Boolean &node) override
visit node of type ast::Boolean
bool nrn_cur_required() const noexcept
Check if nrn_cur function is required.
+
virtual void print_net_send_call(const ast::FunctionCall &node)=0
Print call to net_send.
@ Constructor
constructor block
virtual void print_codegen_routines()=0
Print entry point to code generation.
Represent MUTEXUNLOCK statement in NMODL.
Helper class for printing C/C++ code.
-
void visit_double(const ast::Double &node) override
visit node of type ast::Double
+
void visit_double(const ast::Double &node) override
visit node of type ast::Double
bool net_send_buffer_required() const noexcept
Check if net_send_buffer is required.
static constexpr char NMODL_VERSION[]
nmodl language version
std::vector< IndexVariableInfo > codegen_int_variables
All int variables for the model.
-
void visit_float(const ast::Float &node) override
visit node of type ast::Float
-
void visit_string(const ast::String &node) override
visit node of type ast::String
+
void visit_float(const ast::Float &node) override
visit node of type ast::Float
+
void visit_string(const ast::String &node) override
visit node of type ast::String
@ NetReceive
net_receive block
const char * local_var_type() const noexcept
Data type for the local variables.
@@ -1398,8 +1419,8 @@
virtual void print_backend_info()=0
Print top file header printed in generated code.
std::string get_channel_info_var_name() const noexcept
Name of channel info variable.
virtual void print_namespace_begin()=0
Print start of namespaces.
-
void visit_var_name(const ast::VarName &node) override
-
void print_nmodl_constants()
Print the nmodl constants used in backend code.
+
void visit_var_name(const ast::VarName &node) override
+
void print_nmodl_constants()
Print the nmodl constants used in backend code.
Represents a prime variable (for ODE)
Definition: prime_name.hpp:48
virtual void print_namespace_end()=0
Print end of namespaces.
@@ -1407,7 +1428,7 @@
Represents a boolean variable.
Definition: boolean.hpp:42
static constexpr char DEFAULT_INTEGER_TYPE[]
default integer variable type
Represent symbol table for a NMODL block.
-
void visit_integer(const ast::Integer &node) override
visit node of type ast::Integer
+
void visit_integer(const ast::Integer &node) override
visit node of type ast::Integer
bool printing_net_receive
true if currently net_receive block being printed
virtual std::string process_verbatim_text(std::string const &text)=0
Process a verbatim block for possible variable renaming.
Statement to indicate a change in timestep in a given block.
Definition: update_dt.hpp:38
@@ -1425,51 +1446,52 @@
virtual const char * external_method_parameters(bool table=false) noexcept=0
Parameters for functions in generated code that are called back from external code.
bool electrode_current
if electrode current specified
-
void rename_function_arguments()
Rename function/procedure arguments that conflict with default arguments.
+
void rename_function_arguments()
Rename function/procedure arguments that conflict with default arguments.
virtual ParamVector internal_method_parameters()=0
Parameters for internally defined functions.
virtual void print_nrn_destructor()=0
Print nrn_destructor function definition.
-
void visit_local_list_statement(const ast::LocalListStatement &node) override
visit node of type ast::LocalListStatement
-
void visit_protect_statement(const ast::ProtectStatement &node) override
visit node of type ast::ProtectStatement
+
void visit_local_list_statement(const ast::LocalListStatement &node) override
visit node of type ast::LocalListStatement
+
void visit_protect_statement(const ast::ProtectStatement &node) override
visit node of type ast::ProtectStatement
Represents ion write statement during code generation.
virtual void print_mechanism_range_var_structure(bool print_initializers)=0
Print the structure that wraps all range and int variables required for the NMODL.
-
SymbolType make_symbol(const std::string &name) const
Creates a temporary symbol.
+
SymbolType make_symbol(const std::string &name) const
Creates a temporary symbol.
std::string float_type
Data type of floating point variables.
Operator used in ast::BinaryExpression.
bool defined_method(const std::string &name) const
Check if given method is defined in this model.
static constexpr char NET_MOVE_METHOD[]
net_move function call in nmodl
Implement logger based on spdlog library.
bool is_vdata
if variable resides in vdata field of NrnThread typically true for bbcore pointer
+
virtual void print_function_call(const ast::FunctionCall &node)
Print call to internal or external function.
bool enable_variable_name_lookup
Variable name should be converted to instance name (but not for function arguments)
BlockType
Helper to represent various block types.
int current_watch_statement
Index of watch statement being printed.
static constexpr char NET_EVENT_METHOD[]
net_event function call in nmodl
virtual void print_fast_imem_calculation()=0
Print fast membrane current calculation code.
virtual void print_mechanism_register()=0
Print the mechanism registration function.
-
void visit_binary_operator(const ast::BinaryOperator &node) override
visit node of type ast::BinaryOperator
-
void visit_else_if_statement(const ast::ElseIfStatement &node) override
visit node of type ast::ElseIfStatement
+
void visit_binary_operator(const ast::BinaryOperator &node) override
visit node of type ast::BinaryOperator
+
void visit_else_if_statement(const ast::ElseIfStatement &node) override
visit node of type ast::ElseIfStatement
Visitor for printing C++ code compatible with legacy api of CoreNEURON
virtual void print_namespace_start()=0
Prints the start of the simulator namespace.
-
std::string compute_method_name(BlockType type) const
+
std::string compute_method_name(BlockType type) const
virtual const char * external_method_arguments() noexcept=0
Arguments for external functions called from generated code.
Represents a name.
Definition: name.hpp:44
-
void visit_program(const ast::Program &program) override
Main and only member function to call after creating an instance of this class.
+
void visit_program(const ast::Program &program) override
Main and only member function to call after creating an instance of this class.
std::string mod_filename
Name of mod file (without .mod suffix)
virtual std::string get_variable_name(const std::string &name, bool use_instance=true) const =0
Determine variable name in the structure of mechanism properties.
Represents top level AST node for whole NMODL input.
Definition: program.hpp:39
-
void visit_indexed_name(const ast::IndexedName &node) override
visit node of type ast::IndexedName
+
void visit_indexed_name(const ast::IndexedName &node) override
visit node of type ast::IndexedName
const char * operator_for_rhs() const noexcept
Operator for rhs vector update (matrix update)
-
void print_prcellstate_macros() const
Print declaration of macro NRN_PRCELLSTATE for debugging.
+
void print_prcellstate_macros() const
Print declaration of macro NRN_PRCELLSTATE for debugging.
std::unique_ptr< CodePrinter > printer
Code printer object for target (C++)
virtual void print_namespace_stop()=0
Prints the end of the simulator namespace.
bool nrn_state_required() const noexcept
Check if nrn_state function is required.
@ State
derivative block
-
std::string add_escape_quote(const std::string &text) const
Add quotes to string to be output.
+
std::string add_escape_quote(const std::string &text) const
Add quotes to string to be output.
bool internal_method_call_encountered
true if internal method call was encountered while processing verbatim block
virtual void print_v_unused() const =0
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
-
std::string method_name(const std::string &name) const
Constructs the name of a function or procedure.
-
void visit_verbatim(const ast::Verbatim &node) override
visit node of type ast::Verbatim
+
std::string method_name(const std::string &name) const
Constructs the name of a function or procedure.
+
void visit_verbatim(const ast::Verbatim &node) override
visit node of type ast::Verbatim
bool is_net_event(const std::string &name) const noexcept
Checks if given function name is net_event.
Represents binary expression in the NMODL.
virtual void print_headers_include()=0
Print all includes.
@@ -1482,7 +1504,7 @@
virtual void print_data_structures(bool print_initializers)=0
Print all classes.
std::string format_double_string(const std::string &value)
Convert a given double value to its string representation.
virtual void print_function_or_procedure(const ast::Block &node, const std::string &name)=0
Print nmodl function or procedure (common code)
-
CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies)
This constructor is private, only the derived classes' public constructors are public.
+
CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies)
This constructor is private, only the derived classes' public constructors are public.
Represent token returned by scanner.
Definition: modtoken.hpp:50
Represents a string.
Definition: string.hpp:52
virtual void print_nrn_state()=0
Print nrn_state / state update function definition.
@@ -1491,10 +1513,10 @@
virtual void print_function_prototypes()=0
Print function and procedures prototype declaration.
static constexpr char NET_SEND_METHOD[]
net_send function call in nmodl
virtual void print_nrn_alloc()=0
Print nrn_alloc function definition.
-
void visit_while_statement(const ast::WhileStatement &node) override
visit node of type ast::WhileStatement
+
void visit_while_statement(const ast::WhileStatement &node) override
visit node of type ast::WhileStatement
@ range
range / double variables
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
-
void visit_statement_block(const ast::StatementBlock &node) override
+
void visit_statement_block(const ast::StatementBlock &node) override
Concrete visitor for all AST classes.
diff --git a/html/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html b/html/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html index 21b176ed33..e2bd424826 100644 --- a/html/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html +++ b/html/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html @@ -218,633 +218,649 @@
122 
123 
124  /**
-
125  * Print call to internal or external function
-
126  * \param node The AST node representing a function call
+
125  * Print call to \c net\_send
+
126  * \param node The AST node representing the function call
127  */
-
128  void print_function_call(const ast::FunctionCall& node) override;
+
128  void print_net_send_call(const ast::FunctionCall& node) override;
129 
130 
131  /**
-
132  * Print function and procedures prototype declaration
-
133  */
-
134  void print_function_prototypes() override;
-
135 
-
136 
-
137  /**
-
138  * Print nmodl function or procedure (common code)
-
139  * \param node the AST node representing the function or procedure in NMODL
-
140  * \param name the name of the function or procedure
+
132  * Print call to net\_move
+
133  * \param node The AST node representing the function call
+
134  */
+
135  void print_net_move_call(const ast::FunctionCall& node) override;
+
136 
+
137 
+
138  /**
+
139  * Print call to net\_event
+
140  * \param node The AST node representing the function call
141  */
-
142  void print_function_or_procedure(const ast::Block& node, const std::string& name) override;
+
142  void print_net_event_call(const ast::FunctionCall& node) override;
143 
144 
145  /**
-
146  * Common helper function to help printing function or procedure blocks
-
147  * \param node the AST node representing the function or procedure in NMODL
-
148  */
-
149  void print_function_procedure_helper(const ast::Block& node) override;
-
150 
-
151 
-
152  /**
-
153  * Print NMODL procedure in target backend code
-
154  * \param node
+
146  * Print function and procedures prototype declaration
+
147  */
+
148  void print_function_prototypes() override;
+
149 
+
150 
+
151  /**
+
152  * Print nmodl function or procedure (common code)
+
153  * \param node the AST node representing the function or procedure in NMODL
+
154  * \param name the name of the function or procedure
155  */
-
156  virtual void print_procedure(const ast::ProcedureBlock& node) override;
+
156  void print_function_or_procedure(const ast::Block& node, const std::string& name) override;
157 
158 
159  /**
-
160  * Print NMODL function in target backend code
-
161  * \param node
+
160  * Common helper function to help printing function or procedure blocks
+
161  * \param node the AST node representing the function or procedure in NMODL
162  */
-
163  void print_function(const ast::FunctionBlock& node) override;
+
163  void print_function_procedure_helper(const ast::Block& node) override;
164 
-
165 
-
166  /****************************************************************************************/
-
167  /* Code-specific helper routines */
-
168  /****************************************************************************************/
-
169 
-
170 
-
171  /**
-
172  * Arguments for functions that are defined and used internally.
-
173  * \return the method arguments
-
174  */
-
175  std::string internal_method_arguments() override;
-
176 
-
177 
-
178  /**
-
179  * Parameters for internally defined functions
-
180  * \return the method parameters
-
181  */
- +
165 
+
166  /**
+
167  * Print NMODL procedure in target backend code
+
168  * \param node
+
169  */
+
170  virtual void print_procedure(const ast::ProcedureBlock& node) override;
+
171 
+
172 
+
173  /**
+
174  * Print NMODL function in target backend code
+
175  * \param node
+
176  */
+
177  void print_function(const ast::FunctionBlock& node) override;
+
178 
+
179 
+
180  /****************************************************************************************/
+
181  /* Code-specific helper routines */
+
182  /****************************************************************************************/
183 
184 
185  /**
-
186  * Arguments for external functions called from generated code
-
187  * \return A string representing the arguments passed to an external function
+
186  * Arguments for functions that are defined and used internally.
+
187  * \return the method arguments
188  */
-
189  const char* external_method_arguments() noexcept override;
+
189  std::string internal_method_arguments() override;
190 
191 
192  /**
-
193  * Parameters for functions in generated code that are called back from external code
-
194  *
-
195  * Functions registered in NEURON during initialization for callback must adhere to a prescribed
-
196  * calling convention. This method generates the string representing the function parameters for
-
197  * these externally called functions.
-
198  * \param table
-
199  * \return A string representing the parameters of the function
-
200  */
-
201  const char* external_method_parameters(bool table = false) noexcept override;
-
202 
-
203 
-
204  /**
-
205  * Arguments for "_threadargs_" macro in neuron implementation
-
206  */
-
207  std::string nrn_thread_arguments() const override;
-
208 
-
209 
-
210  /**
-
211  * Arguments for "_threadargs_" macro in neuron implementation
-
212  */
-
213  std::string nrn_thread_internal_arguments() override;
-
214 
-
215 
-
216  /**
-
217  * Process a verbatim block for possible variable renaming
-
218  * \param text The verbatim code to be processed
-
219  * \return The code with all variables renamed as needed
+
193  * Parameters for internally defined functions
+
194  * \return the method parameters
+
195  */
+ +
197 
+
198 
+
199  /**
+
200  * Arguments for external functions called from generated code
+
201  * \return A string representing the arguments passed to an external function
+
202  */
+
203  const char* external_method_arguments() noexcept override;
+
204 
+
205 
+
206  /**
+
207  * Parameters for functions in generated code that are called back from external code
+
208  *
+
209  * Functions registered in NEURON during initialization for callback must adhere to a prescribed
+
210  * calling convention. This method generates the string representing the function parameters for
+
211  * these externally called functions.
+
212  * \param table
+
213  * \return A string representing the parameters of the function
+
214  */
+
215  const char* external_method_parameters(bool table = false) noexcept override;
+
216 
+
217 
+
218  /**
+
219  * Arguments for "_threadargs_" macro in neuron implementation
220  */
-
221  std::string process_verbatim_text(std::string const& text) override;
+
221  std::string nrn_thread_arguments() const override;
222 
223 
224  /**
-
225  * Arguments for register_mech or point_register_mech function
+
225  * Arguments for "_threadargs_" macro in neuron implementation
226  */
-
227  std::string register_mechanism_arguments() const override;
+
227  std::string nrn_thread_internal_arguments() override;
228 
-
229 
-
230  /****************************************************************************************/
-
231  /* Code-specific printing routines for code generations */
-
232  /****************************************************************************************/
-
233 
-
234 
-
235  /**
-
236  * Prints the start of the \c neuron namespace
-
237  */
-
238  void print_namespace_start() override;
-
239 
-
240 
-
241  /**
-
242  * Prints the end of the \c neuron namespace
-
243  */
-
244  void print_namespace_stop() override;
-
245 
-
246 
-
247  /****************************************************************************************/
-
248  /* Routines for returning variable name */
-
249  /****************************************************************************************/
-
250 
-
251 
-
252  /**
-
253  * Determine the name of a \c float variable given its symbol
-
254  *
-
255  * This function typically returns the accessor expression in backend code for the given symbol.
-
256  * Since the model variables are stored in data arrays and accessed by offset, this function
-
257  * will return the C++ string representing the array access at the correct offset
-
258  *
-
259  * \param symbol The symbol of a variable for which we want to obtain its name
-
260  * \param use_instance Should the variable be accessed via instance or data array
-
261  * \return The backend code string representing the access to the given variable
-
262  * symbol
-
263  */
-
264  std::string float_variable_name(const SymbolType& symbol, bool use_instance) const override;
-
265 
-
266 
-
267  /**
-
268  * Determine the name of an \c int variable given its symbol
-
269  *
-
270  * This function typically returns the accessor expression in backend code for the given symbol.
-
271  * Since the model variables are stored in data arrays and accessed by offset, this function
-
272  * will return the C++ string representing the array access at the correct offset
-
273  *
-
274  * \param symbol The symbol of a variable for which we want to obtain its name
-
275  * \param name The name of the index variable
-
276  * \param use_instance Should the variable be accessed via instance or data array
-
277  * \return The backend code string representing the access to the given variable
-
278  * symbol
-
279  */
-
280  std::string int_variable_name(const IndexVariableInfo& symbol,
-
281  const std::string& name,
-
282  bool use_instance) const override;
-
283 
-
284 
-
285  /**
-
286  * Determine the variable name for a global variable given its symbol
-
287  * \param symbol The symbol of a variable for which we want to obtain its name
-
288  * \param use_instance Should the variable be accessed via the (host-only)
-
289  * global variable or the instance-specific copy (also available on GPU).
-
290  * \return The C++ string representing the access to the global variable
-
291  */
-
292  std::string global_variable_name(const SymbolType& symbol,
-
293  bool use_instance = true) const override;
-
294 
-
295 
-
296  /**
-
297  * Determine variable name in the structure of mechanism properties
-
298  *
-
299  * \param name Variable name that is being printed
-
300  * \param use_instance Should the variable be accessed via instance or data array
-
301  * \return The C++ string representing the access to the variable in the neuron
-
302  * thread structure
-
303  */
-
304  std::string get_variable_name(const std::string& name, bool use_instance = true) const override;
-
305 
-
306 
-
307  /****************************************************************************************/
-
308  /* Main printing routines for code generation */
-
309  /****************************************************************************************/
-
310 
-
311 
-
312  /**
-
313  * Print top file header printed in generated code
-
314  */
-
315  void print_backend_info() override;
-
316 
-
317 
-
318  /**
-
319  * Print standard C/C++ includes
-
320  */
-
321  void print_standard_includes() override;
-
322 
-
323 
-
324  /**
-
325  * Print includes from NEURON
-
326  */
-
327  void print_neuron_includes();
-
328 
-
329 
-
330  void print_sdlists_init(bool print_initializers) override;
-
331 
-
332 
-
333  /**
-
334  * Print the structure that wraps all global variables used in the NMODL
-
335  *
-
336  * \param print_initializers Whether to include default values in the struct
-
337  * definition (true: int foo{42}; false: int foo;)
-
338  */
-
339  void print_mechanism_global_var_structure(bool print_initializers) override;
-
340 
-
341 
-
342  /**
-
343  * Print byte arrays that register scalar and vector variables for hoc interface
-
344  *
-
345  */
-
346  void print_global_variables_for_hoc() override;
-
347 
-
348 
-
349  /**
-
350  * Print the mechanism registration function
-
351  *
+
229 
+
230  /**
+
231  * Process a verbatim block for possible variable renaming
+
232  * \param text The verbatim code to be processed
+
233  * \return The code with all variables renamed as needed
+
234  */
+
235  std::string process_verbatim_text(std::string const& text) override;
+
236 
+
237 
+
238  /**
+
239  * Arguments for register_mech or point_register_mech function
+
240  */
+
241  std::string register_mechanism_arguments() const override;
+
242 
+
243 
+
244  /****************************************************************************************/
+
245  /* Code-specific printing routines for code generations */
+
246  /****************************************************************************************/
+
247 
+
248 
+
249  /**
+
250  * Prints the start of the \c neuron namespace
+
251  */
+
252  void print_namespace_start() override;
+
253 
+
254 
+
255  /**
+
256  * Prints the end of the \c neuron namespace
+
257  */
+
258  void print_namespace_stop() override;
+
259 
+
260 
+
261  /****************************************************************************************/
+
262  /* Routines for returning variable name */
+
263  /****************************************************************************************/
+
264 
+
265 
+
266  /**
+
267  * Determine the name of a \c float variable given its symbol
+
268  *
+
269  * This function typically returns the accessor expression in backend code for the given symbol.
+
270  * Since the model variables are stored in data arrays and accessed by offset, this function
+
271  * will return the C++ string representing the array access at the correct offset
+
272  *
+
273  * \param symbol The symbol of a variable for which we want to obtain its name
+
274  * \param use_instance Should the variable be accessed via instance or data array
+
275  * \return The backend code string representing the access to the given variable
+
276  * symbol
+
277  */
+
278  std::string float_variable_name(const SymbolType& symbol, bool use_instance) const override;
+
279 
+
280 
+
281  /**
+
282  * Determine the name of an \c int variable given its symbol
+
283  *
+
284  * This function typically returns the accessor expression in backend code for the given symbol.
+
285  * Since the model variables are stored in data arrays and accessed by offset, this function
+
286  * will return the C++ string representing the array access at the correct offset
+
287  *
+
288  * \param symbol The symbol of a variable for which we want to obtain its name
+
289  * \param name The name of the index variable
+
290  * \param use_instance Should the variable be accessed via instance or data array
+
291  * \return The backend code string representing the access to the given variable
+
292  * symbol
+
293  */
+
294  std::string int_variable_name(const IndexVariableInfo& symbol,
+
295  const std::string& name,
+
296  bool use_instance) const override;
+
297 
+
298 
+
299  /**
+
300  * Determine the variable name for a global variable given its symbol
+
301  * \param symbol The symbol of a variable for which we want to obtain its name
+
302  * \param use_instance Should the variable be accessed via the (host-only)
+
303  * global variable or the instance-specific copy (also available on GPU).
+
304  * \return The C++ string representing the access to the global variable
+
305  */
+
306  std::string global_variable_name(const SymbolType& symbol,
+
307  bool use_instance = true) const override;
+
308 
+
309 
+
310  /**
+
311  * Determine variable name in the structure of mechanism properties
+
312  *
+
313  * \param name Variable name that is being printed
+
314  * \param use_instance Should the variable be accessed via instance or data array
+
315  * \return The C++ string representing the access to the variable in the neuron
+
316  * thread structure
+
317  */
+
318  std::string get_variable_name(const std::string& name, bool use_instance = true) const override;
+
319 
+
320 
+
321  /****************************************************************************************/
+
322  /* Main printing routines for code generation */
+
323  /****************************************************************************************/
+
324 
+
325 
+
326  /**
+
327  * Print top file header printed in generated code
+
328  */
+
329  void print_backend_info() override;
+
330 
+
331 
+
332  /**
+
333  * Print standard C/C++ includes
+
334  */
+
335  void print_standard_includes() override;
+
336 
+
337 
+
338  /**
+
339  * Print includes from NEURON
+
340  */
+
341  void print_neuron_includes();
+
342 
+
343 
+
344  void print_sdlists_init(bool print_initializers) override;
+
345 
+
346 
+
347  /**
+
348  * Print the structure that wraps all global variables used in the NMODL
+
349  *
+
350  * \param print_initializers Whether to include default values in the struct
+
351  * definition (true: int foo{42}; false: int foo;)
352  */
-
353  void print_mechanism_register() override;
+
353  void print_mechanism_global_var_structure(bool print_initializers) override;
354 
355 
356  /**
-
357  * Print common code for global functions like nrn_init, nrn_cur and nrn_state
-
358  * \param type The target backend code block type
+
357  * Print byte arrays that register scalar and vector variables for hoc interface
+
358  *
359  */
- -
361  const std::string& function_name = "") override;
-
362 
-
363 
-
364  /**
-
365  * Print the \c nrn\_init function definition
-
366  * \param skip_init_check \c true to generate code executing the initialization conditionally
-
367  */
-
368  void print_nrn_init(bool skip_init_check = true);
-
369 
-
370 
-
371  /**
-
372  * Print nrn_constructor function definition
-
373  *
-
374  */
-
375  void print_nrn_constructor() override;
+
360  void print_global_variables_for_hoc() override;
+
361 
+
362 
+
363  /**
+
364  * Print the mechanism registration function
+
365  *
+
366  */
+
367  void print_mechanism_register() override;
+
368 
+
369 
+
370  /**
+
371  * Print common code for global functions like nrn_init, nrn_cur and nrn_state
+
372  * \param type The target backend code block type
+
373  */
+ +
375  const std::string& function_name = "") override;
376 
377 
378  /**
-
379  * Print nrn_destructor function definition
-
380  *
+
379  * Print the \c nrn\_init function definition
+
380  * \param skip_init_check \c true to generate code executing the initialization conditionally
381  */
-
382  void print_nrn_destructor() override;
+
382  void print_nrn_init(bool skip_init_check = true);
383 
384 
385  /**
-
386  * Print nrn_alloc function definition
+
386  * Print nrn_constructor function definition
387  *
388  */
-
389  void print_nrn_alloc() override;
+
389  void print_nrn_constructor() override;
390 
391 
392  /**
-
393  * Print nrn_jacob function definition
+
393  * Print nrn_destructor function definition
394  *
395  */
-
396  void print_nrn_jacob();
+
396  void print_nrn_destructor() override;
397 
-
398 
-
399  /****************************************************************************************/
-
400  /* Print nrn_state routine */
-
401  /****************************************************************************************/
-
402 
-
403 
-
404  /**
-
405  * Print nrn_state / state update function definition
-
406  */
-
407  void print_nrn_state() override;
-
408 
-
409 
-
410  /****************************************************************************************/
-
411  /* Print nrn_cur related routines */
-
412  /****************************************************************************************/
-
413 
-
414 
-
415  /**
-
416  * Print the \c nrn_current kernel
-
417  *
-
418  * \note nrn_cur_kernel will have two calls to nrn_current if no conductance keywords specified
-
419  * \param node the AST node representing the NMODL breakpoint block
+
398 
+
399  /**
+
400  * Print nrn_alloc function definition
+
401  *
+
402  */
+
403  void print_nrn_alloc() override;
+
404 
+
405 
+
406  /**
+
407  * Print nrn_jacob function definition
+
408  *
+
409  */
+
410  void print_nrn_jacob();
+
411 
+
412 
+
413  /****************************************************************************************/
+
414  /* Print nrn_state routine */
+
415  /****************************************************************************************/
+
416 
+
417 
+
418  /**
+
419  * Print nrn_state / state update function definition
420  */
-
421  void print_nrn_current(const ast::BreakpointBlock& node) override;
+
421  void print_nrn_state() override;
422 
-
423 
-
424  /**
-
425  * Print the \c nrn\_cur kernel with NMODL \c conductance keyword provisions
-
426  *
-
427  * If the NMODL \c conductance keyword is used in the \c breakpoint block, then
-
428  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
-
429  *
-
430  * \param node the AST node representing the NMODL breakpoint block
-
431  */
-
432  void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock& node) override;
-
433 
-
434 
-
435  /**
-
436  * Print the \c nrn\_cur kernel without NMODL \c conductance keyword provisions
-
437  *
-
438  * If the NMODL \c conductance keyword is \b not used in the \c breakpoint block, then
-
439  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
-
440  */
-
441  void print_nrn_cur_non_conductance_kernel() override;
-
442 
-
443 
-
444  /**
-
445  * Print main body of nrn_cur function
-
446  * \param node the AST node representing the NMODL breakpoint block
-
447  */
-
448  void print_nrn_cur_kernel(const ast::BreakpointBlock& node) override;
-
449 
-
450 
-
451  /**
-
452  * Print fast membrane current calculation code
-
453  */
-
454  virtual void print_fast_imem_calculation() override;
-
455 
-
456 
-
457  /**
-
458  * Print nrn_cur / current update function definition
-
459  */
-
460  void print_nrn_cur() override;
-
461 
-
462 
-
463  /****************************************************************************************/
-
464  /* Main code printing entry points */
-
465  /****************************************************************************************/
-
466 
-
467 
-
468  /**
-
469  * Print all includes
-
470  *
-
471  */
-
472  void print_headers_include() override;
-
473 
-
474 
-
475  /**
-
476  * Print all NEURON macros
-
477  *
-
478  */
- +
423 
+
424  /****************************************************************************************/
+
425  /* Print nrn_cur related routines */
+
426  /****************************************************************************************/
+
427 
+
428 
+
429  /**
+
430  * Print the \c nrn_current kernel
+
431  *
+
432  * \note nrn_cur_kernel will have two calls to nrn_current if no conductance keywords specified
+
433  * \param node the AST node representing the NMODL breakpoint block
+
434  */
+
435  void print_nrn_current(const ast::BreakpointBlock& node) override;
+
436 
+
437 
+
438  /**
+
439  * Print the \c nrn\_cur kernel with NMODL \c conductance keyword provisions
+
440  *
+
441  * If the NMODL \c conductance keyword is used in the \c breakpoint block, then
+
442  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
+
443  *
+
444  * \param node the AST node representing the NMODL breakpoint block
+
445  */
+
446  void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock& node) override;
+
447 
+
448 
+
449  /**
+
450  * Print the \c nrn\_cur kernel without NMODL \c conductance keyword provisions
+
451  *
+
452  * If the NMODL \c conductance keyword is \b not used in the \c breakpoint block, then
+
453  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
+
454  */
+
455  void print_nrn_cur_non_conductance_kernel() override;
+
456 
+
457 
+
458  /**
+
459  * Print main body of nrn_cur function
+
460  * \param node the AST node representing the NMODL breakpoint block
+
461  */
+
462  void print_nrn_cur_kernel(const ast::BreakpointBlock& node) override;
+
463 
+
464 
+
465  /**
+
466  * Print fast membrane current calculation code
+
467  */
+
468  virtual void print_fast_imem_calculation() override;
+
469 
+
470 
+
471  /**
+
472  * Print nrn_cur / current update function definition
+
473  */
+
474  void print_nrn_cur() override;
+
475 
+
476 
+
477  /****************************************************************************************/
+
478  /* Main code printing entry points */
+
479  /****************************************************************************************/
480 
481 
482  /**
-
483  * Print NEURON global variable macros
+
483  * Print all includes
484  *
485  */
-
486  void print_global_macros();
+
486  void print_headers_include() override;
487 
488 
489  /**
-
490  * Print mechanism variables' related macros
+
490  * Print all NEURON macros
491  *
492  */
- +
494 
495 
496  /**
-
497  * Print start of namespaces
+
497  * Print NEURON global variable macros
498  *
499  */
-
500  void print_namespace_begin() override;
+
500  void print_global_macros();
501 
502 
503  /**
-
504  * Print end of namespaces
+
504  * Print mechanism variables' related macros
505  *
506  */
-
507  void print_namespace_end() override;
+
508 
509 
510  /**
-
511  * Print all classes
-
512  * \param print_initializers Whether to include default values.
+
511  * Print start of namespaces
+
512  *
513  */
-
514  void print_data_structures(bool print_initializers) override;
+
514  void print_namespace_begin() override;
515 
516 
517  /**
-
518  * Set v_unused (voltage) for NRN_PRCELLSTATE feature
-
519  */
-
520  void print_v_unused() const override;
-
521 
-
522 
-
523  /**
-
524  * Set g_unused (conductance) for NRN_PRCELLSTATE feature
-
525  */
-
526  void print_g_unused() const override;
-
527 
-
528 
-
529  /**
-
530  * Print all compute functions for every backend
-
531  *
-
532  */
-
533  virtual void print_compute_functions() override;
-
534 
-
535 
-
536  /**
-
537  * Print entry point to code generation
-
538  *
+
518  * Print end of namespaces
+
519  *
+
520  */
+
521  void print_namespace_end() override;
+
522 
+
523 
+
524  /**
+
525  * Print all classes
+
526  * \param print_initializers Whether to include default values.
+
527  */
+
528  void print_data_structures(bool print_initializers) override;
+
529 
+
530 
+
531  /**
+
532  * Set v_unused (voltage) for NRN_PRCELLSTATE feature
+
533  */
+
534  void print_v_unused() const override;
+
535 
+
536 
+
537  /**
+
538  * Set g_unused (conductance) for NRN_PRCELLSTATE feature
539  */
-
540  void print_codegen_routines() override;
+
540  void print_g_unused() const override;
541 
-
542 
-
543  /****************************************************************************************/
-
544  /* Overloaded visitor routines */
-
545  /****************************************************************************************/
-
546 
-
547 
-
548  virtual void visit_solution_expression(const ast::SolutionExpression& node) override;
-
549  virtual void visit_watch_statement(const ast::WatchStatement& node) override;
-
550 
-
551 
-
552  /**
-
553  * Print prototype declarations of functions or procedures
-
554  * \tparam T The AST node type of the node (must be of nmodl::ast::Ast or subclass)
-
555  * \param node The AST node representing the function or procedure block
-
556  * \param name A user defined name for the function
-
557  */
-
558  template <typename T>
-
559  void print_function_declaration(const T& node, const std::string& name);
+
542 
+
543  /**
+
544  * Print all compute functions for every backend
+
545  *
+
546  */
+
547  virtual void print_compute_functions() override;
+
548 
+
549 
+
550  /**
+
551  * Print entry point to code generation
+
552  *
+
553  */
+
554  void print_codegen_routines() override;
+
555 
+
556 
+
557  /****************************************************************************************/
+
558  /* Overloaded visitor routines */
+
559  /****************************************************************************************/
560 
561 
-
562  public:
-
563  /**
-
564  * \brief Constructs the C++ code generator visitor
-
565  *
-
566  * This constructor instantiates an NMODL C++ code generator and allows writing generated code
-
567  * directly to a file in \c [output_dir]/[mod_filename].cpp.
-
568  *
-
569  * \note No code generation is performed at this stage. Since the code
-
570  * generator classes are all based on \c AstVisitor the AST must be visited using e.g. \c
-
571  * visit_program in order to generate the C++ code corresponding to the AST.
-
572  *
-
573  * \param mod_filename The name of the model for which code should be generated.
-
574  * It is used for constructing an output filename.
-
575  * \param output_dir The directory where target C++ file should be generated.
-
576  * \param float_type The float type to use in the generated code. The string will be used
-
577  * as-is in the target code. This defaults to \c double.
-
578  */
- -
580  const std::string& output_dir,
-
581  std::string float_type,
-
582  const bool optimize_ionvar_copies)
- -
584 
-
585  /**
-
586  * \copybrief nmodl::codegen::CodegenNeuronCppVisitor
-
587  *
-
588  * This constructor instantiates an NMODL C++ code generator and allows writing generated code
-
589  * into an output stream.
-
590  *
-
591  * \note No code generation is performed at this stage. Since the code
-
592  * generator classes are all based on \c AstVisitor the AST must be visited using e.g. \c
-
593  * visit_program in order to generate the C++ code corresponding to the AST.
-
594  *
-
595  * \param mod_filename The name of the model for which code should be generated.
-
596  * It is used for constructing an output filename.
-
597  * \param stream The output stream onto which to write the generated code
-
598  * \param float_type The float type to use in the generated code. The string will be used
-
599  * as-is in the target code. This defaults to \c double.
-
600  */
- -
602  std::ostream& stream,
-
603  std::string float_type,
-
604  const bool optimize_ionvar_copies)
- -
606 
-
607 
-
608  /****************************************************************************************/
-
609  /* Public printing routines for code generation for use in unit tests */
-
610  /****************************************************************************************/
-
611 
-
612 
-
613  /**
-
614  * Print the structure that wraps all range and int variables required for the NMODL
-
615  *
-
616  * \param print_initializers Whether or not default values for variables
-
617  * be included in the struct declaration.
-
618  */
-
619  void print_mechanism_range_var_structure(bool print_initializers) override;
-
620 };
+
562  virtual void visit_solution_expression(const ast::SolutionExpression& node) override;
+
563  virtual void visit_watch_statement(const ast::WatchStatement& node) override;
+
564 
+
565 
+
566  /**
+
567  * Print prototype declarations of functions or procedures
+
568  * \tparam T The AST node type of the node (must be of nmodl::ast::Ast or subclass)
+
569  * \param node The AST node representing the function or procedure block
+
570  * \param name A user defined name for the function
+
571  */
+
572  template <typename T>
+
573  void print_function_declaration(const T& node, const std::string& name);
+
574 
+
575 
+
576  public:
+
577  /**
+
578  * \brief Constructs the C++ code generator visitor
+
579  *
+
580  * This constructor instantiates an NMODL C++ code generator and allows writing generated code
+
581  * directly to a file in \c [output_dir]/[mod_filename].cpp.
+
582  *
+
583  * \note No code generation is performed at this stage. Since the code
+
584  * generator classes are all based on \c AstVisitor the AST must be visited using e.g. \c
+
585  * visit_program in order to generate the C++ code corresponding to the AST.
+
586  *
+
587  * \param mod_filename The name of the model for which code should be generated.
+
588  * It is used for constructing an output filename.
+
589  * \param output_dir The directory where target C++ file should be generated.
+
590  * \param float_type The float type to use in the generated code. The string will be used
+
591  * as-is in the target code. This defaults to \c double.
+
592  */
+ +
594  const std::string& output_dir,
+
595  std::string float_type,
+
596  const bool optimize_ionvar_copies)
+ +
598 
+
599  /**
+
600  * \copybrief nmodl::codegen::CodegenNeuronCppVisitor
+
601  *
+
602  * This constructor instantiates an NMODL C++ code generator and allows writing generated code
+
603  * into an output stream.
+
604  *
+
605  * \note No code generation is performed at this stage. Since the code
+
606  * generator classes are all based on \c AstVisitor the AST must be visited using e.g. \c
+
607  * visit_program in order to generate the C++ code corresponding to the AST.
+
608  *
+
609  * \param mod_filename The name of the model for which code should be generated.
+
610  * It is used for constructing an output filename.
+
611  * \param stream The output stream onto which to write the generated code
+
612  * \param float_type The float type to use in the generated code. The string will be used
+
613  * as-is in the target code. This defaults to \c double.
+
614  */
+ +
616  std::ostream& stream,
+
617  std::string float_type,
+
618  const bool optimize_ionvar_copies)
+ +
620 
621 
-
622 
-
623 /**
-
624  * \details If there is an argument with name (say alpha) same as range variable (say alpha),
-
625  * we want to avoid it being printed as instance->alpha. And hence we disable variable
-
626  * name lookup during prototype declaration. Note that the name of procedure can be
-
627  * different in case of table statement.
-
628  */
-
629 template <typename T>
-
630 void CodegenNeuronCppVisitor::print_function_declaration(const T& node, const std::string& name) {
- -
632  auto type = default_float_data_type();
-
633 
-
634  // internal and user provided arguments
-
635  auto internal_params = internal_method_parameters();
-
636  const auto& params = node.get_parameters();
-
637  for (const auto& param: params) {
-
638  internal_params.emplace_back("", type, "", param.get()->get_node_name());
-
639  }
-
640 
-
641  // procedures have "int" return type by default
-
642  const char* return_type = "int";
-
643  if (node.is_function_block()) {
-
644  return_type = default_float_data_type();
-
645  }
-
646 
-
647  /// TODO: Edit for NEURON
-
648  printer->add_indent();
-
649  printer->fmt_text("inline {} {}({})",
-
650  return_type,
-
651  method_name(name),
-
652  get_parameter_str(internal_params));
-
653 
- -
655 }
-
656 
-
657 /** \} */ // end of codegen_backends
-
658 
-
659 } // namespace codegen
-
660 } // namespace nmodl
+
622  /****************************************************************************************/
+
623  /* Public printing routines for code generation for use in unit tests */
+
624  /****************************************************************************************/
+
625 
+
626 
+
627  /**
+
628  * Print the structure that wraps all range and int variables required for the NMODL
+
629  *
+
630  * \param print_initializers Whether or not default values for variables
+
631  * be included in the struct declaration.
+
632  */
+
633  void print_mechanism_range_var_structure(bool print_initializers) override;
+
634 };
+
635 
+
636 
+
637 /**
+
638  * \details If there is an argument with name (say alpha) same as range variable (say alpha),
+
639  * we want to avoid it being printed as instance->alpha. And hence we disable variable
+
640  * name lookup during prototype declaration. Note that the name of procedure can be
+
641  * different in case of table statement.
+
642  */
+
643 template <typename T>
+
644 void CodegenNeuronCppVisitor::print_function_declaration(const T& node, const std::string& name) {
+ +
646  auto type = default_float_data_type();
+
647 
+
648  // internal and user provided arguments
+
649  auto internal_params = internal_method_parameters();
+
650  const auto& params = node.get_parameters();
+
651  for (const auto& param: params) {
+
652  internal_params.emplace_back("", type, "", param.get()->get_node_name());
+
653  }
+
654 
+
655  // procedures have "int" return type by default
+
656  const char* return_type = "int";
+
657  if (node.is_function_block()) {
+
658  return_type = default_float_data_type();
+
659  }
+
660 
+
661  /// TODO: Edit for NEURON
+
662  printer->add_indent();
+
663  printer->fmt_text("inline {} {}({})",
+
664  return_type,
+
665  method_name(name),
+
666  get_parameter_str(internal_params));
+
667 
+ +
669 }
+
670 
+
671 /** \} */ // end of codegen_backends
+
672 
+
673 } // namespace codegen
+
674 } // namespace nmodl
-
const char * external_method_parameters(bool table=false) noexcept override
Parameters for functions in generated code that are called back from external code.
-
void print_nrn_destructor() override
Print nrn_destructor function definition.
-
void print_nrn_cur_non_conductance_kernel() override
Print the nrn_cur kernel without NMODL conductance keyword provisions.
+
const char * external_method_parameters(bool table=false) noexcept override
Parameters for functions in generated code that are called back from external code.
+
void print_nrn_destructor() override
Print nrn_destructor function definition.
+
void print_nrn_cur_non_conductance_kernel() override
Print the nrn_cur kernel without NMODL conductance keyword provisions.
Helper to represent information about index/int variables.
-
void print_nrn_cur() override
Print nrn_cur / current update function definition.
-
void print_macro_definitions()
Print all NEURON macros.
+
void print_nrn_cur() override
Print nrn_cur / current update function definition.
+
void print_macro_definitions()
Print all NEURON macros.
-
void print_neuron_includes()
Print includes from NEURON.
-
void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
+
void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
+
void print_neuron_includes()
Print includes from NEURON.
+
void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
bool optimize_ionvar_copies
Flag to indicate if visitor should avoid ion variable copies.
-
std::string internal_method_arguments() override
Arguments for functions that are defined and used internally.
+
std::string internal_method_arguments() override
Arguments for functions that are defined and used internally.
std::shared_ptr< symtab::Symbol > SymbolType
-
void print_nrn_alloc() override
Print nrn_alloc function definition.
-
std::string register_mechanism_arguments() const override
Arguments for register_mech or point_register_mech function.
+
void print_nrn_alloc() override
Print nrn_alloc function definition.
+
std::string register_mechanism_arguments() const override
Arguments for register_mech or point_register_mech function.
int position_of_int_var(const std::string &name) const override
Determine the position in the data array for a given int variable.
-
ParamVector internal_method_parameters() override
Parameters for internally defined functions.
+
ParamVector internal_method_parameters() override
Parameters for internally defined functions.
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
-
std::string global_variable_name(const SymbolType &symbol, bool use_instance=true) const override
Determine the variable name for a global variable given its symbol.
-
std::string nrn_thread_internal_arguments() override
Arguments for "_threadargs_" macro in neuron implementation.
+
std::string global_variable_name(const SymbolType &symbol, bool use_instance=true) const override
Determine the variable name for a global variable given its symbol.
+
std::string nrn_thread_internal_arguments() override
Arguments for "_threadargs_" macro in neuron implementation.
Implement classes for representing symbol table at block and file scope.
virtual std::string backend_name() const override
Name of the code generation backend.
-
std::string process_verbatim_text(std::string const &text) override
Process a verbatim block for possible variable renaming.
-
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
-
virtual void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
-
void print_namespace_end() override
Print end of namespaces.
-
CodegenNeuronCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies)
Visitor for printing C++ code compatible with legacy api of NEURON
-
void print_nrn_state() override
Print nrn_state / state update function definition.
+
std::string process_verbatim_text(std::string const &text) override
Process a verbatim block for possible variable renaming.
+
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
+
virtual void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
+
void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
+
void print_namespace_end() override
Print end of namespaces.
+
void print_net_move_call(const ast::FunctionCall &node) override
Print call to net_move.
+
CodegenNeuronCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies)
Visitor for printing C++ code compatible with legacy api of NEURON
+
void print_nrn_state() override
Print nrn_state / state update function definition.
const char * default_float_data_type() const noexcept
Default data type for floating point elements.
-
virtual void print_global_function_common_code(BlockType type, const std::string &function_name="") override
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
-
std::string float_variable_name(const SymbolType &symbol, bool use_instance) const override
Determine the name of a float variable given its symbol.
-
void print_function(const ast::FunctionBlock &node) override
Print NMODL function in target backend code.
-
void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
+
virtual void print_global_function_common_code(BlockType type, const std::string &function_name="") override
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
+
std::string float_variable_name(const SymbolType &symbol, bool use_instance) const override
Determine the name of a float variable given its symbol.
+
void print_function(const ast::FunctionBlock &node) override
Print NMODL function in target backend code.
+
void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
Visitor for printing C++ code compatible with legacy api of CoreNEURON
Base class for all block scoped nodes.
Definition: block.hpp:41
Represent WATCH statement in NMODL.
-
void print_function_declaration(const T &node, const std::string &name)
Print prototype declarations of functions or procedures.
+
void print_function_declaration(const T &node, const std::string &name)
Print prototype declarations of functions or procedures.
Represents a BREAKPOINT block in NMODL.
-
void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
Print the nrn_cur kernel with NMODL conductance keyword provisions.
-
std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const override
Determine the name of an int variable given its symbol.
-
void print_namespace_begin() override
Print start of namespaces.
+
void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
Print the nrn_cur kernel with NMODL conductance keyword provisions.
+
std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const override
Determine the name of an int variable given its symbol.
+
void print_namespace_begin() override
Print start of namespaces.
-
void print_global_variables_for_hoc() override
Print byte arrays that register scalar and vector variables for hoc interface.
-
void print_function_call(const ast::FunctionCall &node) override
Print call to internal or external function.
-
void print_standard_includes() override
Print standard C/C++ includes.
-
void print_mechanism_range_var_structure(bool print_initializers) override
Print the structure that wraps all range and int variables required for the NMODL.
-
virtual void print_procedure(const ast::ProcedureBlock &node) override
Print NMODL procedure in target backend code.
+
void print_global_variables_for_hoc() override
Print byte arrays that register scalar and vector variables for hoc interface.
+
void print_standard_includes() override
Print standard C/C++ includes.
+
void print_mechanism_range_var_structure(bool print_initializers) override
Print the structure that wraps all range and int variables required for the NMODL.
+
virtual void print_procedure(const ast::ProcedureBlock &node) override
Print NMODL procedure in target backend code.
Helper class for printing C/C++ code.
-
void print_namespace_start() override
Prints the start of the neuron namespace.
-
void print_backend_info() override
Print top file header printed in generated code.
-
virtual void print_compute_functions() override
Print all compute functions for every backend.
-
void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
Print main body of nrn_cur function.
-
void print_mechanism_register() override
Print the mechanism registration function.
-
void print_nrn_jacob()
Print nrn_jacob function definition.
+
void print_namespace_start() override
Prints the start of the neuron namespace.
+
void print_backend_info() override
Print top file header printed in generated code.
+
virtual void print_compute_functions() override
Print all compute functions for every backend.
+
void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
Print main body of nrn_cur function.
+
void print_mechanism_register() override
Print the mechanism registration function.
+
void print_nrn_jacob()
Print nrn_jacob function definition.
Various types to store code generation specific information.
-
virtual void print_fast_imem_calculation() override
Print fast membrane current calculation code.
-
void print_data_structures(bool print_initializers) override
Print all classes.
-
void print_sdlists_init(bool print_initializers) override
+
virtual void print_fast_imem_calculation() override
Print fast membrane current calculation code.
+
void print_data_structures(bool print_initializers) override
Print all classes.
+
void print_sdlists_init(bool print_initializers) override
static std::string get_parameter_str(const ParamVector &params)
Generate the string representing the procedure parameter declaration.
virtual void print_atomic_reduction_pragma() override
Print atomic update pragma for reduction statements.
-
void print_namespace_stop() override
Prints the end of the neuron namespace.
+
void print_namespace_stop() override
Prints the end of the neuron namespace.
-
void print_mechanism_variables_macros()
Print mechanism variables' related macros.
+
void print_mechanism_variables_macros()
Print mechanism variables' related macros.
Visitor for printing C++ code compatible with legacy api of NEURON
-
virtual void visit_solution_expression(const ast::SolutionExpression &node) override
TODO: Edit for NEURON.
+
virtual void visit_solution_expression(const ast::SolutionExpression &node) override
TODO: Edit for NEURON.
std::string float_type
Data type of floating point variables.
-
void print_nrn_constructor() override
Print nrn_constructor function definition.
+
void print_nrn_constructor() override
Print nrn_constructor function definition.
Implement logger based on spdlog library.
Represent solution of a block in the AST.
bool enable_variable_name_lookup
Variable name should be converted to instance name (but not for function arguments)
BlockType
Helper to represent various block types.
-
void print_function_or_procedure(const ast::Block &node, const std::string &name) override
Print nmodl function or procedure (common code)
-
void print_headers_include() override
Print all includes.
-
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
+
void print_function_or_procedure(const ast::Block &node, const std::string &name) override
Print nmodl function or procedure (common code)
+
void print_headers_include() override
Print all includes.
+
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
int position_of_float_var(const std::string &name) const override
Determine the position in the data array for a given float variable.
-
std::string get_variable_name(const std::string &name, bool use_instance=true) const override
Determine variable name in the structure of mechanism properties.
+
std::string get_variable_name(const std::string &name, bool use_instance=true) const override
Determine variable name in the structure of mechanism properties.
Visitor for printing C++ code compatible with legacy api of CoreNEURON
std::string mod_filename
Name of mod file (without .mod suffix)
std::string simulator_name() override
Name of the simulator the code was generated for.
-
void print_function_procedure_helper(const ast::Block &node) override
Common helper function to help printing function or procedure blocks.
+
void print_function_procedure_helper(const ast::Block &node) override
Common helper function to help printing function or procedure blocks.
std::unique_ptr< CodePrinter > printer
Code printer object for target (C++)
-
const char * external_method_arguments() noexcept override
Arguments for external functions called from generated code.
-
std::string method_name(const std::string &name) const
Constructs the name of a function or procedure.
-
std::string nrn_thread_arguments() const override
Arguments for "_threadargs_" macro in neuron implementation.
-
void print_codegen_routines() override
Print entry point to code generation.
-
CodegenNeuronCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies)
Constructs the C++ code generator visitor.
-
void print_function_prototypes() override
Print function and procedures prototype declaration.
-
void print_mechanism_global_var_structure(bool print_initializers) override
Print the structure that wraps all global variables used in the NMODL.
-
void print_global_macros()
Print NEURON global variable macros.
+
const char * external_method_arguments() noexcept override
Arguments for external functions called from generated code.
+
std::string method_name(const std::string &name) const
Constructs the name of a function or procedure.
+
std::string nrn_thread_arguments() const override
Arguments for "_threadargs_" macro in neuron implementation.
+
void print_codegen_routines() override
Print entry point to code generation.
+
CodegenNeuronCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies)
Constructs the C++ code generator visitor.
+
void print_function_prototypes() override
Print function and procedures prototype declaration.
+
void print_mechanism_global_var_structure(bool print_initializers) override
Print the structure that wraps all global variables used in the NMODL.
+
void print_global_macros()
Print NEURON global variable macros.
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
Concrete visitor for all AST classes.
diff --git a/html/doxygen/functions_func_p.html b/html/doxygen/functions_func_p.html index 626cea75c6..7d79fff16f 100644 --- a/html/doxygen/functions_func_p.html +++ b/html/doxygen/functions_func_p.html @@ -285,9 +285,7 @@

- p -

    , nmodl::codegen::CodegenNeuronCppVisitor
  • print_function_call() -: nmodl::codegen::CodegenCoreneuronCppVisitor -, nmodl::codegen::CodegenCppVisitor -, nmodl::codegen::CodegenNeuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
  • print_function_declaration() : nmodl::codegen::CodegenCoreneuronCppVisitor @@ -453,7 +451,9 @@

    - p -

      , nmodl::codegen::CodegenNeuronCppVisitor
    • print_net_event_call() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCoreneuronCppVisitor +, nmodl::codegen::CodegenCppVisitor +, nmodl::codegen::CodegenNeuronCppVisitor
    • print_net_init() : nmodl::codegen::CodegenCoreneuronCppVisitor @@ -467,7 +467,9 @@

      - p -

        , nmodl::codegen::CodegenCoreneuronCppVisitor
      • print_net_move_call() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCoreneuronCppVisitor +, nmodl::codegen::CodegenCppVisitor +, nmodl::codegen::CodegenNeuronCppVisitor
      • print_net_receive() : nmodl::codegen::CodegenCoreneuronCppVisitor @@ -514,7 +516,9 @@

        - p -

          , nmodl::codegen::CodegenCoreneuronCppVisitor
        • print_net_send_call() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCoreneuronCppVisitor +, nmodl::codegen::CodegenCppVisitor +, nmodl::codegen::CodegenNeuronCppVisitor
        • print_neuron_includes() : nmodl::codegen::CodegenNeuronCppVisitor @@ -653,7 +657,7 @@

          - p -

            : nmodl::codegen::CodegenCoreneuronCppVisitor
          • ProcedureBlock() -: nmodl::ast::ProcedureBlock +: nmodl::ast::ProcedureBlock
          • process_conserve_reac_var() : nmodl::visitor::KineticBlockVisitor @@ -665,7 +669,7 @@

            - p -

              : nmodl::codegen::CodegenCoreneuronCppVisitor
            • process_variable() -: nmodl::visitor::DefUseAnalyzeVisitor +: nmodl::visitor::DefUseAnalyzeVisitor
            • process_verbatim_text() : nmodl::codegen::CodegenCoreneuronCppVisitor @@ -676,13 +680,13 @@

              - p -

                : nmodl::codegen::CodegenCoreneuronCppVisitor
              • Program() -: nmodl::ast::Program +: nmodl::ast::Program
              • ProtectStatement() -: nmodl::ast::ProtectStatement +: nmodl::ast::ProtectStatement
              • push_block() -: nmodl::printer::CodePrinter +: nmodl::printer::CodePrinter , nmodl::printer::JSONPrinter
              • push_current_directory() diff --git a/html/doxygen/functions_p.html b/html/doxygen/functions_p.html index e6eaa767fc..8bb1d7221b 100644 --- a/html/doxygen/functions_p.html +++ b/html/doxygen/functions_p.html @@ -340,9 +340,7 @@

                - p -

                  , nmodl::codegen::CodegenNeuronCppVisitor
                • print_function_call() -: nmodl::codegen::CodegenCoreneuronCppVisitor -, nmodl::codegen::CodegenCppVisitor -, nmodl::codegen::CodegenNeuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
                • print_function_declaration() : nmodl::codegen::CodegenCoreneuronCppVisitor @@ -508,7 +506,9 @@

                  - p -

                    , nmodl::codegen::CodegenNeuronCppVisitor
                  • print_net_event_call() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCoreneuronCppVisitor +, nmodl::codegen::CodegenCppVisitor +, nmodl::codegen::CodegenNeuronCppVisitor
                  • print_net_init() : nmodl::codegen::CodegenCoreneuronCppVisitor @@ -522,7 +522,9 @@

                    - p -

                      , nmodl::codegen::CodegenCoreneuronCppVisitor
                    • print_net_move_call() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCoreneuronCppVisitor +, nmodl::codegen::CodegenCppVisitor +, nmodl::codegen::CodegenNeuronCppVisitor
                    • print_net_receive() : nmodl::codegen::CodegenCoreneuronCppVisitor @@ -569,7 +571,9 @@

                      - p -

                        , nmodl::codegen::CodegenCoreneuronCppVisitor
                      • print_net_send_call() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCoreneuronCppVisitor +, nmodl::codegen::CodegenCppVisitor +, nmodl::codegen::CodegenNeuronCppVisitor
                      • print_neuron_includes() : nmodl::codegen::CodegenNeuronCppVisitor @@ -739,7 +743,7 @@

                        - p -

                          : nmodl::codegen::CodegenCoreneuronCppVisitor
                        • process_variable() -: nmodl::visitor::DefUseAnalyzeVisitor +: nmodl::visitor::DefUseAnalyzeVisitor
                        • process_verbatim_text() : nmodl::codegen::CodegenCoreneuronCppVisitor @@ -750,7 +754,7 @@

                          - p -

                            : nmodl::codegen::CodegenCoreneuronCppVisitor
                          • Program() -: nmodl::ast::Program +: nmodl::ast::Program
                          • program_symtab : nmodl::codegen::CodegenCppVisitor diff --git a/html/doxygen/group__codegen__backends.html b/html/doxygen/group__codegen__backends.html index f39ab8e370..cb50161e7f 100644 --- a/html/doxygen/group__codegen__backends.html +++ b/html/doxygen/group__codegen__backends.html @@ -191,7 +191,7 @@

                            Definition at line 630 of file codegen_neuron_cpp_visitor.hpp.

                            +

                            Definition at line 644 of file codegen_neuron_cpp_visitor.hpp.

                            @@ -247,7 +247,7 @@

                            Definition at line 1295 of file codegen_coreneuron_cpp_visitor.hpp.

                            +

                            Definition at line 1288 of file codegen_coreneuron_cpp_visitor.hpp.

                            @@ -310,7 +310,7 @@

                            Definition at line 1160 of file codegen_cpp_visitor.hpp.

                            +

                            Definition at line 1179 of file codegen_cpp_visitor.hpp.

                            diff --git a/html/doxygen/group__codegen__backends.js b/html/doxygen/group__codegen__backends.js index e98b45e899..70ddc8f7d6 100644 --- a/html/doxygen/group__codegen__backends.js +++ b/html/doxygen/group__codegen__backends.js @@ -104,7 +104,6 @@ var group__codegen__backends = [ "print_fast_imem_calculation", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6228949e87b0a9e14fe6886fc346e28c", null ], [ "print_first_pointer_var_index_getter", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6498ebb631852d55d7585ef179b3008e", null ], [ "print_function", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae47b27b3bfb2d9fa200b02f449c126e7", null ], - [ "print_function_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7b24f3b0faf05f17c28e06b4981b55dd", null ], [ "print_function_declaration", "group__codegen__backends.html#gaebe64f7d52f5cb96d8c73c1619bddabf", null ], [ "print_function_or_procedure", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab0d109b9d28587ba6cce93783a348d86", null ], [ "print_function_procedure_helper", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5be32556e7bb7fd48b1bdb71d75fe5bb", null ], @@ -142,11 +141,11 @@ var group__codegen__backends = [ "print_namespace_end", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aed50b0789d65ce89402dcf00e186f261", null ], [ "print_namespace_start", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a47aa1e9e08042a9c2bc4c5a0773fdf53", null ], [ "print_namespace_stop", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aad6c90116002d10659c14c064bfa9aaa", null ], - [ "print_net_event_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1e4f93d026816a7f27d710cf2a6235bb", null ], + [ "print_net_event_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad964cdf59c0f6c54e92cd652f2ea8a02", null ], [ "print_net_init", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4f3cf2cc2726db4de8edd19ef660f52b", null ], [ "print_net_init_acc_serial_annotation_block_begin", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a656859e8b2ce968ed39db6e966c2338f", null ], [ "print_net_init_acc_serial_annotation_block_end", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afaaa9405b30312279aa8977c015ef1fa", null ], - [ "print_net_move_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2d1a1636e6662ed44ef6f6147abe78d4", null ], + [ "print_net_move_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3516dd7938db6a28e1d5668a9c4aca25", null ], [ "print_net_receive", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a48e4c785bbae026d24044736fd6913c2", null ], [ "print_net_receive_arg_size_getter", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac1fd31d8615b5b189349471a7ca23cee", null ], [ "print_net_receive_buffering", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7cb383070a38db2f4015b982371ca1b", null ], @@ -160,7 +159,7 @@ var group__codegen__backends = [ "print_net_send_buffering", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a213e98f7c1ff3a0b9f07a6f3f3af3ee3", null ], [ "print_net_send_buffering_cnt_update", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7be1a9429e5200afb286bbc3b4e4ba13", null ], [ "print_net_send_buffering_grow", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab83b1dd02818a29abd3ad0cd4697a470", null ], - [ "print_net_send_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a38b1b3d5e9e9a3cd6a679380dc4f9b61", null ], + [ "print_net_send_call", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4d163cf837717e6f1bac43c1a492f456", null ], [ "print_newtonspace_transfer_to_device", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1b43c39d762c18b8457ba45496726e24", null ], [ "print_nrn_alloc", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac6eb4038a1823315b2aa509f7c05c132", null ], [ "print_nrn_constructor", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a24f47375affd9cc7195d83f026fc2ab8", null ], @@ -262,7 +261,7 @@ var group__codegen__backends = [ "print_data_structures", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acbb83079b063cd6b48e07030b1f5df84", null ], [ "print_fast_imem_calculation", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34492b32e18b9fbfd3ba01ba8ad85eb5", null ], [ "print_function", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4b9e335b7f968d36d9cd6bdfc34bba34", null ], - [ "print_function_call", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a43af5eef62e0e958d160b77fa1d6c099", null ], + [ "print_function_call", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad63b4318b5abd6b8c224fab70fe61081", null ], [ "print_function_or_procedure", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3836bfe0a9610b9037a73ea727246e71", null ], [ "print_function_procedure_helper", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aa017bbe95ad7539e72d182dac59f2454", null ], [ "print_function_prototypes", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a50ccadf68055ea9e26439ccaed0d68f7", null ], @@ -278,6 +277,9 @@ var group__codegen__backends = [ "print_namespace_end", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2f0c1a7b9127c6248b03b296257e8833", null ], [ "print_namespace_start", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af2490222aefa83d67238c605e05197a3", null ], [ "print_namespace_stop", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1d253986a351e263db95bb63c51775c3", null ], + [ "print_net_event_call", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae350ed7effbbcf8dbea050231599c8e6", null ], + [ "print_net_move_call", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a36470f1359566ee071015a630deb89cd", null ], + [ "print_net_send_call", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a78481115d7590930ac4d58d0bdaa2acc", null ], [ "print_nmodl_constants", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8cefcce52cd721b3869701367f456a71", null ], [ "print_nrn_alloc", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7b4903b21fc0872bcb8e68fe0a2efb1a", null ], [ "print_nrn_constructor", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6145c59148d531ca06c5d6f218e21b02", null ], @@ -371,7 +373,6 @@ var group__codegen__backends = [ "print_data_structures", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aeb0635e7e6e488519882d930401b5c2b", null ], [ "print_fast_imem_calculation", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#abce8ff7e8bd0754c8d61066779b4e72f", null ], [ "print_function", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a8633f24f67f430477ff3bf4a0c6b36cb", null ], - [ "print_function_call", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3ef1a3189051f86fce9602c7b02b445a", null ], [ "print_function_declaration", "group__codegen__backends.html#gabd283274182774ed39c08a0714842d43", null ], [ "print_function_or_procedure", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad635ed74eba5b2c3e0aee2e29ca1167a", null ], [ "print_function_procedure_helper", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af6a5224b66dde062241120381b3cb8df", null ], @@ -390,6 +391,9 @@ var group__codegen__backends = [ "print_namespace_end", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a6abde0bb8aa4c6bd11cd15303295e9f9", null ], [ "print_namespace_start", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9749309d724cd1f4a47989c9d76c92c3", null ], [ "print_namespace_stop", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa40457fee0fa38359bb1ef9487efd00e", null ], + [ "print_net_event_call", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adf3ecfb21886bca7be8a882e2166a919", null ], + [ "print_net_move_call", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af2f331ce244ac6fa94bbc94de9163fba", null ], + [ "print_net_send_call", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adbf8216b0f67ec9e714bee6aa52e1e3f", null ], [ "print_neuron_includes", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a62669c86daa6bdd6c1e67e93461ad747", null ], [ "print_nrn_alloc", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a76f144fae532604ab1a1065d9c645211", null ], [ "print_nrn_constructor", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a96edb3ade58fc8c569ac0c73a54fd091", null ], diff --git a/html/doxygen/namespacenmodl_1_1codegen.html b/html/doxygen/namespacenmodl_1_1codegen.html index 61f88a87a1..8830c059fa 100644 --- a/html/doxygen/namespacenmodl_1_1codegen.html +++ b/html/doxygen/namespacenmodl_1_1codegen.html @@ -220,7 +220,7 @@

                            Definition at line 1923 of file codegen_coreneuron_cpp_visitor.cpp.

                            +

                            Definition at line 1886 of file codegen_coreneuron_cpp_visitor.cpp.

                            @@ -248,7 +248,7 @@

                            -

                            Definition at line 591 of file codegen_coreneuron_cpp_visitor.cpp.

                            +

                            Definition at line 554 of file codegen_coreneuron_cpp_visitor.cpp.

                            @@ -298,7 +298,7 @@

                            (*R) = 1.0;

                            So, the R in AST needs to be renamed with (*R).

                            -

                            Definition at line 2988 of file codegen_coreneuron_cpp_visitor.cpp.

                            +

                            Definition at line 2951 of file codegen_coreneuron_cpp_visitor.cpp.

                            @@ -315,7 +315,7 @@

                            -

                            Definition at line 347 of file codegen_cpp_visitor.cpp.

                            +

                            Definition at line 383 of file codegen_cpp_visitor.cpp.

                            diff --git a/html/doxygen/navtreedata.js b/html/doxygen/navtreedata.js index d014e1ebc6..ad3b68bfed 100644 --- a/html/doxygen/navtreedata.js +++ b/html/doxygen/navtreedata.js @@ -78,25 +78,25 @@ var NAVTREEINDEX = "classnmodl_1_1ast_1_1_read_ion_var.html#ad42da1e074494913e797bf08c6029173", "classnmodl_1_1ast_1_1_unary_expression.html#a1411d25bdd6ea56c1422260190554bbb", "classnmodl_1_1ast_1_1_var_name.html#a30325f92847805f168f74ae30b37ad53", -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a25d775a02a44f3e45f3b8a661249c5e8", +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a293512e33ee9a6a4585664e73e5897ed", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad283ce438acd2faea2bbb309251890a1", -"classnmodl_1_1printer_1_1_code_printer.html", -"classnmodl_1_1visitor_1_1_after_c_vode_to_cnexp_visitor.html#ae828f5954507fd77f9a7211948aad4da", -"classnmodl_1_1visitor_1_1_const_visitor.html#a106a0126cb94e18fd9f6ba1f9e8988ee", -"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a417d049fa26aba5294f53e6ef81aa245", -"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#ab2a0854ec26cc75c42180ecc20f3c16a", -"classnmodl_1_1visitor_1_1_perf_visitor.html#adb10791f8b4b750b2bf36181003f7238", -"classnmodl_1_1visitor_1_1_verbatim_visitor.html#a84597affd230a1046f26918b34158842", -"code__printer_8cpp.html", -"dir_f4739f0eb21cb15a404f3cea1464656d.html", -"group__ast__class.html#ga4892777c5b32b112d588b05d07f28549", -"group__ast__type.html#gac392e49849e60c05e42ea02c7b445033", -"group__codegen__details.html", -"lookup__visitor_8cpp.html", -"perf__visitor_8hpp.html", -"structnmodl_1_1codegen_1_1_codegen_info.html#ab4926329370f2ec809911757bf21597c", -"symbol__properties_8hpp.html#a9615978047cc9d7b43df2f549f2baffe", -"var__usage__visitor_8cpp.html" +"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#a96f5b7ca4e6a5d550c9ed9f768a00e28", +"classnmodl_1_1utils_1_1_singleton_random_string.html#addba2a0ea13aed19f405cde2f88be32a", +"classnmodl_1_1visitor_1_1_const_visitor.html#a029687fce54202e0ea2d68540b840643", +"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3e7505ad75b9a879598ad314f2aa1da2", +"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aa83e7bb9db5343a605c09a6bec764269", +"classnmodl_1_1visitor_1_1_perf_visitor.html#acb93ed202cb97a7ab0ffbaf2cae621da", +"classnmodl_1_1visitor_1_1_verbatim_visitor.html#a2a1679f340e006135e3a72a78fb7c7a4", +"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afb8f66b87e39475950ff179ed8dd5417", +"dir_bb63d001f2c2d4d23cdeedc048a4b8ac.html", +"group__ast__class.html#ga3f92f72529d03053ab51c41b38a29897", +"group__ast__prop.html#ggac542051eff25e93d11270a5c9d211143abd2dfe0cbb245d6c4c4e553680834ba8", +"group__codegen__backends.html#gabd283274182774ed39c08a0714842d43", +"lon__difuse_8hpp_source.html", +"perf__stat_8hpp.html", +"structnmodl_1_1codegen_1_1_codegen_info.html#aa6f2efd9a16289c4131b197e7296337c", +"symbol__properties_8hpp.html#a901f9299d7c59b1694463d26928f2a75a9c70933aff6b2a6d08c687a6cbb6b765", +"var__usage_8cpp.html" ]; var SYNCONMSG = 'click to disable panel synchronisation'; diff --git a/html/doxygen/navtreeindex14.js b/html/doxygen/navtreeindex14.js index 3b3fb28c6b..e68ce90cbc 100644 --- a/html/doxygen/navtreeindex14.js +++ b/html/doxygen/navtreeindex14.js @@ -227,27 +227,27 @@ var NAVTREEINDEX14 = "classnmodl_1_1codegen_1_1_codegen_compatibility_visitor.html#ad9d74c011314b9b4e4bea2b5848ad1fd":[0,1,0,1,3], "classnmodl_1_1codegen_1_1_codegen_compatibility_visitor.html#af8f4da257ecc161c61cabda2eee0cc3e":[0,1,0,1,2], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html":[0,1,0,2], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a03811d5433b03bea89083de74b62c40f":[0,1,0,2,117], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a06aa792160b4f021f66b58a21d3a296c":[0,1,0,2,151], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a0ae3f3e58ed5748189ac482eabac295b":[0,1,0,2,81], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a03811d5433b03bea89083de74b62c40f":[0,1,0,2,116], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a06aa792160b4f021f66b58a21d3a296c":[0,1,0,2,150], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a0ae3f3e58ed5748189ac482eabac295b":[0,1,0,2,80], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a0c07a4568bf732ccc7a6ec9b763bc71b":[0,1,0,2,21], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a0dfee548a568667a78d0ab729131d6c2":[0,1,0,2,46], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a0eb6eb4f68afb0711caa99a0f9ee85d4":[0,1,0,2,135], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a12b568597656cbb1ed593856f1e30b3e":[0,1,0,2,69], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a151c9e289cdc4df282ed47b1f72ecc6e":[0,1,0,2,64], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a16415780703b2653d6e4c29dba3ee7f9":[0,1,0,2,71], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a0eb6eb4f68afb0711caa99a0f9ee85d4":[0,1,0,2,134], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a12b568597656cbb1ed593856f1e30b3e":[0,1,0,2,68], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a151c9e289cdc4df282ed47b1f72ecc6e":[0,1,0,2,63], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a16415780703b2653d6e4c29dba3ee7f9":[0,1,0,2,70], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a18c00e97466c3bf5a83f277ca48b0d95":[0,1,0,2,24], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a18e0834ef774dd2bb5e5adc4ff2df5ae":[0,1,0,2,8], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1b309a0bd2939736aadba430634ce52d":[0,1,0,2,9], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1b43c39d762c18b8457ba45496726e24":[0,1,0,2,113], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1bd7222586890e03588e16f640f0bcbf":[0,1,0,2,103], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1ca2f8a251f296a1fde805928739be41":[0,1,0,2,119], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1b43c39d762c18b8457ba45496726e24":[0,1,0,2,112], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1bd7222586890e03588e16f640f0bcbf":[0,1,0,2,102], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1ca2f8a251f296a1fde805928739be41":[0,1,0,2,118], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1e15a71e22ad32b958dd83b1df5d10fb":[0,1,0,2,25], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1e4f93d026816a7f27d710cf2a6235bb":[0,1,0,2,94], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1edece0e83918dd7384d0bbe406bf9e7":[0,1,0,2,77], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a213e98f7c1ff3a0b9f07a6f3f3af3ee3":[0,1,0,2,109], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1edece0e83918dd7384d0bbe406bf9e7":[0,1,0,2,76], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a213e98f7c1ff3a0b9f07a6f3f3af3ee3":[0,1,0,2,108], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a227edd197659a7ae89b0beba807a4f54":[0,1,0,2,43], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a24a315e64fe859e57c3fe8187c23c137":[0,1,0,2,128], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a24ec8383532b4cab19cafd75554a7119":[0,1,0,2,74], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a24f47375affd9cc7195d83f026fc2ab8":[0,1,0,2,115] +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a24a315e64fe859e57c3fe8187c23c137":[0,1,0,2,127], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a24ec8383532b4cab19cafd75554a7119":[0,1,0,2,73], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a24f47375affd9cc7195d83f026fc2ab8":[0,1,0,2,114], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a25d775a02a44f3e45f3b8a661249c5e8":[0,1,0,2,107] }; diff --git a/html/doxygen/navtreeindex15.js b/html/doxygen/navtreeindex15.js index f55550f6c4..ba19335ba2 100644 --- a/html/doxygen/navtreeindex15.js +++ b/html/doxygen/navtreeindex15.js @@ -1,253 +1,253 @@ var NAVTREEINDEX15 = { -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a25d775a02a44f3e45f3b8a661249c5e8":[0,1,0,2,108], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a293512e33ee9a6a4585664e73e5897ed":[0,1,0,2,4], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a294fadf1935383379dd1002208363c71":[0,1,0,2,26], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2973dd8bba370083e1bfe449a70359ee":[0,1,0,2,65], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2998645f8c5bf76da0389299d033afe0":[0,1,0,2,124], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2973dd8bba370083e1bfe449a70359ee":[0,1,0,2,64], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2998645f8c5bf76da0389299d033afe0":[0,1,0,2,123], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2c93009c078b20b41517309c499f081f":[0,1,0,2,23], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2d1a1636e6662ed44ef6f6147abe78d4":[0,1,0,2,98], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2e6460f6c8b0f6a0ae0732a5a0a15c45":[0,1,0,2,39], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2ff6b6d552739a604c1c9c19968dafb4":[0,1,0,2,18], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a30c0625de66788948965e8e6b1d6ff1c":[0,1,0,2,83], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a30c0625de66788948965e8e6b1d6ff1c":[0,1,0,2,82], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a328753b743f89bbdf4123c462d63ba0c":[0,1,0,2,15], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a38b1b3d5e9e9a3cd6a679380dc4f9b61":[0,1,0,2,112], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a38c76390b1d1c0a5cf1fe8df3f27fb57":[0,1,0,2,125], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3ea1bf8ef47090b926d8738d18306de7":[0,1,0,2,140], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3fb561fbaba6ab77da1d69e531eac7d5":[0,1,0,2,66], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3516dd7938db6a28e1d5668a9c4aca25":[0,1,0,2,97], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a38c76390b1d1c0a5cf1fe8df3f27fb57":[0,1,0,2,124], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3ea1bf8ef47090b926d8738d18306de7":[0,1,0,2,139], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3fb561fbaba6ab77da1d69e531eac7d5":[0,1,0,2,65], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a40430cd5a36ba2b612adc095952d50a9":[0,1,0,2,3], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a421dd82c2f3762ff97fb4d0d646c1565":[0,1,0,2,89], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a421dd82c2f3762ff97fb4d0d646c1565":[0,1,0,2,88], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a43b05a41af87606941c4dff097a5f7b9":[0,1,0,2,28], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a43e3e9beeb7ca80989d361c917491e1e":[0,1,0,2,19], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a45b1dc5e371bf956e045d40f19b2470c":[0,1,0,2,40], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a47aa1e9e08042a9c2bc4c5a0773fdf53":[0,1,0,2,92], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a48e4c785bbae026d24044736fd6913c2":[0,1,0,2,99], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a498d36eb5344aa9689b514adeb57aefd":[0,1,0,2,76], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a47aa1e9e08042a9c2bc4c5a0773fdf53":[0,1,0,2,91], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a48e4c785bbae026d24044736fd6913c2":[0,1,0,2,98], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a498d36eb5344aa9689b514adeb57aefd":[0,1,0,2,75], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4b959a2df6058dc1539d8f4f745b01ec":[0,1,0,2,27], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4c165609255c0fe51ba8af7684890d1e":[0,1,0,2,132], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4c165609255c0fe51ba8af7684890d1e":[0,1,0,2,131], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4c3349dba0cee6135e099e042936adac":[0,1,0,2,44], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4c6c17a2eeafae316e104bf5722337fa":[0,1,0,2,155], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4ce5f8dd96c5a12646610da8e40de705":[0,1,0,2,143], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4dd6948c9064a446dc45cf6f4d463975":[0,1,0,2,60], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4f3cf2cc2726db4de8edd19ef660f52b":[0,1,0,2,95], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a524be3f8fa4165f983647ed8ebbb9f01":[0,1,0,2,152], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4c6c17a2eeafae316e104bf5722337fa":[0,1,0,2,154], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4ce5f8dd96c5a12646610da8e40de705":[0,1,0,2,142], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4d163cf837717e6f1bac43c1a492f456":[0,1,0,2,111], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4dd6948c9064a446dc45cf6f4d463975":[0,1,0,2,59], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4f3cf2cc2726db4de8edd19ef660f52b":[0,1,0,2,94], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a524be3f8fa4165f983647ed8ebbb9f01":[0,1,0,2,151], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5612c2c74fb6784c5f1794259573bd64":[0,1,0,2,14], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a58808da4cf7e64ffb1bcb5be20f977e3":[0,1,0,2,29], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a58cf39050c85f0c1450d16c1fb87ebab":[0,1,0,2,35], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a592905dcf5bb27083ec0a84f1ab29508":[0,1,0,2,142], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5b5df9be580baa41acf1e32b177ca2f7":[0,1,0,2,82], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5be32556e7bb7fd48b1bdb71d75fe5bb":[0,1,0,2,59], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a592905dcf5bb27083ec0a84f1ab29508":[0,1,0,2,141], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5b5df9be580baa41acf1e32b177ca2f7":[0,1,0,2,81], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5be32556e7bb7fd48b1bdb71d75fe5bb":[0,1,0,2,58], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5d1ca0fcb615508f88c56b6d7a987419":[0,1,0,2,22], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a60f89c589e7bde18fcb7dfcdd62160ef":[0,1,0,2,79], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a60f89c589e7bde18fcb7dfcdd62160ef":[0,1,0,2,78], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6228949e87b0a9e14fe6886fc346e28c":[0,1,0,2,53], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6291f96c056104b3b3c7a7a2ea0a7f13":[0,1,0,2,62], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6291f96c056104b3b3c7a7a2ea0a7f13":[0,1,0,2,61], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6498ebb631852d55d7585ef179b3008e":[0,1,0,2,54], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a656859e8b2ce968ed39db6e966c2338f":[0,1,0,2,96], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a65d00673a1f7d24ba66b6730593da402":[0,1,0,2,90], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a656859e8b2ce968ed39db6e966c2338f":[0,1,0,2,95], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a65d00673a1f7d24ba66b6730593da402":[0,1,0,2,89], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a66833aede8ecc336b85129ca1e8b8b2e":[0,1,0,2,33], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6aacd1083b5929ad28f227d20a412b4e":[0,1,0,2,105], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6aacd1083b5929ad28f227d20a412b4e":[0,1,0,2,104], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6cd894c71733fbdc58ea828ad035976f":[0,1,0,2,1], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6f5682b33a0230cf3a068290df144831":[0,1,0,2,72], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6ffa9eb4970b25948f6e971d8af7208e":[0,1,0,2,126], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6f5682b33a0230cf3a068290df144831":[0,1,0,2,71], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6ffa9eb4970b25948f6e971d8af7208e":[0,1,0,2,125], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7089dc9d4bfda5791d6f95388a877c8b":[0,1,0,2,20], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a798b58891191750906359b1f097bca05":[0,1,0,2,123], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7b24f3b0faf05f17c28e06b4981b55dd":[0,1,0,2,56], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7b99884ba28c9b21c1ff40bb54ca20f5":[0,1,0,2,141], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7bc87ceb8b4772c3e407ce79883bc368":[0,1,0,2,80], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7be1a9429e5200afb286bbc3b4e4ba13":[0,1,0,2,110], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a798b58891191750906359b1f097bca05":[0,1,0,2,122], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7b99884ba28c9b21c1ff40bb54ca20f5":[0,1,0,2,140], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7bc87ceb8b4772c3e407ce79883bc368":[0,1,0,2,79], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7be1a9429e5200afb286bbc3b4e4ba13":[0,1,0,2,109], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7d14e3cc08441dc6b3bd64f0ca0a13ba":[0,1,0,2,16], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a805dff5f277ea3b3536a553818fb917a":[0,1,0,2,5], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8366981bc5ecb9b4d52af74865e16bb6":[0,1,0,2,139], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8366981bc5ecb9b4d52af74865e16bb6":[0,1,0,2,138], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a88faa4c78d1652d9eecea6a9583d4f77":[0,1,0,2,49], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8baaf5567ede31aa84237b45e9a2ec5f":[0,1,0,2,85], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8c25ecae06f5de662111c25a57501ad8":[0,1,0,2,121], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8ced8ed7909fe1536bdef83de1922d42":[0,1,0,2,129], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8d05784b3300be188775cf2ec9958dc6":[0,1,0,2,154], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8baaf5567ede31aa84237b45e9a2ec5f":[0,1,0,2,84], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8c25ecae06f5de662111c25a57501ad8":[0,1,0,2,120], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8ced8ed7909fe1536bdef83de1922d42":[0,1,0,2,128], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8d05784b3300be188775cf2ec9958dc6":[0,1,0,2,153], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8e088ff367970d2e1bab67ff21f3c4ba":[0,1,0,2,52], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9206c89aa6ac5f56a2d462df9659ded2":[0,1,0,2,102], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9206c89aa6ac5f56a2d462df9659ded2":[0,1,0,2,101], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a92f46b65366a865118933f37c589d34e":[0,1,0,2,41], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a93aa5868249076c8b0766369cbbba993":[0,1,0,2,47], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9494db3e1dfa2a390f133a9a8b5aa8e0":[0,1,0,2,30], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a950d9144e4f19333c602cfff78810d1b":[0,1,0,2,146], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a966d675b83b69bd16b7f9058638b69c7":[0,1,0,2,75], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a97acfbb75ee033066beb784570ad4a04":[0,1,0,2,149], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a97f84ddeb2d9220d871138f0bc99fa18":[0,1,0,2,134], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a992c19b9aa26099d7d1954fe77107b0d":[0,1,0,2,148], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9a8ec34d0a51fbf43a5318f67fc5d278":[0,1,0,2,61], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9aefdb1b586dd2b8b2102af7541be392":[0,1,0,2,107], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9b49da771d85d8326615e8b023dec3b8":[0,1,0,2,86], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a950d9144e4f19333c602cfff78810d1b":[0,1,0,2,145], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a966d675b83b69bd16b7f9058638b69c7":[0,1,0,2,74], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a97acfbb75ee033066beb784570ad4a04":[0,1,0,2,148], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a97f84ddeb2d9220d871138f0bc99fa18":[0,1,0,2,133], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a992c19b9aa26099d7d1954fe77107b0d":[0,1,0,2,147], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9a8ec34d0a51fbf43a5318f67fc5d278":[0,1,0,2,60], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9aefdb1b586dd2b8b2102af7541be392":[0,1,0,2,106], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9b49da771d85d8326615e8b023dec3b8":[0,1,0,2,85], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9d1748ca9db1665902c25c32a2b458d6":[0,1,0,2,38], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9fad9ac24a10e083b2c5ee7cb168eea4":[0,1,0,2,13], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aa00bfb7065e72ad3b287eb78c414bd8d":[0,1,0,2,138], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aa00bfb7065e72ad3b287eb78c414bd8d":[0,1,0,2,137], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aa2fc9281fb07384c291232a0c940321b":[0,1,0,2,11], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aad6c90116002d10659c14c064bfa9aaa":[0,1,0,2,93], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aae78c1f217a4b785186bd211bde20da8":[0,1,0,2,127], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aaf42cb87b55f8b75effc9a052bb58dc1":[0,1,0,2,104], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab0d109b9d28587ba6cce93783a348d86":[0,1,0,2,58], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab13ca7a0bef674739095466ff66f9843":[0,1,0,2,147], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab44b2f7085319835ec99afa02f751bd4":[0,1,0,2,137], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab7016831f7a1331681cd712690d64bc7":[0,1,0,2,87], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab83b1dd02818a29abd3ad0cd4697a470":[0,1,0,2,111], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aad6c90116002d10659c14c064bfa9aaa":[0,1,0,2,92], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aae78c1f217a4b785186bd211bde20da8":[0,1,0,2,126], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aaf42cb87b55f8b75effc9a052bb58dc1":[0,1,0,2,103], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab0d109b9d28587ba6cce93783a348d86":[0,1,0,2,57], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab13ca7a0bef674739095466ff66f9843":[0,1,0,2,146], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab44b2f7085319835ec99afa02f751bd4":[0,1,0,2,136], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab7016831f7a1331681cd712690d64bc7":[0,1,0,2,86], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab83b1dd02818a29abd3ad0cd4697a470":[0,1,0,2,110], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab87a69ec67fe4d42df3cb0084c99dc85":[0,1,0,2,32], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#abab2d506aa44fb0e53561f38b69c35ef":[0,1,0,2,153], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#abab2d506aa44fb0e53561f38b69c35ef":[0,1,0,2,152], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#abbcf6dbd38c9ded33c7b55d5fadf7e24":[0,1,0,2,42], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#abd6be1c541190358a512f0021ea82b16":[0,1,0,2,34], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#abe7b5a4015101375080492cc8e691d1d":[0,1,0,2,131], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#abe7b5a4015101375080492cc8e691d1d":[0,1,0,2,130], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#abf4234bd8f1f12b2c674205f1a02bd9f":[0,1,0,2,36], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac1fd31d8615b5b189349471a7ca23cee":[0,1,0,2,100], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac6eb4038a1823315b2aa509f7c05c132":[0,1,0,2,114], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac9ba65a2697010e37db0eadc024e8635":[0,1,0,2,106], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acad81499ea14286cb3f598ee56a7930e":[0,1,0,2,70], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acb901a2db0ca1e0bfa37a2135552290f":[0,1,0,2,63], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ace8a12f90790e0699523d9fe3dae6114":[0,1,0,2,84], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acf87cda48d91ff766adba418a86946a0":[0,1,0,2,136], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac1fd31d8615b5b189349471a7ca23cee":[0,1,0,2,99], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac6eb4038a1823315b2aa509f7c05c132":[0,1,0,2,113], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac9ba65a2697010e37db0eadc024e8635":[0,1,0,2,105], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acad81499ea14286cb3f598ee56a7930e":[0,1,0,2,69], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acb901a2db0ca1e0bfa37a2135552290f":[0,1,0,2,62], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ace8a12f90790e0699523d9fe3dae6114":[0,1,0,2,83], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acf87cda48d91ff766adba418a86946a0":[0,1,0,2,135], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acfddae56ef5e91b7394b6f4c91748698":[0,1,0,2,2], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad1816124976f0e4697006bfc2b6378d7":[0,1,0,2,0], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad518c9841fbf8ff0bd686774bb0babeb":[0,1,0,2,120], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad642a4b775008c980bffe4ad2b451691":[0,1,0,2,73], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad518c9841fbf8ff0bd686774bb0babeb":[0,1,0,2,119], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad642a4b775008c980bffe4ad2b451691":[0,1,0,2,72], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad964cdf59c0f6c54e92cd652f2ea8a02":[0,1,0,2,93], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ada7cc9156da44d1e34fd0e0ca42032ec":[0,1,0,2,6], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adaab88b7b51f2a19bd8a12403766be0a":[0,1,0,2,67], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adaab88b7b51f2a19bd8a12403766be0a":[0,1,0,2,66], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adabf97eae5508fe69a5298c9ce6b627d":[0,1,0,2,7], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adb0de3bf29017af8e7337f908d420e85":[0,1,0,2,12], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adcb3937d2bb619a2f22c8808f77be963":[0,1,0,2,51], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adfa5ba77a6812001d674883bb7b751dd":[0,1,0,2,116], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adfa5ba77a6812001d674883bb7b751dd":[0,1,0,2,115], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adfa5eae64e455cccd9932e083fc17026":[0,1,0,2,48], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae188dfb96e7d00229f619b3a82188391":[0,1,0,2,50], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae1e239d860d7e7c0bf6722b2192f4306":[0,1,0,2,122], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae2e96333bb9b3ab2d694c93bcf8a8ab6":[0,1,0,2,130], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae1e239d860d7e7c0bf6722b2192f4306":[0,1,0,2,121], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae2e96333bb9b3ab2d694c93bcf8a8ab6":[0,1,0,2,129], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae47b27b3bfb2d9fa200b02f449c126e7":[0,1,0,2,55], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae8e22bda2a1cd6093087143eb7ac1953":[0,1,0,2,133], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae8e22bda2a1cd6093087143eb7ac1953":[0,1,0,2,132], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aeada2d6cff883f8cbd1924f1d9729250":[0,1,0,2,31], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aeb4f46dc88633a2d367cda3aaa650e1e":[0,1,0,2,144], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aed50b0789d65ce89402dcf00e186f261":[0,1,0,2,91], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aeb4f46dc88633a2d367cda3aaa650e1e":[0,1,0,2,143], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aed50b0789d65ce89402dcf00e186f261":[0,1,0,2,90], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af48766525e3a1c8f88471a9338ae59e7":[0,1,0,2,17], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af4c6c80adb48bffce8c0c2b4119a4002":[0,1,0,2,88], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7875f3465315841ea962205c98a39d6":[0,1,0,2,118], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7cb383070a38db2f4015b982371ca1b":[0,1,0,2,101], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7e3a49a86646f3b69a3d387aa4116bb":[0,1,0,2,145], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afa72e4268acf4beee9e0297e7efa9f3f":[0,1,0,2,150], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afaaa9405b30312279aa8977c015ef1fa":[0,1,0,2,97], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af4c6c80adb48bffce8c0c2b4119a4002":[0,1,0,2,87], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7875f3465315841ea962205c98a39d6":[0,1,0,2,117], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7cb383070a38db2f4015b982371ca1b":[0,1,0,2,100], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7e3a49a86646f3b69a3d387aa4116bb":[0,1,0,2,144], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afa72e4268acf4beee9e0297e7efa9f3f":[0,1,0,2,149], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afaaa9405b30312279aa8977c015ef1fa":[0,1,0,2,96], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afae0368728a114f8b4ce82148e4489dd":[0,1,0,2,45], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afdb445887173a3e006e72772cfffffbc":[0,1,0,2,10], "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afe3a45430ecf9ad29bc15baa377464f7":[0,1,0,2,37], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afe423982c31b15f80905df718709856a":[0,1,0,2,68], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afeaeb2e47f164b9ffd545c3dee232ab4":[0,1,0,2,78], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afe423982c31b15f80905df718709856a":[0,1,0,2,67], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afeaeb2e47f164b9ffd545c3dee232ab4":[0,1,0,2,77], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html":[0,1,0,3], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a022e94245068b1c395e13272d8bc4984":[0,1,0,3,67], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a035e8d807028affb949365cac3c000c1":[0,1,0,3,19], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a09d3b482c400b93d31010c2f33f794f4":[0,1,0,3,41], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a0c937b0ca36a6489bbc6630db5df0cf5":[0,1,0,3,114], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a0c937b0ca36a6489bbc6630db5df0cf5":[0,1,0,3,117], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1383d59c91539e205ef2ade35d1dafcb":[0,1,0,3,18], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a18359d1914ead9e3f6ddfa77ea99bab3":[0,1,0,3,3], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a190bf9a0838f05780f727a5a90883813":[0,1,0,3,63], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a199a281ca182a40a40331fa29e45828a":[0,1,0,3,9], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1d253986a351e263db95bb63c51775c3":[0,1,0,3,71], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1e105e4b89ba5652f46bb91e49c817eb":[0,1,0,3,90], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1eb66c309a71c8e942f8bc0b518c84ed":[0,1,0,3,104], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1e105e4b89ba5652f46bb91e49c817eb":[0,1,0,3,93], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1eb66c309a71c8e942f8bc0b518c84ed":[0,1,0,3,107], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a20666add7b3f75937954a038c51f5b55":[0,1,0,3,51], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a20a5b2ac403015cf48bc09b6f1f26408":[0,1,0,3,120], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a22b033ac5c8d3f09e96b814355fea17a":[0,1,0,3,98], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2453a1be52f39c3fa9bab2603f1f4773":[0,1,0,3,81], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a20a5b2ac403015cf48bc09b6f1f26408":[0,1,0,3,123], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a22b033ac5c8d3f09e96b814355fea17a":[0,1,0,3,101], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2453a1be52f39c3fa9bab2603f1f4773":[0,1,0,3,84], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a294f3c4467883beffdc0d6bea67e1741":[0,1,0,3,29], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a29c095f39a79b5fe0782a6ee22d597ff":[0,1,0,3,36], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2a1e5337a20e3f1dad1d1dfbb89fbb1b":[0,1,0,3,127], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2a1e5337a20e3f1dad1d1dfbb89fbb1b":[0,1,0,3,130], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2b676207cf17711c6957d74b5b2fc5dc":[0,1,0,3,17], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2d7cffd628c745f2e7614ffab48f4346":[0,1,0,3,45], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2ecbf452d80ce4914271469183e2e31c":[0,1,0,3,31], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2f0c1a7b9127c6248b03b296257e8833":[0,1,0,3,69], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2f6825fbb587362e1ed38f03e3b97d86":[0,1,0,3,10], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a30af017ff0f7101ed71d9b43e56031ca":[0,1,0,3,5], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a314e2615fb2851cf695a7b3adacef3e8":[0,1,0,3,139], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a314e2615fb2851cf695a7b3adacef3e8":[0,1,0,3,142], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a32f908e88bbb1c5070b5e011f2955c07":[0,1,0,3,28], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34453683f5cc03bd4169ea004cd7e725":[0,1,0,3,108], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34453683f5cc03bd4169ea004cd7e725":[0,1,0,3,111], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34492b32e18b9fbfd3ba01ba8ad85eb5":[0,1,0,3,54], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34ae139e68f31b69fa73c9a84c2197e8":[0,1,0,3,84], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34ae139e68f31b69fa73c9a84c2197e8":[0,1,0,3,87], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a362f36a540212a3005f56ebf2d3b68b8":[0,1,0,3,12], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a36470f1359566ee071015a630deb89cd":[0,1,0,3,73], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a37c30fea3191a0275918448626e043c4":[0,1,0,3,42], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a380ec35a9c68ed3384489d17a385551a":[0,1,0,3,140], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a380ec35a9c68ed3384489d17a385551a":[0,1,0,3,143], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3836bfe0a9610b9037a73ea727246e71":[0,1,0,3,57], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3a37a4c72e59e5b6e5db518f4a88e7ff":[0,1,0,3,83], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3a37a4c72e59e5b6e5db518f4a88e7ff":[0,1,0,3,86], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3a441ca48ae4cff29a4f715314fcb0c9":[0,1,0,3,37], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3c5c3eba48b2417a66663739a128e05a":[0,1,0,3,105], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3e46711f25455021caa5de67ef374f55":[0,1,0,3,106], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3c5c3eba48b2417a66663739a128e05a":[0,1,0,3,108], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3e46711f25455021caa5de67ef374f55":[0,1,0,3,109], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3ef901c89d40124058a0df268b4f8101":[0,1,0,3,47], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a407af2b73f564d5db79381b5b2699c97":[0,1,0,3,52], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a430f1ba9b0f5fe9f3b74678f63025384":[0,1,0,3,60], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a431541d09a66c744e0df775d2ccd3acd":[0,1,0,3,102], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a43af5eef62e0e958d160b77fa1d6c099":[0,1,0,3,56], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a481001b393776c233ccdc069916d2d7c":[0,1,0,3,80], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a491e418920668f8fce331c65e8b48a02":[0,1,0,3,115], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a431541d09a66c744e0df775d2ccd3acd":[0,1,0,3,105], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a481001b393776c233ccdc069916d2d7c":[0,1,0,3,83], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a491e418920668f8fce331c65e8b48a02":[0,1,0,3,118], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4b9e335b7f968d36d9cd6bdfc34bba34":[0,1,0,3,55], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4bf65c93bea904102b63553f3e5dd1b3":[0,1,0,3,79], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4f2304d508e3d9645581004c676d94ca":[0,1,0,3,122], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a502fd875dc95e68f905fe2070abaeff8":[0,1,0,3,118], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4bf65c93bea904102b63553f3e5dd1b3":[0,1,0,3,82], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4f2304d508e3d9645581004c676d94ca":[0,1,0,3,125], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a502fd875dc95e68f905fe2070abaeff8":[0,1,0,3,121], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a50cbee5029c7f2bc22d697b7cd09f0cf":[0,1,0,3,21], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a50ccadf68055ea9e26439ccaed0d68f7":[0,1,0,3,59], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a522261006f1cc94869ef15cd26b739da":[0,1,0,3,82], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a52c4e7589ecefee4dbbff1286344499e":[0,1,0,3,130], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a52cb50316afdcb5899663c98aa47c0de":[0,1,0,3,134], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a5711fc465136219d98b57fc2c2822f24":[0,1,0,3,103], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a522261006f1cc94869ef15cd26b739da":[0,1,0,3,85], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a52c4e7589ecefee4dbbff1286344499e":[0,1,0,3,133], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a52cb50316afdcb5899663c98aa47c0de":[0,1,0,3,137], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a5711fc465136219d98b57fc2c2822f24":[0,1,0,3,106], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a578f6c60b4ca495b24e5b7ae2db448cc":[0,1,0,3,6], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a5c6520580009a4608d6ea4e221ef3d29":[0,1,0,3,38], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a5d7d3326aaa9849977f0c203078f39e4":[0,1,0,3,87], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a5fc56969d513e56e2478a64f98af7ca8":[0,1,0,3,125], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6131bec61397f01d9739e694c57afdbf":[0,1,0,3,85], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6145c59148d531ca06c5d6f218e21b02":[0,1,0,3,74], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a629e1fff799f15735376832d9ed176a2":[0,1,0,3,137], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a5d7d3326aaa9849977f0c203078f39e4":[0,1,0,3,90], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a5fc56969d513e56e2478a64f98af7ca8":[0,1,0,3,128], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6131bec61397f01d9739e694c57afdbf":[0,1,0,3,88], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6145c59148d531ca06c5d6f218e21b02":[0,1,0,3,77], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a629e1fff799f15735376832d9ed176a2":[0,1,0,3,140], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6355225bc6f8a723100111beb2af4b7f":[0,1,0,3,14], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a661794563709a984308164abcdd543ee":[0,1,0,3,128], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6b6f336bd93b1a3053428a92cf0fc909":[0,1,0,3,121], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a661794563709a984308164abcdd543ee":[0,1,0,3,131], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6b6f336bd93b1a3053428a92cf0fc909":[0,1,0,3,124], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6c0ac0823d48779ad3c84ee0bedf1e23":[0,1,0,3,40], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6d260fcee2ad4a83b36fc26adad5934d":[0,1,0,3,46], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6d73d64a97cc8f024e1ee3367bfd119d":[0,1,0,3,61], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6e7b32701d8bf69f1ba8995e4bf50ad3":[0,1,0,3,119], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6e7b32701d8bf69f1ba8995e4bf50ad3":[0,1,0,3,122], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a73d001ad3c271c56d89e09e2cebfceb3":[0,1,0,3,0], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7559257a5ad55a48d1221522838c5daf":[0,1,0,3,30], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a789dae2310c3496443a8a51c26cc8b71":[0,1,0,3,95], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7b4903b21fc0872bcb8e68fe0a2efb1a":[0,1,0,3,73], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a78481115d7590930ac4d58d0bdaa2acc":[0,1,0,3,74], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a789dae2310c3496443a8a51c26cc8b71":[0,1,0,3,98], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7b4903b21fc0872bcb8e68fe0a2efb1a":[0,1,0,3,76], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7c72df642a0d00144470a946f65eb5bc":[0,1,0,3,25], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7cb14cb8ebe04982bb17999fa1a2c479":[0,1,0,3,34], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7dad6de0caa4a6f50a54db2a87edda5e":[0,1,0,3,77], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a821839be74f3cc975dff8a9c76ed54ad":[0,1,0,3,101], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8229d44e2e83410c2e28319a64e24f75":[0,1,0,3,112], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7dad6de0caa4a6f50a54db2a87edda5e":[0,1,0,3,80], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a821839be74f3cc975dff8a9c76ed54ad":[0,1,0,3,104], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8229d44e2e83410c2e28319a64e24f75":[0,1,0,3,115], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a84d8220dfbff2afda5d207b6d29f61f8":[0,1,0,3,1], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a856bffb7c4dd44eed5f371fc25f5c349":[0,1,0,3,11], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8b8b75dcd53ae8e3a641f18cb00bee1d":[0,1,0,3,94], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8b912ad6d9a4f6d8e4c1bb16f2c95fbf":[0,1,0,3,86], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8cefcce52cd721b3869701367f456a71":[0,1,0,3,72], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8eb67dab884cc678e541ff5cc77b5e03":[0,1,0,3,117], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8ed7dc66684dd077c0aa2260e0e0afb4":[0,1,0,3,110], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8b8b75dcd53ae8e3a641f18cb00bee1d":[0,1,0,3,97], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8b912ad6d9a4f6d8e4c1bb16f2c95fbf":[0,1,0,3,89], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8cefcce52cd721b3869701367f456a71":[0,1,0,3,75], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8eb67dab884cc678e541ff5cc77b5e03":[0,1,0,3,120], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8ed7dc66684dd077c0aa2260e0e0afb4":[0,1,0,3,113], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a913c33933a32feca0f0389cee637a293":[0,1,0,3,15], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a91fdec443327720111f0b8ecad783c87":[0,1,0,3,76], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a91fdec443327720111f0b8ecad783c87":[0,1,0,3,79], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a92bfb8a4daec705014f8e871fb0feacb":[0,1,0,3,49], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a93592e117e3283a0b2e0a5aa647bc155":[0,1,0,3,75], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a936ed1973fb19388fd20fa09f0f9d8bb":[0,1,0,3,99], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a946c6fc559c23573210285ed47e28570":[0,1,0,3,116], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a96932dfa1cc61d6eeb2d650e707ecf20":[0,1,0,3,113], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a93592e117e3283a0b2e0a5aa647bc155":[0,1,0,3,78], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a936ed1973fb19388fd20fa09f0f9d8bb":[0,1,0,3,102], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a946c6fc559c23573210285ed47e28570":[0,1,0,3,119], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a96932dfa1cc61d6eeb2d650e707ecf20":[0,1,0,3,116], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a96ee5727c24f572b7b25cd2c39b9b776":[0,1,0,3,64], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a987d2e01b76d37c69fd6e589b4d69473":[0,1,0,3,132], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a9a425d43bf21b8dddc7971e25c9e09fb":[0,1,0,3,100], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a987d2e01b76d37c69fd6e589b4d69473":[0,1,0,3,135], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a9a425d43bf21b8dddc7971e25c9e09fb":[0,1,0,3,103], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a9fd66cb8986ef84feaa63fdd0f072e45":[0,1,0,3,20], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aa017bbe95ad7539e72d182dac59f2454":[0,1,0,3,58], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aa2be06a920e2103ba838c308a2dcc57e":[0,1,0,3,136], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aa2be06a920e2103ba838c308a2dcc57e":[0,1,0,3,139], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aa526479a9b7e3f096291cebbb0806df9":[0,1,0,3,16], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aaa6dae67e44cbd29e86e10b270249bed":[0,1,0,3,48], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aac1df493cd346d7faccb17ae5440ddc4":[0,1,0,3,26], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aad0e75ceecc2e0802555fcd92cb7d437":[0,1,0,3,50], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aaf72cbf7288677fa045647df13322804":[0,1,0,3,78], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aaf72cbf7288677fa045647df13322804":[0,1,0,3,81], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#abb107f782ba7985c00ac77dc77acd35c":[0,1,0,3,33], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#abcf0d5623d10f929b40dd3fc0e8ad00a":[0,1,0,3,44], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#abe4fe9f14753f16e3b1014cdb4e9f846":[0,1,0,3,23], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac03f9380fcd4421f95e56f37f0cd00c7":[0,1,0,3,32], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac1af60c6e410db30d87cecefd7cc7160":[0,1,0,3,107], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac2029b16365753e1e337f82cda0e3350":[0,1,0,3,135], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac22dee1d346345a9c9583029c5c1f285":[0,1,0,3,111], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac53419e9abc2d2f9b12acf10507e7954":[0,1,0,3,89], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac5bd9ecbc1c392116871b5adaeb815a8":[0,1,0,3,129], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac1af60c6e410db30d87cecefd7cc7160":[0,1,0,3,110], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac2029b16365753e1e337f82cda0e3350":[0,1,0,3,138], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac22dee1d346345a9c9583029c5c1f285":[0,1,0,3,114], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac53419e9abc2d2f9b12acf10507e7954":[0,1,0,3,92], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac5bd9ecbc1c392116871b5adaeb815a8":[0,1,0,3,132], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac87b0baf7ca05124b07a2cb0c405a165":[0,1,0,3,22], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac9afb2932937099ff2a72314c9027a07":[0,1,0,3,13], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acbb83079b063cd6b48e07030b1f5df84":[0,1,0,3,53], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acd5e0d9dafe7c14f8946e980b77410ae":[0,1,0,3,62], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acec9a90ac60967aeee0466003256855a":[0,1,0,3,131], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acec9a90ac60967aeee0466003256855a":[0,1,0,3,134], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acf8e00aaf5cd53b7be12cfeeee66c5b7":[0,1,0,3,24] }; diff --git a/html/doxygen/navtreeindex16.js b/html/doxygen/navtreeindex16.js index 6ee46356ad..70cb542b1a 100644 --- a/html/doxygen/navtreeindex16.js +++ b/html/doxygen/navtreeindex16.js @@ -1,24 +1,26 @@ var NAVTREEINDEX16 = { -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad283ce438acd2faea2bbb309251890a1":[0,1,0,3,123], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad4462dbd2b4f56b33b7cc875150ca77c":[0,1,0,3,109], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad488bc63dac24ac7e5c29a1138172ed7":[0,1,0,3,124], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad283ce438acd2faea2bbb309251890a1":[0,1,0,3,126], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad4462dbd2b4f56b33b7cc875150ca77c":[0,1,0,3,112], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad488bc63dac24ac7e5c29a1138172ed7":[0,1,0,3,127], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad4e248ac19ce527c6e64304c42364388":[0,1,0,3,39], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae02024096ab4490b8a6215b3e59e6de0":[0,1,0,3,97], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad63b4318b5abd6b8c224fab70fe61081":[0,1,0,3,56], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae02024096ab4490b8a6215b3e59e6de0":[0,1,0,3,100], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae022e99573f663fc0db935c5c1bb7199":[0,1,0,3,7], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae0d8d4e346e244c764911c0c64c2ac1c":[0,1,0,3,96], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae0d8d4e346e244c764911c0c64c2ac1c":[0,1,0,3,99], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae0e48a2461354feaaa2a3077da1d02f6":[0,1,0,3,65], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae2fa3994b15579d0752d740c279c2073":[0,1,0,3,133], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae333398890c61148ec60cb52c3d28c10":[0,1,0,3,93], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae63ddf806884e983a264346f21794168":[0,1,0,3,126], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae2fa3994b15579d0752d740c279c2073":[0,1,0,3,136], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae333398890c61148ec60cb52c3d28c10":[0,1,0,3,96], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae350ed7effbbcf8dbea050231599c8e6":[0,1,0,3,72], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae63ddf806884e983a264346f21794168":[0,1,0,3,129], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aeacff81944f23540968aa617d25e3d22":[0,1,0,3,27], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aec3cef47cc3c1e5901b4ff401ce8e725":[0,1,0,3,91], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aec3cef47cc3c1e5901b4ff401ce8e725":[0,1,0,3,94], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aee824eb01f6cf6f9187af509245ffc3a":[0,1,0,3,66], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aeeacd28215827d6b0cd23cf59e5fc0c2":[0,1,0,3,4], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aef331b9ddcbd761f3aea6b457f83e88e":[0,1,0,3,92], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aef331b9ddcbd761f3aea6b457f83e88e":[0,1,0,3,95], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af2490222aefa83d67238c605e05197a3":[0,1,0,3,70], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af3e2476ccbaa3d2502fa8e6c0e42a628":[0,1,0,3,68], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af55b2f46300b89a8458f17ab405eaa29":[0,1,0,3,138], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af55b2f46300b89a8458f17ab405eaa29":[0,1,0,3,141], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af75968756df0bb3b12307f75bf122f20":[0,1,0,3,2], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#afba5ac1d4636d7ba57ac3fd7c7b5e2ba":[0,1,0,3,8], "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#afdf8d3232526bf1978bb298755f42958":[0,1,0,3,35], @@ -75,66 +77,68 @@ var NAVTREEINDEX16 = "classnmodl_1_1codegen_1_1_codegen_helper_visitor.html#af20451367756d95c85cd561cde6fe755":[0,1,1,2,29], "classnmodl_1_1codegen_1_1_codegen_helper_visitor.html#af27eb43d5a4f76227692de56333b6c08":[0,1,1,2,19], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html":[0,1,0,4], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a0195ec229853e6a5568228b868829942":[0,1,0,4,44], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a05f014fb5be8b7dd4b747bcc5d861ae3":[0,1,0,4,33], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a085966219db2e0b51d168738421df098":[0,1,0,4,49], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a111784a1f5c4ef8a2c04edb714cca60f":[0,1,0,4,48], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a13af4fa40fc5b97bfcf91d199fe6a8e2":[0,1,0,4,57], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a0195ec229853e6a5568228b868829942":[0,1,0,4,46], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a05f014fb5be8b7dd4b747bcc5d861ae3":[0,1,0,4,32], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a085966219db2e0b51d168738421df098":[0,1,0,4,51], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a111784a1f5c4ef8a2c04edb714cca60f":[0,1,0,4,50], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a13af4fa40fc5b97bfcf91d199fe6a8e2":[0,1,0,4,59], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a14b770116ea7a9580c6d82d7a2bb1bc1":[0,1,0,4,3], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a1d7cd0325d3658024daba8fe2d2cb804":[0,1,0,4,34], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a24c55a8420d179cbbd7bc6968f3c12e3":[0,1,0,4,52], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a1d7cd0325d3658024daba8fe2d2cb804":[0,1,0,4,33], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a24c55a8420d179cbbd7bc6968f3c12e3":[0,1,0,4,54], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3529a162774aca01dbc18b604acfe00c":[0,1,0,4,16], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3af0b90beeeec4a0e17e84a11a76ecbc":[0,1,0,4,7], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3e4bdc70a4d2eb6169d656c1ec9c9fe1":[0,1,0,4,6], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3ef1a3189051f86fce9602c7b02b445a":[0,1,0,4,22], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a403636272eebe18cf3f25759c06ec00a":[0,1,0,4,61], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a480879d1374101ede3c9542951433543":[0,1,0,4,46], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a50026c205b223b41ffe682526735873c":[0,1,0,4,58], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a5429cb9990f7cbe91dc33522da5ad76d":[0,1,0,4,47], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a5e99f3edec8e7e1f852cac39b1b7314e":[0,1,0,4,30], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a62669c86daa6bdd6c1e67e93461ad747":[0,1,0,4,41], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a403636272eebe18cf3f25759c06ec00a":[0,1,0,4,63], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a480879d1374101ede3c9542951433543":[0,1,0,4,48], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a50026c205b223b41ffe682526735873c":[0,1,0,4,60], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a5429cb9990f7cbe91dc33522da5ad76d":[0,1,0,4,49], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a5e99f3edec8e7e1f852cac39b1b7314e":[0,1,0,4,29], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a62669c86daa6bdd6c1e67e93461ad747":[0,1,0,4,43], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a68499754b87764b2eba30bf38a1edbb4":[0,1,0,4,10], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a6abde0bb8aa4c6bd11cd15303295e9f9":[0,1,0,4,38], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a6abde0bb8aa4c6bd11cd15303295e9f9":[0,1,0,4,37], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a6e501a98cc559afd172f898fa0d7cef7":[0,1,0,4,4], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a75551174c0c66124b0096de40ca20cbf":[0,1,0,4,55], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a76894f40f5ef1531c1b3c884f93eda42":[0,1,0,4,28], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a76f144fae532604ab1a1065d9c645211":[0,1,0,4,42], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a77ac6349ba709a4ef7ecd6a4c34b9e0c":[0,1,0,4,59], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a7f941bd8151d12ef887be3670dec264e":[0,1,0,4,26], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a75551174c0c66124b0096de40ca20cbf":[0,1,0,4,57], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a76894f40f5ef1531c1b3c884f93eda42":[0,1,0,4,27], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a76f144fae532604ab1a1065d9c645211":[0,1,0,4,44], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a77ac6349ba709a4ef7ecd6a4c34b9e0c":[0,1,0,4,61], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a7f941bd8151d12ef887be3670dec264e":[0,1,0,4,25], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a8633f24f67f430477ff3bf4a0c6b36cb":[0,1,0,4,21], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a89c5a0f046f8752579636a3db97d669a":[0,1,0,4,2], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a8c348f1869653cec3dcc39b1866bab97":[0,1,0,4,14], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a8dc54bf1b8cfca4663fffa7fb5444975":[0,1,0,4,1], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a910f9f22e6fbdae4eefae177eb8910f9":[0,1,0,4,15], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a94f4993226aa53f6095ad4a44fe47420":[0,1,0,4,18], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a96edb3ade58fc8c569ac0c73a54fd091":[0,1,0,4,43], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9749309d724cd1f4a47989c9d76c92c3":[0,1,0,4,39], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9b04c504442be8eaffd17f52376b265a":[0,1,0,4,54], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a96edb3ade58fc8c569ac0c73a54fd091":[0,1,0,4,45], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9749309d724cd1f4a47989c9d76c92c3":[0,1,0,4,38], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9b04c504442be8eaffd17f52376b265a":[0,1,0,4,56], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9f9d3aebd2dc5bbc05e0cb7e9a707c7f":[0,1,0,4,17], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa02a628bedfd1b7cbd65b32e8f2042e5":[0,1,0,4,29], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa02a628bedfd1b7cbd65b32e8f2042e5":[0,1,0,4,28], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa08a55bc62e18a9c545e8903dd3b1530":[0,1,0,4,12], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa40457fee0fa38359bb1ef9487efd00e":[0,1,0,4,40], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa7665c8b7c92f51b6fbccfa74b97a706":[0,1,0,4,31], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aac802efa00966f667ff0554bc1e9af1d":[0,1,0,4,32], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aaea5e3201bfb4a18f919f8e60db23d49":[0,1,0,4,56], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aaf5e58f5a33a545e01d5720d6812fa4f":[0,1,0,4,60], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab501ff577dc0c959112378c70a9bb125":[0,1,0,4,36], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab5ead6dc1ad6f664019b6713d3238622":[0,1,0,4,53], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab72208bf9821d213a933f4b3f5579d20":[0,1,0,4,37], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa40457fee0fa38359bb1ef9487efd00e":[0,1,0,4,39], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa7665c8b7c92f51b6fbccfa74b97a706":[0,1,0,4,30], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aac802efa00966f667ff0554bc1e9af1d":[0,1,0,4,31], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aaea5e3201bfb4a18f919f8e60db23d49":[0,1,0,4,58], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aaf5e58f5a33a545e01d5720d6812fa4f":[0,1,0,4,62], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab501ff577dc0c959112378c70a9bb125":[0,1,0,4,35], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab5ead6dc1ad6f664019b6713d3238622":[0,1,0,4,55], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab72208bf9821d213a933f4b3f5579d20":[0,1,0,4,36], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#abce8ff7e8bd0754c8d61066779b4e72f":[0,1,0,4,20], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#abd73fe57cf5edd770a7e775f130fc723":[0,1,0,4,35], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#acaa8d4797838b7efc6b4d6d031c2a231":[0,1,0,4,27], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#acc60913cbeb34f75a125224f6a3a79bd":[0,1,0,4,51], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#abd73fe57cf5edd770a7e775f130fc723":[0,1,0,4,34], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#acaa8d4797838b7efc6b4d6d031c2a231":[0,1,0,4,26], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#acc60913cbeb34f75a125224f6a3a79bd":[0,1,0,4,53], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#acfd3c1256b1d34de5fef97cff079cb8a":[0,1,0,4,5], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad4ac4cce1ce357ab264dde505128f5e5":[0,1,0,4,50], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad4ac4cce1ce357ab264dde505128f5e5":[0,1,0,4,52], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad5b66ea20129a4cf098f744a8d449893":[0,1,0,4,8], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad635ed74eba5b2c3e0aee2e29ca1167a":[0,1,0,4,24], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ae8c6eae53160557133e32fb9cef1f153":[0,1,0,4,45], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad635ed74eba5b2c3e0aee2e29ca1167a":[0,1,0,4,23], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adbf8216b0f67ec9e714bee6aa52e1e3f":[0,1,0,4,42], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adf3ecfb21886bca7be8a882e2166a919":[0,1,0,4,40], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ae8c6eae53160557133e32fb9cef1f153":[0,1,0,4,47], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aeb0635e7e6e488519882d930401b5c2b":[0,1,0,4,19], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aef77df54b474011a077b79e3b9126433":[0,1,0,4,0], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af2f331ce244ac6fa94bbc94de9163fba":[0,1,0,4,41], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af6676bc4b255a87e484bc2641d64b713":[0,1,0,4,11], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af66d9e0ce20ea0c75375aa354f9446bc":[0,1,0,4,9], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af6a5224b66dde062241120381b3cb8df":[0,1,0,4,25], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af6a5224b66dde062241120381b3cb8df":[0,1,0,4,24], "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#afdd6466ebac569ec670c3b6f4ca11d3e":[0,1,0,4,13], "classnmodl_1_1parser_1_1_c_driver.html":[0,10,0], "classnmodl_1_1parser_1_1_c_driver.html#a053c12081e3a1715b66a2ecb27bc7d93":[0,10,0,7], @@ -245,9 +249,5 @@ var NAVTREEINDEX16 = "classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#a715888f745d4f274ba5b93e70f6afb81":[2,0,0,3,0,0,9], "classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#a8c0e2e1e95d94888911b16a94c5c1421":[2,0,0,3,0,0,10], "classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#a92f7bdeedb0c276227253254a5202d51":[2,0,0,3,0,0,8], -"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#a9403ad70bd5e5db162670117fd904b3b":[2,0,0,3,0,0,5], -"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#a96f5b7ca4e6a5d550c9ed9f768a00e28":[2,0,0,3,0,0,0], -"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#ab8b24b7a7cc1c4775723b7c4f67dc650":[2,0,0,3,0,0,3], -"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#ad3bb5bd06ff94e697110d7305c153bc9":[2,0,0,3,0,0,4], -"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#ae54e71ef0da95411bf97f69e456da2d7":[2,0,0,3,0,0,2] +"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#a9403ad70bd5e5db162670117fd904b3b":[2,0,0,3,0,0,5] }; diff --git a/html/doxygen/navtreeindex17.js b/html/doxygen/navtreeindex17.js index 225792f2b1..c58651f6d5 100644 --- a/html/doxygen/navtreeindex17.js +++ b/html/doxygen/navtreeindex17.js @@ -1,5 +1,9 @@ var NAVTREEINDEX17 = { +"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#a96f5b7ca4e6a5d550c9ed9f768a00e28":[2,0,0,3,0,0,0], +"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#ab8b24b7a7cc1c4775723b7c4f67dc650":[2,0,0,3,0,0,3], +"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#ad3bb5bd06ff94e697110d7305c153bc9":[2,0,0,3,0,0,4], +"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#ae54e71ef0da95411bf97f69e456da2d7":[2,0,0,3,0,0,2], "classnmodl_1_1printer_1_1_code_printer.html":[0,3,0], "classnmodl_1_1printer_1_1_code_printer.html#a072c94bdf396471dc878e9b648c941b9":[0,3,0,9], "classnmodl_1_1printer_1_1_code_printer.html#a0d6960442321cbd19c3e8cead6453508":[0,3,0,3], @@ -245,9 +249,5 @@ var NAVTREEINDEX17 = "classnmodl_1_1utils_1_1_singleton_random_string.html#a9cf52e0f2bbcc64343ca012621c89698":[0,7,0,6], "classnmodl_1_1utils_1_1_singleton_random_string.html#aa10cbee41a847a009bcfbb2055744aad":[0,7,0,4], "classnmodl_1_1utils_1_1_singleton_random_string.html#ac3e00de497e1b0a24c7db603b6c3dcd2":[0,7,0,5], -"classnmodl_1_1utils_1_1_singleton_random_string.html#ad91a73fad7220d6abe0623f609ca504b":[0,7,0,2], -"classnmodl_1_1utils_1_1_singleton_random_string.html#addba2a0ea13aed19f405cde2f88be32a":[0,7,0,0], -"classnmodl_1_1utils_1_1_singleton_random_string.html#ade5b240627e7f47d65b1ce72be1b85be":[0,7,0,3], -"classnmodl_1_1visitor_1_1_after_c_vode_to_cnexp_visitor.html":[0,8,0,2], -"classnmodl_1_1visitor_1_1_after_c_vode_to_cnexp_visitor.html#a0402101b0b1ed4ce4b34fab1cef8e505":[0,8,0,2,1] +"classnmodl_1_1utils_1_1_singleton_random_string.html#ad91a73fad7220d6abe0623f609ca504b":[0,7,0,2] }; diff --git a/html/doxygen/navtreeindex18.js b/html/doxygen/navtreeindex18.js index 139528fa16..96b2aeb75a 100644 --- a/html/doxygen/navtreeindex18.js +++ b/html/doxygen/navtreeindex18.js @@ -1,5 +1,9 @@ var NAVTREEINDEX18 = { +"classnmodl_1_1utils_1_1_singleton_random_string.html#addba2a0ea13aed19f405cde2f88be32a":[0,7,0,0], +"classnmodl_1_1utils_1_1_singleton_random_string.html#ade5b240627e7f47d65b1ce72be1b85be":[0,7,0,3], +"classnmodl_1_1visitor_1_1_after_c_vode_to_cnexp_visitor.html":[0,8,0,2], +"classnmodl_1_1visitor_1_1_after_c_vode_to_cnexp_visitor.html#a0402101b0b1ed4ce4b34fab1cef8e505":[0,8,0,2,1], "classnmodl_1_1visitor_1_1_after_c_vode_to_cnexp_visitor.html#ae828f5954507fd77f9a7211948aad4da":[0,8,0,2,0], "classnmodl_1_1visitor_1_1_ast_visitor.html":[0,8,0,27], "classnmodl_1_1visitor_1_1_ast_visitor.html#a00fa6a48372cb567007c32b1beb900ad":[0,8,0,27,52], @@ -245,9 +249,5 @@ var NAVTREEINDEX18 = "classnmodl_1_1visitor_1_1_const_ast_visitor.html#afe9b93adca62650ceb72d8592570579b":[2,0,0,10,4,107], "classnmodl_1_1visitor_1_1_const_visitor.html":[0,8,0,33], "classnmodl_1_1visitor_1_1_const_visitor.html#a00f4d360a1345e059f1e9e09a8d4f4a6":[0,8,0,33,111], -"classnmodl_1_1visitor_1_1_const_visitor.html#a026b14614b86e31e6336bf539a413a9c":[0,8,0,33,53], -"classnmodl_1_1visitor_1_1_const_visitor.html#a029687fce54202e0ea2d68540b840643":[0,8,0,33,11], -"classnmodl_1_1visitor_1_1_const_visitor.html#a096625c78ed685a7ee6233a13b1793a3":[0,8,0,33,115], -"classnmodl_1_1visitor_1_1_const_visitor.html#a0c475478721e1f3bc8f5c6604dd18103":[0,8,0,33,52], -"classnmodl_1_1visitor_1_1_const_visitor.html#a0c8ab1148e4cd10e26fe2180a6cd935f":[0,8,0,33,106] +"classnmodl_1_1visitor_1_1_const_visitor.html#a026b14614b86e31e6336bf539a413a9c":[0,8,0,33,53] }; diff --git a/html/doxygen/navtreeindex19.js b/html/doxygen/navtreeindex19.js index 420a520ca8..d78199cbd5 100644 --- a/html/doxygen/navtreeindex19.js +++ b/html/doxygen/navtreeindex19.js @@ -1,5 +1,9 @@ var NAVTREEINDEX19 = { +"classnmodl_1_1visitor_1_1_const_visitor.html#a029687fce54202e0ea2d68540b840643":[0,8,0,33,11], +"classnmodl_1_1visitor_1_1_const_visitor.html#a096625c78ed685a7ee6233a13b1793a3":[0,8,0,33,115], +"classnmodl_1_1visitor_1_1_const_visitor.html#a0c475478721e1f3bc8f5c6604dd18103":[0,8,0,33,52], +"classnmodl_1_1visitor_1_1_const_visitor.html#a0c8ab1148e4cd10e26fe2180a6cd935f":[0,8,0,33,106], "classnmodl_1_1visitor_1_1_const_visitor.html#a106a0126cb94e18fd9f6ba1f9e8988ee":[0,8,0,33,93], "classnmodl_1_1visitor_1_1_const_visitor.html#a10bbebf400ebd90e40e72a1815b11db0":[0,8,0,33,118], "classnmodl_1_1visitor_1_1_const_visitor.html#a115405170aa9791229f7a925c013f6e5":[0,8,0,33,19], @@ -245,9 +249,5 @@ var NAVTREEINDEX19 = "classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3a3ad95b967c04572434c9eb2ba610b9":[0,8,0,28,112], "classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3a3c94ffa66b5d5fb78ea69a89080a31":[0,8,0,28,121], "classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3a5014436d619ce7e012e0b29528b7cf":[0,8,0,28,126], -"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3b2e8f00b6db5ba5966b7fe9826babd0":[0,8,0,28,20], -"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3e7505ad75b9a879598ad314f2aa1da2":[0,8,0,28,100], -"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3e961657205b5352e6010c9d5ee00201":[0,8,0,28,69], -"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3f977fcb9e5fae6e5aaf51ef25d8236b":[0,8,0,28,63], -"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a4046544d35ac45368cb4b5fec9de4c19":[0,8,0,28,92] +"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3b2e8f00b6db5ba5966b7fe9826babd0":[0,8,0,28,20] }; diff --git a/html/doxygen/navtreeindex20.js b/html/doxygen/navtreeindex20.js index 93fca6ba7c..4796030487 100644 --- a/html/doxygen/navtreeindex20.js +++ b/html/doxygen/navtreeindex20.js @@ -1,5 +1,9 @@ var NAVTREEINDEX20 = { +"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3e7505ad75b9a879598ad314f2aa1da2":[0,8,0,28,100], +"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3e961657205b5352e6010c9d5ee00201":[0,8,0,28,69], +"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3f977fcb9e5fae6e5aaf51ef25d8236b":[0,8,0,28,63], +"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a4046544d35ac45368cb4b5fec9de4c19":[0,8,0,28,92], "classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a417d049fa26aba5294f53e6ef81aa245":[0,8,0,28,11], "classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a4228855f3dae54c650c81c1661a65d04":[0,8,0,28,122], "classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a42d79f72ba101e1b7dde0113c2cd7983":[0,8,0,28,93], @@ -245,9 +249,5 @@ var NAVTREEINDEX20 = "classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#a9c23ed5c078479f661646ea97b75e60b":[0,8,0,29,76], "classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#a9f46f3155e5c4a3cc0debdbefec3f434":[0,8,0,29,13], "classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aa3139b96c280dfd5a2eec0dd862672b1":[0,8,0,29,35], -"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aa7e7d0f33025fcc27f3952a80ea707ae":[0,8,0,29,44], -"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aa83e7bb9db5343a605c09a6bec764269":[0,8,0,29,117], -"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aaa715780ab4aa9352847c5baace49daf":[0,8,0,29,23], -"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aab22f543c4a741e3171ebc072e41ddf5":[0,8,0,29,129], -"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aadda41f8464ebb8c5faaffaceebe885b":[0,8,0,29,71] +"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aa7e7d0f33025fcc27f3952a80ea707ae":[0,8,0,29,44] }; diff --git a/html/doxygen/navtreeindex21.js b/html/doxygen/navtreeindex21.js index eec8f14697..1451f85a2a 100644 --- a/html/doxygen/navtreeindex21.js +++ b/html/doxygen/navtreeindex21.js @@ -1,5 +1,9 @@ var NAVTREEINDEX21 = { +"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aa83e7bb9db5343a605c09a6bec764269":[0,8,0,29,117], +"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aaa715780ab4aa9352847c5baace49daf":[0,8,0,29,23], +"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aab22f543c4a741e3171ebc072e41ddf5":[0,8,0,29,129], +"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aadda41f8464ebb8c5faaffaceebe885b":[0,8,0,29,71], "classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#ab2a0854ec26cc75c42180ecc20f3c16a":[0,8,0,29,32], "classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#ab334ac31e8c96803afe1d502a9779e59":[0,8,0,29,64], "classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#ab45404ed37b54632b1672568298da6b4":[0,8,0,29,62], @@ -245,9 +249,5 @@ var NAVTREEINDEX21 = "classnmodl_1_1visitor_1_1_perf_visitor.html#ac519ee524ffd71064ea2766ed5e95a93":[0,8,0,15,60], "classnmodl_1_1visitor_1_1_perf_visitor.html#ac762ed62b525b2e95e2c1b6682163c61":[0,8,0,15,35], "classnmodl_1_1visitor_1_1_perf_visitor.html#ac77e12748df0f9ab47d54bf9489d9ab5":[0,8,0,15,46], -"classnmodl_1_1visitor_1_1_perf_visitor.html#aca5546916c9755f723c409f13da78d09":[0,8,0,15,1], -"classnmodl_1_1visitor_1_1_perf_visitor.html#acb93ed202cb97a7ab0ffbaf2cae621da":[0,8,0,15,36], -"classnmodl_1_1visitor_1_1_perf_visitor.html#acfcf3e4d4fccc81b0d3f7a413da7bfa6":[0,8,0,15,65], -"classnmodl_1_1visitor_1_1_perf_visitor.html#ad04231380f523e85adb5e0dce531f471":[0,8,0,15,40], -"classnmodl_1_1visitor_1_1_perf_visitor.html#ad967279d5a8892a22c26892895c37b6c":[0,8,0,15,61] +"classnmodl_1_1visitor_1_1_perf_visitor.html#aca5546916c9755f723c409f13da78d09":[0,8,0,15,1] }; diff --git a/html/doxygen/navtreeindex22.js b/html/doxygen/navtreeindex22.js index f391e370b3..25081b1c4d 100644 --- a/html/doxygen/navtreeindex22.js +++ b/html/doxygen/navtreeindex22.js @@ -1,5 +1,9 @@ var NAVTREEINDEX22 = { +"classnmodl_1_1visitor_1_1_perf_visitor.html#acb93ed202cb97a7ab0ffbaf2cae621da":[0,8,0,15,36], +"classnmodl_1_1visitor_1_1_perf_visitor.html#acfcf3e4d4fccc81b0d3f7a413da7bfa6":[0,8,0,15,65], +"classnmodl_1_1visitor_1_1_perf_visitor.html#ad04231380f523e85adb5e0dce531f471":[0,8,0,15,40], +"classnmodl_1_1visitor_1_1_perf_visitor.html#ad967279d5a8892a22c26892895c37b6c":[0,8,0,15,61], "classnmodl_1_1visitor_1_1_perf_visitor.html#adb10791f8b4b750b2bf36181003f7238":[0,8,0,15,42], "classnmodl_1_1visitor_1_1_perf_visitor.html#adfc54ab3e4d8fa2211af69213af5e9c4":[0,8,0,15,72], "classnmodl_1_1visitor_1_1_perf_visitor.html#ae3aea3387fc83e06e3315246cb9502d7":[0,8,0,15,12], @@ -245,9 +249,5 @@ var NAVTREEINDEX22 = "classnmodl_1_1visitor_1_1_verbatim_var_rename_visitor.html#ada5eadd4ae3c95ec6bee081d2a2a809b":[0,8,0,25,4], "classnmodl_1_1visitor_1_1_verbatim_var_rename_visitor.html#adf14ca58ed7e714c775a1b17872ffb1b":[0,8,0,25,1], "classnmodl_1_1visitor_1_1_verbatim_var_rename_visitor.html#aef890a20c23b7cba397d89f975bda18e":[0,8,0,25,3], -"classnmodl_1_1visitor_1_1_verbatim_visitor.html":[0,8,0,26], -"classnmodl_1_1visitor_1_1_verbatim_visitor.html#a2a1679f340e006135e3a72a78fb7c7a4":[0,8,0,26,2], -"classnmodl_1_1visitor_1_1_verbatim_visitor.html#a37100be2e52e501d9c0efe97e5074ee2":[0,8,0,26,3], -"classnmodl_1_1visitor_1_1_verbatim_visitor.html#a3c2d925164fbfebb8169ecab0dbb25de":[0,8,0,26,5], -"classnmodl_1_1visitor_1_1_verbatim_visitor.html#a4cbebb1622f9b1700eadc2d06079119b":[0,8,0,26,1] +"classnmodl_1_1visitor_1_1_verbatim_visitor.html":[0,8,0,26] }; diff --git a/html/doxygen/navtreeindex23.js b/html/doxygen/navtreeindex23.js index dd68088474..a684363d4d 100644 --- a/html/doxygen/navtreeindex23.js +++ b/html/doxygen/navtreeindex23.js @@ -1,5 +1,9 @@ var NAVTREEINDEX23 = { +"classnmodl_1_1visitor_1_1_verbatim_visitor.html#a2a1679f340e006135e3a72a78fb7c7a4":[0,8,0,26,2], +"classnmodl_1_1visitor_1_1_verbatim_visitor.html#a37100be2e52e501d9c0efe97e5074ee2":[0,8,0,26,3], +"classnmodl_1_1visitor_1_1_verbatim_visitor.html#a3c2d925164fbfebb8169ecab0dbb25de":[0,8,0,26,5], +"classnmodl_1_1visitor_1_1_verbatim_visitor.html#a4cbebb1622f9b1700eadc2d06079119b":[0,8,0,26,1], "classnmodl_1_1visitor_1_1_verbatim_visitor.html#a84597affd230a1046f26918b34158842":[0,8,0,26,4], "classnmodl_1_1visitor_1_1_verbatim_visitor.html#a8c9a52900bc70bf872479fef75f3325a":[0,8,0,26,0], "classnmodl_1_1visitor_1_1_visitor.html":[0,8,0,32], @@ -245,9 +249,5 @@ var NAVTREEINDEX23 = "classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#af941c4569247a15a7f5c198dc6c4b6a8":[0,8,0,35,29], "classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#af9d9ac835e22932cdb84f704737a57e2":[0,8,0,35,108], "classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#af9fc3d222e4f3848b97947370637f4ea":[0,8,0,35,38], -"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afb4eff4a29235f84af83fadf075a8f23":[0,8,0,35,102], -"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afb8f66b87e39475950ff179ed8dd5417":[0,8,0,35,89], -"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afba68c3cecbb2afc3992f3e5c73f0d31":[0,8,0,35,49], -"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afcafe2038cf430e647c1764e097ab797":[0,8,0,35,47], -"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afe81b0045625534bb18b09f4633cdcbc":[0,8,0,35,95] +"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afb4eff4a29235f84af83fadf075a8f23":[0,8,0,35,102] }; diff --git a/html/doxygen/navtreeindex24.js b/html/doxygen/navtreeindex24.js index 8bf8b8fc43..ea9c30d2d4 100644 --- a/html/doxygen/navtreeindex24.js +++ b/html/doxygen/navtreeindex24.js @@ -1,5 +1,9 @@ var NAVTREEINDEX24 = { +"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afb8f66b87e39475950ff179ed8dd5417":[0,8,0,35,89], +"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afba68c3cecbb2afc3992f3e5c73f0d31":[0,8,0,35,49], +"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afcafe2038cf430e647c1764e097ab797":[0,8,0,35,47], +"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afe81b0045625534bb18b09f4633cdcbc":[0,8,0,35,95], "code__printer_8cpp.html":[3,0,1,5,0], "code__printer_8cpp_source.html":[3,0,1,5,0], "code__printer_8hpp.html":[3,0,1,5,1], @@ -245,9 +249,5 @@ var NAVTREEINDEX24 = "dir_8882c28fc1218b63be3659794b7a95be.html":[3,0,2,0,8], "dir_9792af1842a3d5695511624619c9cfd3.html":[3,0,2,0,7], "dir_ad1da340fca3da41db96f59547bf3d8b.html":[3,0,0,0,0,0], -"dir_b4b8bd075f03e0fff4167d5f80e92046.html":[3,0,0], -"dir_bb63d001f2c2d4d23cdeedc048a4b8ac.html":[3,0,2,0,10], -"dir_e00e9ec87333ef842717c0838447cfac.html":[3,0,1,7,1], -"dir_e1aa690b4af0a0538ec65649b0390051.html":[3,0,1,3], -"dir_f2b209578b5a17a28a4a9a3c2cd6500d.html":[3,0,1,7,0] +"dir_b4b8bd075f03e0fff4167d5f80e92046.html":[3,0,0] }; diff --git a/html/doxygen/navtreeindex25.js b/html/doxygen/navtreeindex25.js index deba713012..a53c706abe 100644 --- a/html/doxygen/navtreeindex25.js +++ b/html/doxygen/navtreeindex25.js @@ -1,5 +1,9 @@ var NAVTREEINDEX25 = { +"dir_bb63d001f2c2d4d23cdeedc048a4b8ac.html":[3,0,2,0,10], +"dir_e00e9ec87333ef842717c0838447cfac.html":[3,0,1,7,1], +"dir_e1aa690b4af0a0538ec65649b0390051.html":[3,0,1,3], +"dir_f2b209578b5a17a28a4a9a3c2cd6500d.html":[3,0,1,7,0], "dir_f4739f0eb21cb15a404f3cea1464656d.html":[3,0,1,9], "dir_f55f6dc9e21b09a12acc690b19f5e964.html":[3,0,1,6], "discrete__block_8hpp.html":[3,0,0,0,0,0,0,31], @@ -75,8 +79,8 @@ var NAVTREEINDEX25 = "functions_e.html":[2,3,0,4], "functions_enum.html":[2,3,4], "functions_f.html":[2,3,0,5], -"functions_func.html":[2,3,1,0], "functions_func.html":[2,3,1], +"functions_func.html":[2,3,1,0], "functions_func_b.html":[2,3,1,1], "functions_func_c.html":[2,3,1,2], "functions_func_d.html":[2,3,1,3], @@ -227,8 +231,8 @@ var NAVTREEINDEX25 = "group__ast__class.html#ga259f83364b843c691a85687f247244e7":[0,0,1,4,64], "group__ast__class.html#ga26205d58d3a56e11a1af97124b07a68e":[0,0,1,4,82], "group__ast__class.html#ga26205d58d3a56e11a1af97124b07a68e":[0,0,1,202], -"group__ast__class.html#ga2a8ed6832a20d3b6e5b400b6cb772ca8":[0,0,1,227], "group__ast__class.html#ga2a8ed6832a20d3b6e5b400b6cb772ca8":[0,0,1,4,107], +"group__ast__class.html#ga2a8ed6832a20d3b6e5b400b6cb772ca8":[0,0,1,227], "group__ast__class.html#ga2a96d8e7cc4dd454135b86ffd4c456e7":[0,0,1,4,120], "group__ast__class.html#ga2a96d8e7cc4dd454135b86ffd4c456e7":[0,0,1,240], "group__ast__class.html#ga2ab319dfd9eaa87327dfb00c2c006b5f":[0,0,1,4,95], @@ -245,9 +249,5 @@ var NAVTREEINDEX25 = "group__ast__class.html#ga3b6381327cb9e25b740e855660a7ff3a":[0,0,1,4,43], "group__ast__class.html#ga3e1362838ed4cc6d1ab04e6a9fc86bf2":[0,0,1,226], "group__ast__class.html#ga3e1362838ed4cc6d1ab04e6a9fc86bf2":[0,0,1,4,106], -"group__ast__class.html#ga3f92f72529d03053ab51c41b38a29897":[0,0,1,4,71], -"group__ast__class.html#ga3f92f72529d03053ab51c41b38a29897":[0,0,1,191], -"group__ast__class.html#ga4303bc795f23f0909cd1ac655c098ed4":[0,0,1,4,19], -"group__ast__class.html#ga4303bc795f23f0909cd1ac655c098ed4":[0,0,1,139], -"group__ast__class.html#ga4892777c5b32b112d588b05d07f28549":[0,0,1,4,14] +"group__ast__class.html#ga3f92f72529d03053ab51c41b38a29897":[0,0,1,191] }; diff --git a/html/doxygen/navtreeindex26.js b/html/doxygen/navtreeindex26.js index 273ddb2e37..7cf4984435 100644 --- a/html/doxygen/navtreeindex26.js +++ b/html/doxygen/navtreeindex26.js @@ -1,8 +1,12 @@ var NAVTREEINDEX26 = { +"group__ast__class.html#ga3f92f72529d03053ab51c41b38a29897":[0,0,1,4,71], +"group__ast__class.html#ga4303bc795f23f0909cd1ac655c098ed4":[0,0,1,139], +"group__ast__class.html#ga4303bc795f23f0909cd1ac655c098ed4":[0,0,1,4,19], +"group__ast__class.html#ga4892777c5b32b112d588b05d07f28549":[0,0,1,4,14], "group__ast__class.html#ga4892777c5b32b112d588b05d07f28549":[0,0,1,134], -"group__ast__class.html#ga4ac0e01057626ba84f0511ea12370956":[0,0,1,160], "group__ast__class.html#ga4ac0e01057626ba84f0511ea12370956":[0,0,1,4,40], +"group__ast__class.html#ga4ac0e01057626ba84f0511ea12370956":[0,0,1,160], "group__ast__class.html#ga4efd89b3e621b205a36fb120b62b954b":[0,0,1,4,121], "group__ast__class.html#ga4efd89b3e621b205a36fb120b62b954b":[0,0,1,241], "group__ast__class.html#ga507524f2adabb5ace4f6943b0708448e":[0,0,1,4,84], @@ -13,14 +17,14 @@ var NAVTREEINDEX26 = "group__ast__class.html#ga53d7bf2c18bac0edb78e1123e947988e":[0,0,1,220], "group__ast__class.html#ga55e9704837cf41c797642b1f7c102dfc":[0,0,1,4,0], "group__ast__class.html#ga55e9704837cf41c797642b1f7c102dfc":[0,0,1,123], -"group__ast__class.html#ga571f5c2475e8e6fbfd898f82e710960a":[0,0,1,4,39], "group__ast__class.html#ga571f5c2475e8e6fbfd898f82e710960a":[0,0,1,159], +"group__ast__class.html#ga571f5c2475e8e6fbfd898f82e710960a":[0,0,1,4,39], "group__ast__class.html#ga5b2f7b1f3e25a7d8f70d21368f7c4bcc":[0,0,1,4,7], "group__ast__class.html#ga5b2f7b1f3e25a7d8f70d21368f7c4bcc":[0,0,1,127], "group__ast__class.html#ga5bbb1d563621926d689f8480d243d909":[0,0,1,124], "group__ast__class.html#ga5bbb1d563621926d689f8480d243d909":[0,0,1,4,4], -"group__ast__class.html#ga5eed5c6969860fdf373a7b23dcf0653b":[0,0,1,188], "group__ast__class.html#ga5eed5c6969860fdf373a7b23dcf0653b":[0,0,1,4,68], +"group__ast__class.html#ga5eed5c6969860fdf373a7b23dcf0653b":[0,0,1,188], "group__ast__class.html#ga6105e91f1ce07693b9df1e0162d8f5a4":[0,0,1,4,132], "group__ast__class.html#ga6105e91f1ce07693b9df1e0162d8f5a4":[0,0,1,252], "group__ast__class.html#ga630659747411ec7b03685256c92dab8f":[0,0,1,224], @@ -41,8 +45,8 @@ var NAVTREEINDEX26 = "group__ast__class.html#ga6ca54bc2ec0698aa5a485be7c653781d":[0,0,1,259], "group__ast__class.html#ga6d8c02bfb7a35cf3ac7858e61f24bf00":[0,0,1,166], "group__ast__class.html#ga6d8c02bfb7a35cf3ac7858e61f24bf00":[0,0,1,4,46], -"group__ast__class.html#ga6eadddbece7bcde0e0198e61b707d4c4":[0,0,1,237], "group__ast__class.html#ga6eadddbece7bcde0e0198e61b707d4c4":[0,0,1,4,117], +"group__ast__class.html#ga6eadddbece7bcde0e0198e61b707d4c4":[0,0,1,237], "group__ast__class.html#ga738d9e9a7e344c5086e37cffc4be1d2f":[0,0,1,4,98], "group__ast__class.html#ga738d9e9a7e344c5086e37cffc4be1d2f":[0,0,1,218], "group__ast__class.html#ga7955eda5565d690e7acfaead092c56aa":[0,0,1,4,3], @@ -73,8 +77,8 @@ var NAVTREEINDEX26 = "group__ast__class.html#ga9313a4af4b7e130f1ff85aa1e11882ab":[0,0,1,4,70], "group__ast__class.html#ga933f5f45973d115b0a274d0ff628cb56":[0,0,1,162], "group__ast__class.html#ga933f5f45973d115b0a274d0ff628cb56":[0,0,1,4,42], -"group__ast__class.html#ga948ddb22b25c884d62ab0df93dfe431a":[0,0,1,4,108], "group__ast__class.html#ga948ddb22b25c884d62ab0df93dfe431a":[0,0,1,228], +"group__ast__class.html#ga948ddb22b25c884d62ab0df93dfe431a":[0,0,1,4,108], "group__ast__class.html#ga958228cd1a203da6fea17efac8165a59":[0,0,1,165], "group__ast__class.html#ga958228cd1a203da6fea17efac8165a59":[0,0,1,4,45], "group__ast__class.html#ga9a9684461a0f1ce3adb845a0715b1b9e":[0,0,1,4,8], @@ -85,8 +89,8 @@ var NAVTREEINDEX26 = "group__ast__class.html#gaa55f3ea9308348d5140290e34c4b06dd":[0,0,1,207], "group__ast__class.html#gaa680ed2587655b4f6b771db6584b22cc":[0,0,1,194], "group__ast__class.html#gaa680ed2587655b4f6b771db6584b22cc":[0,0,1,4,74], -"group__ast__class.html#gaa7d7dc200bbee1fe9619323965a1715e":[0,0,1,4,66], "group__ast__class.html#gaa7d7dc200bbee1fe9619323965a1715e":[0,0,1,186], +"group__ast__class.html#gaa7d7dc200bbee1fe9619323965a1715e":[0,0,1,4,66], "group__ast__class.html#gaa7e0498bd12a174ddff55d9f4987c0b6":[0,0,1,4,96], "group__ast__class.html#gaa7e0498bd12a174ddff55d9f4987c0b6":[0,0,1,216], "group__ast__class.html#gaa892d22eb06997da03dc7a433f14ba1e":[0,0,1,4,123], @@ -99,8 +103,8 @@ var NAVTREEINDEX26 = "group__ast__class.html#gaac556bedee72f6f87391147af12cfb14":[0,0,1,260], "group__ast__class.html#gaad130e3dba2180cd1f12d7e3925f6802":[0,0,1,4,76], "group__ast__class.html#gaad130e3dba2180cd1f12d7e3925f6802":[0,0,1,196], -"group__ast__class.html#gaade2043ac7883b4d0873b473042f930d":[0,0,1,234], "group__ast__class.html#gaade2043ac7883b4d0873b473042f930d":[0,0,1,4,114], +"group__ast__class.html#gaade2043ac7883b4d0873b473042f930d":[0,0,1,234], "group__ast__class.html#gaafdc39f0529d0879f741f525181bb756":[0,0,1,146], "group__ast__class.html#gaafdc39f0529d0879f741f525181bb756":[0,0,1,4,26], "group__ast__class.html#gaafe0391f61c4d985226cf91abf6d0ea6":[0,0,1,181], @@ -109,46 +113,46 @@ var NAVTREEINDEX26 = "group__ast__class.html#gab0ca0546b6c94aa502549453ff611811":[0,0,1,4,73], "group__ast__class.html#gab2ab7390c9aa9a581525ec7b2a8ddb64":[0,0,1,4,88], "group__ast__class.html#gab2ab7390c9aa9a581525ec7b2a8ddb64":[0,0,1,208], -"group__ast__class.html#gab2f01c121a37f709051e291fed2cc6e1":[0,0,1,4,65], "group__ast__class.html#gab2f01c121a37f709051e291fed2cc6e1":[0,0,1,185], -"group__ast__class.html#gab35a10b4c8f5ca2515f0bb122853e447":[0,0,1,4,38], +"group__ast__class.html#gab2f01c121a37f709051e291fed2cc6e1":[0,0,1,4,65], "group__ast__class.html#gab35a10b4c8f5ca2515f0bb122853e447":[0,0,1,158], +"group__ast__class.html#gab35a10b4c8f5ca2515f0bb122853e447":[0,0,1,4,38], "group__ast__class.html#gab48e965f9bfc5beef90fec6c0d59b6ec":[0,0,1,4,89], "group__ast__class.html#gab48e965f9bfc5beef90fec6c0d59b6ec":[0,0,1,209], "group__ast__class.html#gab97c8fbc73008d36927a0377335bc0ba":[0,0,1,4,125], "group__ast__class.html#gab97c8fbc73008d36927a0377335bc0ba":[0,0,1,245], -"group__ast__class.html#gaba93060c77072b4da627b13e7ab5fbd8":[0,0,1,154], "group__ast__class.html#gaba93060c77072b4da627b13e7ab5fbd8":[0,0,1,4,34], +"group__ast__class.html#gaba93060c77072b4da627b13e7ab5fbd8":[0,0,1,154], "group__ast__class.html#gabcce17a4b7c2abd423cf2319dc492f24":[0,0,1,244], "group__ast__class.html#gabcce17a4b7c2abd423cf2319dc492f24":[0,0,1,4,124], -"group__ast__class.html#gabdc81c1d11f50f067df4cf0d7746f110":[0,0,1,4,29], "group__ast__class.html#gabdc81c1d11f50f067df4cf0d7746f110":[0,0,1,149], +"group__ast__class.html#gabdc81c1d11f50f067df4cf0d7746f110":[0,0,1,4,29], "group__ast__class.html#gabe0d8be79f0e0c0967da29d186c86c3c":[0,0,1,4,6], "group__ast__class.html#gabe0d8be79f0e0c0967da29d186c86c3c":[0,0,1,126], "group__ast__class.html#gabf2f9f79aaa6163faccf95beec66c585":[0,0,1,206], "group__ast__class.html#gabf2f9f79aaa6163faccf95beec66c585":[0,0,1,4,86], "group__ast__class.html#gac02dd08abb8b9d2e817a1ae09297602b":[0,0,1,4,142], "group__ast__class.html#gac02dd08abb8b9d2e817a1ae09297602b":[0,0,1,263], -"group__ast__class.html#gac116c33a0a2c52eeb7b3f7121ee282fb":[0,0,1,4,27], "group__ast__class.html#gac116c33a0a2c52eeb7b3f7121ee282fb":[0,0,1,147], -"group__ast__class.html#gac38a02afaac3a75f0c66f0d351bf9c04":[0,0,1,170], +"group__ast__class.html#gac116c33a0a2c52eeb7b3f7121ee282fb":[0,0,1,4,27], "group__ast__class.html#gac38a02afaac3a75f0c66f0d351bf9c04":[0,0,1,4,50], +"group__ast__class.html#gac38a02afaac3a75f0c66f0d351bf9c04":[0,0,1,170], "group__ast__class.html#gac58c77a74f980986b6588a285c12d408":[0,0,1,183], "group__ast__class.html#gac58c77a74f980986b6588a285c12d408":[0,0,1,4,63], "group__ast__class.html#gac59852558ed3eaf48643738b5a00f1ad":[0,0,1,4,109], "group__ast__class.html#gac59852558ed3eaf48643738b5a00f1ad":[0,0,1,229], -"group__ast__class.html#gac6117017139fe43441831581205b087b":[0,0,1,121], "group__ast__class.html#gac6117017139fe43441831581205b087b":[0,0,1,4,2], -"group__ast__class.html#gac774fd9ccb62cfdba927225ef59a4de3":[0,0,1,223], +"group__ast__class.html#gac6117017139fe43441831581205b087b":[0,0,1,121], "group__ast__class.html#gac774fd9ccb62cfdba927225ef59a4de3":[0,0,1,4,103], +"group__ast__class.html#gac774fd9ccb62cfdba927225ef59a4de3":[0,0,1,223], "group__ast__class.html#gac81ffb4a2c7ca8ce7527f2b8c3b9d403":[0,0,1,4,141], "group__ast__class.html#gac81ffb4a2c7ca8ce7527f2b8c3b9d403":[0,0,1,261], -"group__ast__class.html#gac8ca9b958f672aac8f178f6df6a4bd05":[0,0,1,222], "group__ast__class.html#gac8ca9b958f672aac8f178f6df6a4bd05":[0,0,1,4,102], +"group__ast__class.html#gac8ca9b958f672aac8f178f6df6a4bd05":[0,0,1,222], "group__ast__class.html#gacab8b02244ee74dd512a5eba7c83e149":[0,0,1,4,20], "group__ast__class.html#gacab8b02244ee74dd512a5eba7c83e149":[0,0,1,140], -"group__ast__class.html#gacb568ad839f6ec0eae735e8cf96c8ae7":[0,0,1,130], "group__ast__class.html#gacb568ad839f6ec0eae735e8cf96c8ae7":[0,0,1,4,10], +"group__ast__class.html#gacb568ad839f6ec0eae735e8cf96c8ae7":[0,0,1,130], "group__ast__class.html#gacb75345ef088d81fcbc33cf08b5dcde3":[0,0,1,4,21], "group__ast__class.html#gacb75345ef088d81fcbc33cf08b5dcde3":[0,0,1,141], "group__ast__class.html#gaccf0eb232f3f92727a805fdb96012a2c":[0,0,1,4,137], @@ -159,8 +163,8 @@ var NAVTREEINDEX26 = "group__ast__class.html#gacf97186289f358ea51959f4285f870cb":[0,0,1,4,47], "group__ast__class.html#gad0fc98ce521337690e9715bbc8e52848":[0,0,1,4,79], "group__ast__class.html#gad0fc98ce521337690e9715bbc8e52848":[0,0,1,199], -"group__ast__class.html#gad1f90104022d3c27fc1111d3d75a7057":[0,0,1,187], "group__ast__class.html#gad1f90104022d3c27fc1111d3d75a7057":[0,0,1,4,67], +"group__ast__class.html#gad1f90104022d3c27fc1111d3d75a7057":[0,0,1,187], "group__ast__class.html#gad3aeaf59438aab6d10b5b6eca24ee7b2":[0,0,1,150], "group__ast__class.html#gad3aeaf59438aab6d10b5b6eca24ee7b2":[0,0,1,4,30], "group__ast__class.html#gad7bcccf631ed5bf00705df5d1c0e5669":[0,0,1,192], @@ -169,12 +173,12 @@ var NAVTREEINDEX26 = "group__ast__class.html#gad7e9018d9c607b42fcec41da33ef7ffc":[0,0,1,4,17], "group__ast__class.html#gad9186bccf4349f4dc1b42448422151a5":[0,0,1,262], "group__ast__class.html#gad9186bccf4349f4dc1b42448422151a5":[0,0,1,4,1], -"group__ast__class.html#gad920434f140f771242aed6060526a3ba":[0,0,1,144], "group__ast__class.html#gad920434f140f771242aed6060526a3ba":[0,0,1,4,24], -"group__ast__class.html#gad920ec3fd8147522e85d67bfacb8ebdd":[0,0,1,157], +"group__ast__class.html#gad920434f140f771242aed6060526a3ba":[0,0,1,144], "group__ast__class.html#gad920ec3fd8147522e85d67bfacb8ebdd":[0,0,1,4,37], -"group__ast__class.html#gada2c56cc8f8f252d8ebed343eb863985":[0,0,1,258], +"group__ast__class.html#gad920ec3fd8147522e85d67bfacb8ebdd":[0,0,1,157], "group__ast__class.html#gada2c56cc8f8f252d8ebed343eb863985":[0,0,1,4,138], +"group__ast__class.html#gada2c56cc8f8f252d8ebed343eb863985":[0,0,1,258], "group__ast__class.html#gadaf9e897c21c83aa9fd6984a839aeaf1":[0,0,1,4,94], "group__ast__class.html#gadaf9e897c21c83aa9fd6984a839aeaf1":[0,0,1,214], "group__ast__class.html#gade58bfc61f86b2713d50b523aee0c92f":[0,0,1,179], @@ -183,24 +187,24 @@ var NAVTREEINDEX26 = "group__ast__class.html#gae0579e9d3a6f697fcd4ab022eba3ed6d":[0,0,1,4,101], "group__ast__class.html#gae12e18a06af2fd43a83356f1cd75b66d":[0,0,1,4,81], "group__ast__class.html#gae12e18a06af2fd43a83356f1cd75b66d":[0,0,1,201], -"group__ast__class.html#gae136e55afd10a9c0a4f7de0134ab4593":[0,0,1,197], "group__ast__class.html#gae136e55afd10a9c0a4f7de0134ab4593":[0,0,1,4,77], +"group__ast__class.html#gae136e55afd10a9c0a4f7de0134ab4593":[0,0,1,197], "group__ast__class.html#gae1ca73bd18179c2c3a1c3a2751043437":[0,0,1,4,128], "group__ast__class.html#gae1ca73bd18179c2c3a1c3a2751043437":[0,0,1,248], -"group__ast__class.html#gae2d80677a97c3b1ac8690d73c74be890":[0,0,1,4,57], "group__ast__class.html#gae2d80677a97c3b1ac8690d73c74be890":[0,0,1,177], +"group__ast__class.html#gae2d80677a97c3b1ac8690d73c74be890":[0,0,1,4,57], "group__ast__class.html#gae340624f70b3f7f3670f17f8de45d1fc":[0,0,1,164], "group__ast__class.html#gae340624f70b3f7f3670f17f8de45d1fc":[0,0,1,4,44], "group__ast__class.html#gae3fb3e72b2a86631da0a81cbeb96a2e3":[0,0,1,4,122], "group__ast__class.html#gae3fb3e72b2a86631da0a81cbeb96a2e3":[0,0,1,242], "group__ast__class.html#gae8ed322d9d79b71a4dd96252e8266a3f":[0,0,1,169], "group__ast__class.html#gae8ed322d9d79b71a4dd96252e8266a3f":[0,0,1,4,49], -"group__ast__class.html#gaea4ef0d9fa16aa06d9167dd81f411913":[0,0,1,230], "group__ast__class.html#gaea4ef0d9fa16aa06d9167dd81f411913":[0,0,1,4,110], +"group__ast__class.html#gaea4ef0d9fa16aa06d9167dd81f411913":[0,0,1,230], "group__ast__class.html#gaed858f15cec95707094262eff7f96003":[0,0,1,4,119], "group__ast__class.html#gaed858f15cec95707094262eff7f96003":[0,0,1,239], -"group__ast__class.html#gaee1e3d29559569a7dc809ba13fac4d80":[0,0,1,151], "group__ast__class.html#gaee1e3d29559569a7dc809ba13fac4d80":[0,0,1,4,31], +"group__ast__class.html#gaee1e3d29559569a7dc809ba13fac4d80":[0,0,1,151], "group__ast__class.html#gaefcd48a1c371deac5a65b9ccf68a3cdf":[0,0,1,4,83], "group__ast__class.html#gaefcd48a1c371deac5a65b9ccf68a3cdf":[0,0,1,203], "group__ast__class.html#gaf47927781853e1b1d888dc16b227b2e8":[0,0,1,4,80], @@ -245,9 +249,5 @@ var NAVTREEINDEX26 = "group__ast__prop.html#gga524298752d3913086b9e8bf101091719aad53c828ee99cd8f1030d71420262077":[0,0,0,4,0], "group__ast__prop.html#ggac542051eff25e93d11270a5c9d211143a111b1758808e26b3b017dd10b682bace":[0,0,0,0,2], "group__ast__prop.html#ggac542051eff25e93d11270a5c9d211143a1572910415251835b17fc3bf40d9c9a0":[0,0,0,0,3], -"group__ast__prop.html#ggac542051eff25e93d11270a5c9d211143a1c2321a7038198c2126ae1828b9a4b36":[0,0,0,0,0], -"group__ast__prop.html#ggac542051eff25e93d11270a5c9d211143abd2dfe0cbb245d6c4c4e553680834ba8":[0,0,0,0,1], -"group__ast__prop.html#ggadcf4f5fdf8b60524c688899351105d8aa2d707e513b03765106d024ea9268f080":[0,0,0,3,1], -"group__ast__prop.html#ggadcf4f5fdf8b60524c688899351105d8aad76f0a28279fcc261f92bd59949f4bbd":[0,0,0,3,0], -"group__ast__type.html":[0,0,2] +"group__ast__prop.html#ggac542051eff25e93d11270a5c9d211143a1c2321a7038198c2126ae1828b9a4b36":[0,0,0,0,0] }; diff --git a/html/doxygen/navtreeindex27.js b/html/doxygen/navtreeindex27.js index 863c6a3658..bf6316397c 100644 --- a/html/doxygen/navtreeindex27.js +++ b/html/doxygen/navtreeindex27.js @@ -1,5 +1,9 @@ var NAVTREEINDEX27 = { +"group__ast__prop.html#ggac542051eff25e93d11270a5c9d211143abd2dfe0cbb245d6c4c4e553680834ba8":[0,0,0,0,1], +"group__ast__prop.html#ggadcf4f5fdf8b60524c688899351105d8aa2d707e513b03765106d024ea9268f080":[0,0,0,3,1], +"group__ast__prop.html#ggadcf4f5fdf8b60524c688899351105d8aad76f0a28279fcc261f92bd59949f4bbd":[0,0,0,3,0], +"group__ast__type.html":[0,0,2], "group__ast__type.html#gac392e49849e60c05e42ea02c7b445033":[0,0,2,0], "group__ast__type.html#ggac392e49849e60c05e42ea02c7b445033a004105ad423328feec36670b140c2f8f":[0,0,2,0,31], "group__ast__type.html#ggac392e49849e60c05e42ea02c7b445033a0060a18652b80f4a20f624738e219695":[0,0,2,0,86], @@ -244,10 +248,6 @@ var NAVTREEINDEX27 = "group__ast__vec__type.html#gafcd60e4a0a5c7f255fe5fcb69597fb35":[0,0,3,101], "group__codegen.html":[0,1], "group__codegen__backends.html":[0,1,0], -"group__codegen__backends.html#ga743bcd56c5822a14381fd87fe586ed6c":[0,1,0,3,88], "group__codegen__backends.html#ga743bcd56c5822a14381fd87fe586ed6c":[0,1,0,7], -"group__codegen__backends.html#gabd283274182774ed39c08a0714842d43":[0,1,0,4,23], -"group__codegen__backends.html#gabd283274182774ed39c08a0714842d43":[0,1,0,5], -"group__codegen__backends.html#gaebe64f7d52f5cb96d8c73c1619bddabf":[0,1,0,6], -"group__codegen__backends.html#gaebe64f7d52f5cb96d8c73c1619bddabf":[0,1,0,2,57] +"group__codegen__backends.html#ga743bcd56c5822a14381fd87fe586ed6c":[0,1,0,3,91] }; diff --git a/html/doxygen/navtreeindex28.js b/html/doxygen/navtreeindex28.js index 6e5d001e07..12d2134d23 100644 --- a/html/doxygen/navtreeindex28.js +++ b/html/doxygen/navtreeindex28.js @@ -1,5 +1,9 @@ var NAVTREEINDEX28 = { +"group__codegen__backends.html#gabd283274182774ed39c08a0714842d43":[0,1,0,5], +"group__codegen__backends.html#gabd283274182774ed39c08a0714842d43":[0,1,0,4,22], +"group__codegen__backends.html#gaebe64f7d52f5cb96d8c73c1619bddabf":[0,1,0,6], +"group__codegen__backends.html#gaebe64f7d52f5cb96d8c73c1619bddabf":[0,1,0,2,56], "group__codegen__details.html":[0,1,1], "group__codegen__details.html#ga2d0a1f473f039b495e9cc349c3b57dbb":[0,1,1,8], "group__codegen__details.html#gab185b9278fbfff591fbe3da84ba22d0b":[0,1,1,9], @@ -35,48 +39,48 @@ var NAVTREEINDEX28 = "group__token.html":[0,2], "group__token__modtoken.html":[0,2,0], "group__token__test.html":[0,2,1], -"group__token__test.html#ga0da85adf566fc93b8d173fa4117ccb74":[3,0,2,0,3,0,3], "group__token__test.html#ga0da85adf566fc93b8d173fa4117ccb74":[0,2,1,3], -"group__token__test.html#ga46008ea4532600b05a677394c6600055":[3,0,2,0,3,0,2], +"group__token__test.html#ga0da85adf566fc93b8d173fa4117ccb74":[3,0,2,0,3,0,3], "group__token__test.html#ga46008ea4532600b05a677394c6600055":[0,2,1,2], -"group__token__test.html#ga752aa45201ab43cc2d13b3ce5a5f1144":[3,0,2,0,3,0,1], +"group__token__test.html#ga46008ea4532600b05a677394c6600055":[3,0,2,0,3,0,2], "group__token__test.html#ga752aa45201ab43cc2d13b3ce5a5f1144":[0,2,1,1], +"group__token__test.html#ga752aa45201ab43cc2d13b3ce5a5f1144":[3,0,2,0,3,0,1], "group__token__test.html#ga9cd6cc464d230725aacf2bf9d41d364e":[3,0,2,0,3,0,0], "group__token__test.html#ga9cd6cc464d230725aacf2bf9d41d364e":[0,2,1,0], "group__units.html":[0,6], "group__units.html#ga08e9b606cb5ea92658765b82a886f2f8":[0,6,1,4], "group__units.html#ga08e9b606cb5ea92658765b82a886f2f8":[0,6,8], -"group__units.html#ga141975968d2f0eef8cfc36d80e8962c8":[0,6,0,0], "group__units.html#ga141975968d2f0eef8cfc36d80e8962c8":[0,6,13], +"group__units.html#ga141975968d2f0eef8cfc36d80e8962c8":[0,6,0,0], "group__units.html#ga20d9e1e26895ee030dff6ddb27124548":[0,6,1,7], "group__units.html#ga20d9e1e26895ee030dff6ddb27124548":[0,6,15], "group__units.html#ga31bdaa723dc74c12a9bf1a652561d6e7":[0,6,19], "group__units.html#ga31bdaa723dc74c12a9bf1a652561d6e7":[0,6,1,9], -"group__units.html#ga330f86b461ce0320cd23e935b710be05":[0,6,1,10], "group__units.html#ga330f86b461ce0320cd23e935b710be05":[0,6,20], -"group__units.html#ga3a8c3503da97aeee3d242ddafb52774a":[0,6,1,11], +"group__units.html#ga330f86b461ce0320cd23e935b710be05":[0,6,1,10], "group__units.html#ga3a8c3503da97aeee3d242ddafb52774a":[0,6,21], +"group__units.html#ga3a8c3503da97aeee3d242ddafb52774a":[0,6,1,11], "group__units.html#ga4014c46fced93378dee7846b57211f6e":[0,6,18], "group__units.html#ga4014c46fced93378dee7846b57211f6e":[0,6,1,8], -"group__units.html#ga53666d277469c1f00a3b0fd26a094178":[0,6,9], "group__units.html#ga53666d277469c1f00a3b0fd26a094178":[0,6,1,5], -"group__units.html#ga5beb2f005efacceb06427827ef45bf15":[0,6,6], +"group__units.html#ga53666d277469c1f00a3b0fd26a094178":[0,6,9], "group__units.html#ga5beb2f005efacceb06427827ef45bf15":[0,6,0,2], -"group__units.html#ga7ffa76ac1fa5595a4aa1f0f703b34717":[0,6,10], +"group__units.html#ga5beb2f005efacceb06427827ef45bf15":[0,6,6], "group__units.html#ga7ffa76ac1fa5595a4aa1f0f703b34717":[0,6,1,6], -"group__units.html#gaaae2d7f1693c0e7abc23003e753d65ec":[0,6,11], +"group__units.html#ga7ffa76ac1fa5595a4aa1f0f703b34717":[0,6,10], "group__units.html#gaaae2d7f1693c0e7abc23003e753d65ec":[0,6,1,0], +"group__units.html#gaaae2d7f1693c0e7abc23003e753d65ec":[0,6,11], "group__units.html#gaac93a10252a81387387be4571bbed890":[0,6,5], "group__units.html#gaac93a10252a81387387be4571bbed890":[0,6,1,2], -"group__units.html#gabab997408892d209edc2e6207bcf6b3a":[0,6,14], "group__units.html#gabab997408892d209edc2e6207bcf6b3a":[0,6,0,1], +"group__units.html#gabab997408892d209edc2e6207bcf6b3a":[0,6,14], "group__units.html#gac26c7781e0924f73bac6a856f2c80217":[0,6,17], -"group__units.html#gacf73317c537bff91a6631c0c4f4cded0":[0,6,0,3], "group__units.html#gacf73317c537bff91a6631c0c4f4cded0":[0,6,16], -"group__units.html#gae0d4c7dbd75815ee53391809a8dac74d":[0,6,12], +"group__units.html#gacf73317c537bff91a6631c0c4f4cded0":[0,6,0,3], "group__units.html#gae0d4c7dbd75815ee53391809a8dac74d":[0,6,1,1], -"group__units.html#gae62d367c779588c163dcfe9cdd9efa37":[0,6,7], +"group__units.html#gae0d4c7dbd75815ee53391809a8dac74d":[0,6,12], "group__units.html#gae62d367c779588c163dcfe9cdd9efa37":[0,6,1,3], +"group__units.html#gae62d367c779588c163dcfe9cdd9efa37":[0,6,7], "group__utils.html":[0,7], "group__utils.html#ga08a8b444018d46999224618bb102b3e5":[0,7,8], "group__utils.html#ga09e2cad122ecf35cb2d5fbfc4b1daa2e":[0,7,9], @@ -245,9 +249,5 @@ var NAVTREEINDEX28 = "logger_8cpp_source.html":[3,0,1,10,4], "logger_8hpp.html":[3,0,1,10,5], "logger_8hpp_source.html":[3,0,1,10,5], -"lon__difuse_8hpp.html":[3,0,0,0,0,0,0,68], -"lon__difuse_8hpp_source.html":[3,0,0,0,0,0,0,68], -"lookup_8cpp.html":[3,0,2,0,10,11], -"lookup_8cpp.html#a67c2c4b0c051efa0234b307a2e4ef12d":[3,0,2,0,10,11,0], -"lookup_8cpp_source.html":[3,0,2,0,10,11] +"lon__difuse_8hpp.html":[3,0,0,0,0,0,0,68] }; diff --git a/html/doxygen/navtreeindex29.js b/html/doxygen/navtreeindex29.js index e6a0fde80f..224d01344c 100644 --- a/html/doxygen/navtreeindex29.js +++ b/html/doxygen/navtreeindex29.js @@ -1,5 +1,9 @@ var NAVTREEINDEX29 = { +"lon__difuse_8hpp_source.html":[3,0,0,0,0,0,0,68], +"lookup_8cpp.html":[3,0,2,0,10,11], +"lookup_8cpp.html#a67c2c4b0c051efa0234b307a2e4ef12d":[3,0,2,0,10,11,0], +"lookup_8cpp_source.html":[3,0,2,0,10,11], "lookup__visitor_8cpp.html":[3,0,0,0,0,0,1,6], "lookup__visitor_8cpp_source.html":[3,0,0,0,0,0,1,6], "lookup__visitor_8hpp.html":[3,0,0,0,0,0,1,7], @@ -68,31 +72,31 @@ var NAVTREEINDEX29 = "namespacemembers_w.html":[1,1,0,21], "namespacenmodl.html":[2,0,0], "namespacenmodl.html":[1,0,0], -"namespacenmodl_1_1ast.html":[1,0,0,0], "namespacenmodl_1_1ast.html":[2,0,0,0], +"namespacenmodl_1_1ast.html":[1,0,0,0], "namespacenmodl_1_1codegen.html":[1,0,0,1], "namespacenmodl_1_1codegen.html":[2,0,0,1], "namespacenmodl_1_1codegen_1_1naming.html":[1,0,0,1,0], "namespacenmodl_1_1codegen_1_1utils.html":[1,0,0,1,1], "namespacenmodl_1_1crout.html":[1,0,0,2], -"namespacenmodl_1_1details.html":[1,0,0,3], "namespacenmodl_1_1details.html":[2,0,0,2], +"namespacenmodl_1_1details.html":[1,0,0,3], "namespacenmodl_1_1docstring.html":[1,0,0,4], "namespacenmodl_1_1newton.html":[1,0,0,5], -"namespacenmodl_1_1parser.html":[2,0,0,3], "namespacenmodl_1_1parser.html":[1,0,0,6], -"namespacenmodl_1_1parser_1_1diffeq.html":[2,0,0,3,0], +"namespacenmodl_1_1parser.html":[2,0,0,3], "namespacenmodl_1_1parser_1_1diffeq.html":[1,0,0,6,0], +"namespacenmodl_1_1parser_1_1diffeq.html":[2,0,0,3,0], "namespacenmodl_1_1printer.html":[2,0,0,4], "namespacenmodl_1_1printer.html":[1,0,0,7], "namespacenmodl_1_1pybind__wrappers.html":[2,0,0,5], "namespacenmodl_1_1pybind__wrappers.html":[1,0,0,8], "namespacenmodl_1_1stringutils.html":[1,0,0,9], -"namespacenmodl_1_1symtab.html":[2,0,0,6], "namespacenmodl_1_1symtab.html":[1,0,0,10], +"namespacenmodl_1_1symtab.html":[2,0,0,6], "namespacenmodl_1_1symtab_1_1syminfo.html":[1,0,0,10,0], -"namespacenmodl_1_1test__utils.html":[1,0,0,11], "namespacenmodl_1_1test__utils.html":[2,0,0,7], +"namespacenmodl_1_1test__utils.html":[1,0,0,11], "namespacenmodl_1_1units.html":[1,0,0,12], "namespacenmodl_1_1units.html":[2,0,0,8], "namespacenmodl_1_1utils.html":[2,0,0,9], @@ -245,9 +249,5 @@ var NAVTREEINDEX29 = "perf_8cpp_source.html":[3,0,2,0,10,18], "perf__stat_8cpp.html":[3,0,1,10,6], "perf__stat_8cpp.html#abd71d3764885442ea947cc4b19465543":[3,0,1,10,6,0], -"perf__stat_8cpp_source.html":[3,0,1,10,6], -"perf__stat_8hpp.html":[3,0,1,10,7], -"perf__stat_8hpp_source.html":[3,0,1,10,7], -"perf__visitor_8cpp.html":[3,0,1,11,28], -"perf__visitor_8cpp_source.html":[3,0,1,11,28] +"perf__stat_8cpp_source.html":[3,0,1,10,6] }; diff --git a/html/doxygen/navtreeindex30.js b/html/doxygen/navtreeindex30.js index 902085673d..c8a35b474c 100644 --- a/html/doxygen/navtreeindex30.js +++ b/html/doxygen/navtreeindex30.js @@ -1,5 +1,9 @@ var NAVTREEINDEX30 = { +"perf__stat_8hpp.html":[3,0,1,10,7], +"perf__stat_8hpp_source.html":[3,0,1,10,7], +"perf__visitor_8cpp.html":[3,0,1,11,28], +"perf__visitor_8cpp_source.html":[3,0,1,11,28], "perf__visitor_8hpp.html":[3,0,1,11,29], "perf__visitor_8hpp_source.html":[3,0,1,11,29], "pointer_8hpp.html":[3,0,0,0,0,0,0,87], @@ -245,9 +249,5 @@ var NAVTREEINDEX30 = "structnmodl_1_1codegen_1_1_codegen_info.html#a9bff24568ad35f141f35b426dc7db4b5":[0,1,1,6,48], "structnmodl_1_1codegen_1_1_codegen_info.html#a9ed0ac0e4a57563e267a4ebbbcbd4203":[0,1,1,6,0], "structnmodl_1_1codegen_1_1_codegen_info.html#a9fc99f3e7bce31fd0529633d31ba1547":[0,1,1,6,62], -"structnmodl_1_1codegen_1_1_codegen_info.html#aa516bfc1058bdddd366473cd87970b59":[0,1,1,6,38], -"structnmodl_1_1codegen_1_1_codegen_info.html#aa6f2efd9a16289c4131b197e7296337c":[0,1,1,6,12], -"structnmodl_1_1codegen_1_1_codegen_info.html#aa7a3510e16dcde7b0a04c531c8b5dbae":[0,1,1,6,77], -"structnmodl_1_1codegen_1_1_codegen_info.html#aac10ea818f33243b73521ae7c557815f":[0,1,1,6,35], -"structnmodl_1_1codegen_1_1_codegen_info.html#ab19aab302a66b76f119a2b6312174543":[0,1,1,6,27] +"structnmodl_1_1codegen_1_1_codegen_info.html#aa516bfc1058bdddd366473cd87970b59":[0,1,1,6,38] }; diff --git a/html/doxygen/navtreeindex31.js b/html/doxygen/navtreeindex31.js index 48f60e0d48..3bbc6b567b 100644 --- a/html/doxygen/navtreeindex31.js +++ b/html/doxygen/navtreeindex31.js @@ -1,5 +1,9 @@ var NAVTREEINDEX31 = { +"structnmodl_1_1codegen_1_1_codegen_info.html#aa6f2efd9a16289c4131b197e7296337c":[0,1,1,6,12], +"structnmodl_1_1codegen_1_1_codegen_info.html#aa7a3510e16dcde7b0a04c531c8b5dbae":[0,1,1,6,77], +"structnmodl_1_1codegen_1_1_codegen_info.html#aac10ea818f33243b73521ae7c557815f":[0,1,1,6,35], +"structnmodl_1_1codegen_1_1_codegen_info.html#ab19aab302a66b76f119a2b6312174543":[0,1,1,6,27], "structnmodl_1_1codegen_1_1_codegen_info.html#ab4926329370f2ec809911757bf21597c":[0,1,1,6,30], "structnmodl_1_1codegen_1_1_codegen_info.html#ab64cdf75ce26794a645c1a6859cb24bd":[0,1,1,6,74], "structnmodl_1_1codegen_1_1_codegen_info.html#abbbe11ab6b05c33f174e313fc15ccc26":[0,1,1,6,59], @@ -245,9 +249,5 @@ var NAVTREEINDEX31 = "symbol__properties_8hpp.html#a7d0b8aa765db0de7491021b4d403b6e2afedcf9bd957a1f9acca6ef0bf5ae7145":[3,0,1,8,4,5,1], "symbol__properties_8hpp.html#a7d0b8aa765db0de7491021b4d403b6e2aff76c0536f6699ba876dbd207ec7cf55":[3,0,1,8,4,5,2], "symbol__properties_8hpp.html#a901f9299d7c59b1694463d26928f2a75":[3,0,1,8,4,4], -"symbol__properties_8hpp.html#a901f9299d7c59b1694463d26928f2a75a6a21b6995a068148bbb65c8f949b3fb2":[3,0,1,8,4,4,3], -"symbol__properties_8hpp.html#a901f9299d7c59b1694463d26928f2a75a9c70933aff6b2a6d08c687a6cbb6b765":[3,0,1,8,4,4,1], -"symbol__properties_8hpp.html#a901f9299d7c59b1694463d26928f2a75aa4d4b8da5f27c882ed2155dc406467a7":[3,0,1,8,4,4,2], -"symbol__properties_8hpp.html#a901f9299d7c59b1694463d26928f2a75af5ddaf0ca7929578b408c909429f68f2":[3,0,1,8,4,4,0], -"symbol__properties_8hpp.html#a907d41ef19a14c703ec166b47a7d9f61":[3,0,1,8,4,9] +"symbol__properties_8hpp.html#a901f9299d7c59b1694463d26928f2a75a6a21b6995a068148bbb65c8f949b3fb2":[3,0,1,8,4,4,3] }; diff --git a/html/doxygen/navtreeindex32.js b/html/doxygen/navtreeindex32.js index cdb84ab8b2..a92a8096a6 100644 --- a/html/doxygen/navtreeindex32.js +++ b/html/doxygen/navtreeindex32.js @@ -1,5 +1,9 @@ var NAVTREEINDEX32 = { +"symbol__properties_8hpp.html#a901f9299d7c59b1694463d26928f2a75a9c70933aff6b2a6d08c687a6cbb6b765":[3,0,1,8,4,4,1], +"symbol__properties_8hpp.html#a901f9299d7c59b1694463d26928f2a75aa4d4b8da5f27c882ed2155dc406467a7":[3,0,1,8,4,4,2], +"symbol__properties_8hpp.html#a901f9299d7c59b1694463d26928f2a75af5ddaf0ca7929578b408c909429f68f2":[3,0,1,8,4,4,0], +"symbol__properties_8hpp.html#a907d41ef19a14c703ec166b47a7d9f61":[3,0,1,8,4,9], "symbol__properties_8hpp.html#a9615978047cc9d7b43df2f549f2baffe":[3,0,1,8,4,16], "symbol__properties_8hpp.html#aa95fe1f73412bdb6bedaffb689a2a400":[3,0,1,8,4,11], "symbol__properties_8hpp.html#ac2ce7dd65a7614b9137c9be6bd9f0f8d":[3,0,1,8,4,15], @@ -245,9 +249,5 @@ var NAVTREEINDEX32 = "valence_8hpp.html":[3,0,0,0,0,0,0,116], "valence_8hpp_source.html":[3,0,0,0,0,0,0,116], "var__name_8hpp.html":[3,0,0,0,0,0,0,117], -"var__name_8hpp_source.html":[3,0,0,0,0,0,0,117], -"var__usage_8cpp.html":[3,0,2,0,10,26], -"var__usage_8cpp.html#ab2c5538fecec788ffd560fce9bfd8ca6":[3,0,2,0,10,26,0], -"var__usage_8cpp.html#abded330b1e70df5d1e8e7a6bacaf8739":[3,0,2,0,10,26,1], -"var__usage_8cpp_source.html":[3,0,2,0,10,26] +"var__name_8hpp_source.html":[3,0,0,0,0,0,0,117] }; diff --git a/html/doxygen/navtreeindex33.js b/html/doxygen/navtreeindex33.js index fe961172ee..d6f9ec315b 100644 --- a/html/doxygen/navtreeindex33.js +++ b/html/doxygen/navtreeindex33.js @@ -1,5 +1,9 @@ var NAVTREEINDEX33 = { +"var__usage_8cpp.html":[3,0,2,0,10,26], +"var__usage_8cpp.html#ab2c5538fecec788ffd560fce9bfd8ca6":[3,0,2,0,10,26,0], +"var__usage_8cpp.html#abded330b1e70df5d1e8e7a6bacaf8739":[3,0,2,0,10,26,1], +"var__usage_8cpp_source.html":[3,0,2,0,10,26], "var__usage__visitor_8cpp.html":[3,0,1,11,47], "var__usage__visitor_8cpp_source.html":[3,0,1,11,47], "var__usage__visitor_8hpp.html":[3,0,1,11,48], diff --git a/html/doxygen/search/all_f.js b/html/doxygen/search/all_f.js index 46cad50c1f..ebb6464f61 100644 --- a/html/doxygen/search/all_f.js +++ b/html/doxygen/search/all_f.js @@ -96,7 +96,7 @@ var searchData= ['print_5ffast_5fimem_5fcalculation_1616',['print_fast_imem_calculation',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#af58d26884131b0cc711887c549bc7957',1,'nmodl::codegen::CodegenAccVisitor::print_fast_imem_calculation()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6228949e87b0a9e14fe6886fc346e28c',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_fast_imem_calculation()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34492b32e18b9fbfd3ba01ba8ad85eb5',1,'nmodl::codegen::CodegenCppVisitor::print_fast_imem_calculation()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#abce8ff7e8bd0754c8d61066779b4e72f',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_fast_imem_calculation()']]], ['print_5ffirst_5fpointer_5fvar_5findex_5fgetter_1617',['print_first_pointer_var_index_getter',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6498ebb631852d55d7585ef179b3008e',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], ['print_5ffunction_1618',['print_function',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae47b27b3bfb2d9fa200b02f449c126e7',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_function()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4b9e335b7f968d36d9cd6bdfc34bba34',1,'nmodl::codegen::CodegenCppVisitor::print_function()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a8633f24f67f430477ff3bf4a0c6b36cb',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_function()']]], - ['print_5ffunction_5fcall_1619',['print_function_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7b24f3b0faf05f17c28e06b4981b55dd',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_function_call()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a43af5eef62e0e958d160b77fa1d6c099',1,'nmodl::codegen::CodegenCppVisitor::print_function_call()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3ef1a3189051f86fce9602c7b02b445a',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_function_call()']]], + ['print_5ffunction_5fcall_1619',['print_function_call',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad63b4318b5abd6b8c224fab70fe61081',1,'nmodl::codegen::CodegenCppVisitor']]], ['print_5ffunction_5fdeclaration_1620',['print_function_declaration',['../group__codegen__backends.html#gaebe64f7d52f5cb96d8c73c1619bddabf',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_function_declaration()'],['../group__codegen__backends.html#gabd283274182774ed39c08a0714842d43',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_function_declaration()']]], ['print_5ffunction_5for_5fprocedure_1621',['print_function_or_procedure',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab0d109b9d28587ba6cce93783a348d86',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_function_or_procedure()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3836bfe0a9610b9037a73ea727246e71',1,'nmodl::codegen::CodegenCppVisitor::print_function_or_procedure()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad635ed74eba5b2c3e0aee2e29ca1167a',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_function_or_procedure()']]], ['print_5ffunction_5fprocedure_5fhelper_1622',['print_function_procedure_helper',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5be32556e7bb7fd48b1bdb71d75fe5bb',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_function_procedure_helper()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aa017bbe95ad7539e72d182dac59f2454',1,'nmodl::codegen::CodegenCppVisitor::print_function_procedure_helper()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af6a5224b66dde062241120381b3cb8df',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_function_procedure_helper()']]], @@ -139,11 +139,11 @@ var searchData= ['print_5fnamespace_5fend_1659',['print_namespace_end',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aed50b0789d65ce89402dcf00e186f261',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_namespace_end()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2f0c1a7b9127c6248b03b296257e8833',1,'nmodl::codegen::CodegenCppVisitor::print_namespace_end()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a6abde0bb8aa4c6bd11cd15303295e9f9',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_namespace_end()']]], ['print_5fnamespace_5fstart_1660',['print_namespace_start',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a47aa1e9e08042a9c2bc4c5a0773fdf53',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_namespace_start()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af2490222aefa83d67238c605e05197a3',1,'nmodl::codegen::CodegenCppVisitor::print_namespace_start()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9749309d724cd1f4a47989c9d76c92c3',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_namespace_start()']]], ['print_5fnamespace_5fstop_1661',['print_namespace_stop',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aad6c90116002d10659c14c064bfa9aaa',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_namespace_stop()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1d253986a351e263db95bb63c51775c3',1,'nmodl::codegen::CodegenCppVisitor::print_namespace_stop()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa40457fee0fa38359bb1ef9487efd00e',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_namespace_stop()']]], - ['print_5fnet_5fevent_5fcall_1662',['print_net_event_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1e4f93d026816a7f27d710cf2a6235bb',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], + ['print_5fnet_5fevent_5fcall_1662',['print_net_event_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad964cdf59c0f6c54e92cd652f2ea8a02',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_event_call()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae350ed7effbbcf8dbea050231599c8e6',1,'nmodl::codegen::CodegenCppVisitor::print_net_event_call()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adf3ecfb21886bca7be8a882e2166a919',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_net_event_call()']]], ['print_5fnet_5finit_1663',['print_net_init',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4f3cf2cc2726db4de8edd19ef660f52b',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], ['print_5fnet_5finit_5facc_5fserial_5fannotation_5fblock_5fbegin_1664',['print_net_init_acc_serial_annotation_block_begin',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#a532e903a7bb7f8c3dfeac467f53e111d',1,'nmodl::codegen::CodegenAccVisitor::print_net_init_acc_serial_annotation_block_begin()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a656859e8b2ce968ed39db6e966c2338f',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_init_acc_serial_annotation_block_begin()']]], ['print_5fnet_5finit_5facc_5fserial_5fannotation_5fblock_5fend_1665',['print_net_init_acc_serial_annotation_block_end',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#a8fa54f732815ba17581f6a30e3f6ec47',1,'nmodl::codegen::CodegenAccVisitor::print_net_init_acc_serial_annotation_block_end()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afaaa9405b30312279aa8977c015ef1fa',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_init_acc_serial_annotation_block_end()']]], - ['print_5fnet_5fmove_5fcall_1666',['print_net_move_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2d1a1636e6662ed44ef6f6147abe78d4',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], + ['print_5fnet_5fmove_5fcall_1666',['print_net_move_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3516dd7938db6a28e1d5668a9c4aca25',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_move_call()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a36470f1359566ee071015a630deb89cd',1,'nmodl::codegen::CodegenCppVisitor::print_net_move_call()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af2f331ce244ac6fa94bbc94de9163fba',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_net_move_call()']]], ['print_5fnet_5freceive_1667',['print_net_receive',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a48e4c785bbae026d24044736fd6913c2',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], ['print_5fnet_5freceive_5farg_5fsize_5fgetter_1668',['print_net_receive_arg_size_getter',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac1fd31d8615b5b189349471a7ca23cee',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], ['print_5fnet_5freceive_5fbuffering_1669',['print_net_receive_buffering',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7cb383070a38db2f4015b982371ca1b',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], @@ -157,7 +157,7 @@ var searchData= ['print_5fnet_5fsend_5fbuffering_1677',['print_net_send_buffering',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a213e98f7c1ff3a0b9f07a6f3f3af3ee3',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], ['print_5fnet_5fsend_5fbuffering_5fcnt_5fupdate_1678',['print_net_send_buffering_cnt_update',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#a5c597e0695363715c394aa20e9be86c8',1,'nmodl::codegen::CodegenAccVisitor::print_net_send_buffering_cnt_update()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7be1a9429e5200afb286bbc3b4e4ba13',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_send_buffering_cnt_update()']]], ['print_5fnet_5fsend_5fbuffering_5fgrow_1679',['print_net_send_buffering_grow',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#a7b0b928aacf93947a478e2c37ba2f551',1,'nmodl::codegen::CodegenAccVisitor::print_net_send_buffering_grow()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab83b1dd02818a29abd3ad0cd4697a470',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_send_buffering_grow()']]], - ['print_5fnet_5fsend_5fcall_1680',['print_net_send_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a38b1b3d5e9e9a3cd6a679380dc4f9b61',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], + ['print_5fnet_5fsend_5fcall_1680',['print_net_send_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4d163cf837717e6f1bac43c1a492f456',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_send_call()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a78481115d7590930ac4d58d0bdaa2acc',1,'nmodl::codegen::CodegenCppVisitor::print_net_send_call()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adbf8216b0f67ec9e714bee6aa52e1e3f',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_net_send_call()']]], ['print_5fneuron_5fincludes_1681',['print_neuron_includes',['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a62669c86daa6bdd6c1e67e93461ad747',1,'nmodl::codegen::CodegenNeuronCppVisitor']]], ['print_5fnewtonspace_5ftransfer_5fto_5fdevice_1682',['print_newtonspace_transfer_to_device',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#a621a8824135ca3ca077dee6917e30943',1,'nmodl::codegen::CodegenAccVisitor::print_newtonspace_transfer_to_device()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1b43c39d762c18b8457ba45496726e24',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_newtonspace_transfer_to_device()']]], ['print_5fnmodl_5fconstants_1683',['print_nmodl_constants',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8cefcce52cd721b3869701367f456a71',1,'nmodl::codegen::CodegenCppVisitor']]], diff --git a/html/doxygen/search/functions_f.js b/html/doxygen/search/functions_f.js index 1a7d1c5f64..7007f45968 100644 --- a/html/doxygen/search/functions_f.js +++ b/html/doxygen/search/functions_f.js @@ -52,7 +52,7 @@ var searchData= ['print_5ffast_5fimem_5fcalculation_3943',['print_fast_imem_calculation',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#af58d26884131b0cc711887c549bc7957',1,'nmodl::codegen::CodegenAccVisitor::print_fast_imem_calculation()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6228949e87b0a9e14fe6886fc346e28c',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_fast_imem_calculation()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34492b32e18b9fbfd3ba01ba8ad85eb5',1,'nmodl::codegen::CodegenCppVisitor::print_fast_imem_calculation()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#abce8ff7e8bd0754c8d61066779b4e72f',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_fast_imem_calculation()']]], ['print_5ffirst_5fpointer_5fvar_5findex_5fgetter_3944',['print_first_pointer_var_index_getter',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6498ebb631852d55d7585ef179b3008e',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], ['print_5ffunction_3945',['print_function',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae47b27b3bfb2d9fa200b02f449c126e7',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_function()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4b9e335b7f968d36d9cd6bdfc34bba34',1,'nmodl::codegen::CodegenCppVisitor::print_function()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a8633f24f67f430477ff3bf4a0c6b36cb',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_function()']]], - ['print_5ffunction_5fcall_3946',['print_function_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7b24f3b0faf05f17c28e06b4981b55dd',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_function_call()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a43af5eef62e0e958d160b77fa1d6c099',1,'nmodl::codegen::CodegenCppVisitor::print_function_call()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3ef1a3189051f86fce9602c7b02b445a',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_function_call()']]], + ['print_5ffunction_5fcall_3946',['print_function_call',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad63b4318b5abd6b8c224fab70fe61081',1,'nmodl::codegen::CodegenCppVisitor']]], ['print_5ffunction_5fdeclaration_3947',['print_function_declaration',['../group__codegen__backends.html#gaebe64f7d52f5cb96d8c73c1619bddabf',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_function_declaration()'],['../group__codegen__backends.html#gabd283274182774ed39c08a0714842d43',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_function_declaration()']]], ['print_5ffunction_5for_5fprocedure_3948',['print_function_or_procedure',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab0d109b9d28587ba6cce93783a348d86',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_function_or_procedure()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3836bfe0a9610b9037a73ea727246e71',1,'nmodl::codegen::CodegenCppVisitor::print_function_or_procedure()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad635ed74eba5b2c3e0aee2e29ca1167a',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_function_or_procedure()']]], ['print_5ffunction_5fprocedure_5fhelper_3949',['print_function_procedure_helper',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5be32556e7bb7fd48b1bdb71d75fe5bb',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_function_procedure_helper()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aa017bbe95ad7539e72d182dac59f2454',1,'nmodl::codegen::CodegenCppVisitor::print_function_procedure_helper()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af6a5224b66dde062241120381b3cb8df',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_function_procedure_helper()']]], @@ -95,11 +95,11 @@ var searchData= ['print_5fnamespace_5fend_3986',['print_namespace_end',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aed50b0789d65ce89402dcf00e186f261',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_namespace_end()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2f0c1a7b9127c6248b03b296257e8833',1,'nmodl::codegen::CodegenCppVisitor::print_namespace_end()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a6abde0bb8aa4c6bd11cd15303295e9f9',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_namespace_end()']]], ['print_5fnamespace_5fstart_3987',['print_namespace_start',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a47aa1e9e08042a9c2bc4c5a0773fdf53',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_namespace_start()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af2490222aefa83d67238c605e05197a3',1,'nmodl::codegen::CodegenCppVisitor::print_namespace_start()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9749309d724cd1f4a47989c9d76c92c3',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_namespace_start()']]], ['print_5fnamespace_5fstop_3988',['print_namespace_stop',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aad6c90116002d10659c14c064bfa9aaa',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_namespace_stop()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1d253986a351e263db95bb63c51775c3',1,'nmodl::codegen::CodegenCppVisitor::print_namespace_stop()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa40457fee0fa38359bb1ef9487efd00e',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_namespace_stop()']]], - ['print_5fnet_5fevent_5fcall_3989',['print_net_event_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1e4f93d026816a7f27d710cf2a6235bb',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], + ['print_5fnet_5fevent_5fcall_3989',['print_net_event_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad964cdf59c0f6c54e92cd652f2ea8a02',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_event_call()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae350ed7effbbcf8dbea050231599c8e6',1,'nmodl::codegen::CodegenCppVisitor::print_net_event_call()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adf3ecfb21886bca7be8a882e2166a919',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_net_event_call()']]], ['print_5fnet_5finit_3990',['print_net_init',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4f3cf2cc2726db4de8edd19ef660f52b',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], ['print_5fnet_5finit_5facc_5fserial_5fannotation_5fblock_5fbegin_3991',['print_net_init_acc_serial_annotation_block_begin',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#a532e903a7bb7f8c3dfeac467f53e111d',1,'nmodl::codegen::CodegenAccVisitor::print_net_init_acc_serial_annotation_block_begin()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a656859e8b2ce968ed39db6e966c2338f',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_init_acc_serial_annotation_block_begin()']]], ['print_5fnet_5finit_5facc_5fserial_5fannotation_5fblock_5fend_3992',['print_net_init_acc_serial_annotation_block_end',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#a8fa54f732815ba17581f6a30e3f6ec47',1,'nmodl::codegen::CodegenAccVisitor::print_net_init_acc_serial_annotation_block_end()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afaaa9405b30312279aa8977c015ef1fa',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_init_acc_serial_annotation_block_end()']]], - ['print_5fnet_5fmove_5fcall_3993',['print_net_move_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2d1a1636e6662ed44ef6f6147abe78d4',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], + ['print_5fnet_5fmove_5fcall_3993',['print_net_move_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3516dd7938db6a28e1d5668a9c4aca25',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_move_call()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a36470f1359566ee071015a630deb89cd',1,'nmodl::codegen::CodegenCppVisitor::print_net_move_call()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af2f331ce244ac6fa94bbc94de9163fba',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_net_move_call()']]], ['print_5fnet_5freceive_3994',['print_net_receive',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a48e4c785bbae026d24044736fd6913c2',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], ['print_5fnet_5freceive_5farg_5fsize_5fgetter_3995',['print_net_receive_arg_size_getter',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac1fd31d8615b5b189349471a7ca23cee',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], ['print_5fnet_5freceive_5fbuffering_3996',['print_net_receive_buffering',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7cb383070a38db2f4015b982371ca1b',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], @@ -113,7 +113,7 @@ var searchData= ['print_5fnet_5fsend_5fbuffering_4004',['print_net_send_buffering',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a213e98f7c1ff3a0b9f07a6f3f3af3ee3',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], ['print_5fnet_5fsend_5fbuffering_5fcnt_5fupdate_4005',['print_net_send_buffering_cnt_update',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#a5c597e0695363715c394aa20e9be86c8',1,'nmodl::codegen::CodegenAccVisitor::print_net_send_buffering_cnt_update()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7be1a9429e5200afb286bbc3b4e4ba13',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_send_buffering_cnt_update()']]], ['print_5fnet_5fsend_5fbuffering_5fgrow_4006',['print_net_send_buffering_grow',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#a7b0b928aacf93947a478e2c37ba2f551',1,'nmodl::codegen::CodegenAccVisitor::print_net_send_buffering_grow()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab83b1dd02818a29abd3ad0cd4697a470',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_send_buffering_grow()']]], - ['print_5fnet_5fsend_5fcall_4007',['print_net_send_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a38b1b3d5e9e9a3cd6a679380dc4f9b61',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], + ['print_5fnet_5fsend_5fcall_4007',['print_net_send_call',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4d163cf837717e6f1bac43c1a492f456',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_net_send_call()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a78481115d7590930ac4d58d0bdaa2acc',1,'nmodl::codegen::CodegenCppVisitor::print_net_send_call()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adbf8216b0f67ec9e714bee6aa52e1e3f',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_net_send_call()']]], ['print_5fneuron_5fincludes_4008',['print_neuron_includes',['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a62669c86daa6bdd6c1e67e93461ad747',1,'nmodl::codegen::CodegenNeuronCppVisitor']]], ['print_5fnewtonspace_5ftransfer_5fto_5fdevice_4009',['print_newtonspace_transfer_to_device',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#a621a8824135ca3ca077dee6917e30943',1,'nmodl::codegen::CodegenAccVisitor::print_newtonspace_transfer_to_device()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1b43c39d762c18b8457ba45496726e24',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_newtonspace_transfer_to_device()']]], ['print_5fnmodl_5fconstants_4010',['print_nmodl_constants',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8cefcce52cd721b3869701367f456a71',1,'nmodl::codegen::CodegenCppVisitor']]], diff --git a/html/doxygen/src_2codegen_2codegen__coreneuron__cpp__visitor_8cpp_source.html b/html/doxygen/src_2codegen_2codegen__coreneuron__cpp__visitor_8cpp_source.html index ec7c481f9f..00ca74303e 100644 --- a/html/doxygen/src_2codegen_2codegen__coreneuron__cpp__visitor_8cpp_source.html +++ b/html/doxygen/src_2codegen_2codegen__coreneuron__cpp__visitor_8cpp_source.html @@ -603,3455 +603,3420 @@
                            507 /****************************************************************************************/
                            508 
                            509 
                            - -
                            511  const auto& name = node.get_node_name();
                            -
                            512  auto function_name = name;
                            -
                            513  if (defined_method(name)) {
                            -
                            514  function_name = method_name(name);
                            -
                            515  }
                            -
                            516 
                            -
                            517  if (is_net_send(name)) {
                            -
                            518  print_net_send_call(node);
                            -
                            519  return;
                            -
                            520  }
                            -
                            521 
                            -
                            522  if (is_net_move(name)) {
                            -
                            523  print_net_move_call(node);
                            -
                            524  return;
                            -
                            525  }
                            -
                            526 
                            -
                            527  if (is_net_event(name)) {
                            -
                            528  print_net_event_call(node);
                            -
                            529  return;
                            -
                            530  }
                            -
                            531 
                            -
                            532  const auto& arguments = node.get_arguments();
                            -
                            533  printer->add_text(function_name, '(');
                            -
                            534 
                            -
                            535  if (defined_method(name)) {
                            -
                            536  printer->add_text(internal_method_arguments());
                            -
                            537  if (!arguments.empty()) {
                            -
                            538  printer->add_text(", ");
                            -
                            539  }
                            -
                            540  }
                            -
                            541 
                            -
                            542  print_vector_elements(arguments, ", ");
                            -
                            543  printer->add_text(')');
                            -
                            544 }
                            -
                            545 
                            -
                            546 
                            - -
                            548  if (info.top_verbatim_blocks.empty()) {
                            -
                            549  return;
                            -
                            550  }
                            -
                            551  print_namespace_stop();
                            + +
                            511  if (info.top_verbatim_blocks.empty()) {
                            +
                            512  return;
                            +
                            513  }
                            +
                            514  print_namespace_stop();
                            +
                            515 
                            +
                            516  printer->add_newline(2);
                            +
                            517  printer->add_line("using namespace coreneuron;");
                            +
                            518  codegen = true;
                            +
                            519  printing_top_verbatim_blocks = true;
                            +
                            520 
                            +
                            521  for (const auto& block: info.top_blocks) {
                            +
                            522  if (block->is_verbatim()) {
                            +
                            523  printer->add_newline(2);
                            +
                            524  block->accept(*this);
                            +
                            525  }
                            +
                            526  }
                            +
                            527 
                            +
                            528  printing_top_verbatim_blocks = false;
                            +
                            529  codegen = false;
                            +
                            530  print_namespace_start();
                            +
                            531 }
                            +
                            532 
                            +
                            533 
                            + +
                            535  if (info.functions.empty() && info.procedures.empty()) {
                            +
                            536  return;
                            +
                            537  }
                            +
                            538  codegen = true;
                            +
                            539  printer->add_newline(2);
                            +
                            540  for (const auto& node: info.functions) {
                            +
                            541  print_function_declaration(*node, node->get_node_name());
                            +
                            542  printer->add_text(';');
                            +
                            543  printer->add_newline();
                            +
                            544  }
                            +
                            545  for (const auto& node: info.procedures) {
                            +
                            546  print_function_declaration(*node, node->get_node_name());
                            +
                            547  printer->add_text(';');
                            +
                            548  printer->add_newline();
                            +
                            549  }
                            +
                            550  codegen = false;
                            +
                            551 }
                            552 
                            -
                            553  printer->add_newline(2);
                            -
                            554  printer->add_line("using namespace coreneuron;");
                            -
                            555  codegen = true;
                            -
                            556  printing_top_verbatim_blocks = true;
                            -
                            557 
                            -
                            558  for (const auto& block: info.top_blocks) {
                            -
                            559  if (block->is_verbatim()) {
                            -
                            560  printer->add_newline(2);
                            -
                            561  block->accept(*this);
                            -
                            562  }
                            -
                            563  }
                            -
                            564 
                            -
                            565  printing_top_verbatim_blocks = false;
                            -
                            566  codegen = false;
                            -
                            567  print_namespace_start();
                            -
                            568 }
                            -
                            569 
                            -
                            570 
                            - -
                            572  if (info.functions.empty() && info.procedures.empty()) {
                            -
                            573  return;
                            +
                            553 
                            +
                            554 static const TableStatement* get_table_statement(const ast::Block& node) {
                            +
                            555  // TableStatementVisitor v;
                            +
                            556 
                            +
                            557  const auto& table_statements = collect_nodes(node, {AstNodeType::TABLE_STATEMENT});
                            +
                            558 
                            +
                            559  if (table_statements.size() != 1) {
                            +
                            560  auto message = fmt::format("One table statement expected in {} found {}",
                            +
                            561  node.get_node_name(),
                            +
                            562  table_statements.size());
                            +
                            563  throw std::runtime_error(message);
                            +
                            564  }
                            +
                            565  return dynamic_cast<const TableStatement*>(table_statements.front().get());
                            +
                            566 }
                            +
                            567 
                            +
                            568 
                            +
                            569 std::tuple<bool, int> CodegenCoreneuronCppVisitor::check_if_var_is_array(const std::string& name) {
                            +
                            570  auto symbol = program_symtab->lookup_in_scope(name);
                            +
                            571  if (!symbol) {
                            +
                            572  throw std::runtime_error(
                            +
                            573  fmt::format("CodegenCoreneuronCppVisitor:: {} not found in symbol table!", name));
                            574  }
                            -
                            575  codegen = true;
                            -
                            576  printer->add_newline(2);
                            -
                            577  for (const auto& node: info.functions) {
                            -
                            578  print_function_declaration(*node, node->get_node_name());
                            -
                            579  printer->add_text(';');
                            -
                            580  printer->add_newline();
                            -
                            581  }
                            -
                            582  for (const auto& node: info.procedures) {
                            -
                            583  print_function_declaration(*node, node->get_node_name());
                            -
                            584  printer->add_text(';');
                            -
                            585  printer->add_newline();
                            -
                            586  }
                            -
                            587  codegen = false;
                            -
                            588 }
                            -
                            589 
                            -
                            590 
                            -
                            591 static const TableStatement* get_table_statement(const ast::Block& node) {
                            -
                            592  // TableStatementVisitor v;
                            -
                            593 
                            -
                            594  const auto& table_statements = collect_nodes(node, {AstNodeType::TABLE_STATEMENT});
                            -
                            595 
                            -
                            596  if (table_statements.size() != 1) {
                            -
                            597  auto message = fmt::format("One table statement expected in {} found {}",
                            -
                            598  node.get_node_name(),
                            -
                            599  table_statements.size());
                            -
                            600  throw std::runtime_error(message);
                            -
                            601  }
                            -
                            602  return dynamic_cast<const TableStatement*>(table_statements.front().get());
                            -
                            603 }
                            -
                            604 
                            -
                            605 
                            -
                            606 std::tuple<bool, int> CodegenCoreneuronCppVisitor::check_if_var_is_array(const std::string& name) {
                            -
                            607  auto symbol = program_symtab->lookup_in_scope(name);
                            -
                            608  if (!symbol) {
                            -
                            609  throw std::runtime_error(
                            -
                            610  fmt::format("CodegenCoreneuronCppVisitor:: {} not found in symbol table!", name));
                            -
                            611  }
                            -
                            612  if (symbol->is_array()) {
                            -
                            613  return {true, symbol->get_length()};
                            -
                            614  } else {
                            -
                            615  return {false, 0};
                            -
                            616  }
                            -
                            617 }
                            -
                            618 
                            +
                            575  if (symbol->is_array()) {
                            +
                            576  return {true, symbol->get_length()};
                            +
                            577  } else {
                            +
                            578  return {false, 0};
                            +
                            579  }
                            +
                            580 }
                            +
                            581 
                            +
                            582 
                            + +
                            584  auto statement = get_table_statement(node);
                            +
                            585  auto table_variables = statement->get_table_vars();
                            +
                            586  auto depend_variables = statement->get_depend_vars();
                            +
                            587  const auto& from = statement->get_from();
                            +
                            588  const auto& to = statement->get_to();
                            +
                            589  auto name = node.get_node_name();
                            +
                            590  auto internal_params = internal_method_parameters();
                            +
                            591  auto with = statement->get_with()->eval();
                            +
                            592  auto use_table_var = get_variable_name(naming::USE_TABLE_VARIABLE);
                            +
                            593  auto tmin_name = get_variable_name("tmin_" + name);
                            +
                            594  auto mfac_name = get_variable_name("mfac_" + name);
                            +
                            595  auto float_type = default_float_data_type();
                            +
                            596 
                            +
                            597  printer->add_newline(2);
                            +
                            598  print_device_method_annotation();
                            +
                            599  printer->fmt_push_block("void check_{}({})",
                            +
                            600  method_name(name),
                            +
                            601  get_parameter_str(internal_params));
                            +
                            602  {
                            +
                            603  printer->fmt_push_block("if ({} == 0)", use_table_var);
                            +
                            604  printer->add_line("return;");
                            +
                            605  printer->pop_block();
                            +
                            606 
                            +
                            607  printer->add_line("static bool make_table = true;");
                            +
                            608  for (const auto& variable: depend_variables) {
                            +
                            609  printer->fmt_line("static {} save_{};", float_type, variable->get_node_name());
                            +
                            610  }
                            +
                            611 
                            +
                            612  for (const auto& variable: depend_variables) {
                            +
                            613  const auto& var_name = variable->get_node_name();
                            +
                            614  const auto& instance_name = get_variable_name(var_name);
                            +
                            615  printer->fmt_push_block("if (save_{} != {})", var_name, instance_name);
                            +
                            616  printer->add_line("make_table = true;");
                            +
                            617  printer->pop_block();
                            +
                            618  }
                            619 
                            - -
                            621  auto statement = get_table_statement(node);
                            -
                            622  auto table_variables = statement->get_table_vars();
                            -
                            623  auto depend_variables = statement->get_depend_vars();
                            -
                            624  const auto& from = statement->get_from();
                            -
                            625  const auto& to = statement->get_to();
                            -
                            626  auto name = node.get_node_name();
                            -
                            627  auto internal_params = internal_method_parameters();
                            -
                            628  auto with = statement->get_with()->eval();
                            -
                            629  auto use_table_var = get_variable_name(naming::USE_TABLE_VARIABLE);
                            -
                            630  auto tmin_name = get_variable_name("tmin_" + name);
                            -
                            631  auto mfac_name = get_variable_name("mfac_" + name);
                            -
                            632  auto float_type = default_float_data_type();
                            -
                            633 
                            -
                            634  printer->add_newline(2);
                            -
                            635  print_device_method_annotation();
                            -
                            636  printer->fmt_push_block("void check_{}({})",
                            -
                            637  method_name(name),
                            -
                            638  get_parameter_str(internal_params));
                            -
                            639  {
                            -
                            640  printer->fmt_push_block("if ({} == 0)", use_table_var);
                            -
                            641  printer->add_line("return;");
                            -
                            642  printer->pop_block();
                            -
                            643 
                            -
                            644  printer->add_line("static bool make_table = true;");
                            -
                            645  for (const auto& variable: depend_variables) {
                            -
                            646  printer->fmt_line("static {} save_{};", float_type, variable->get_node_name());
                            -
                            647  }
                            -
                            648 
                            -
                            649  for (const auto& variable: depend_variables) {
                            -
                            650  const auto& var_name = variable->get_node_name();
                            -
                            651  const auto& instance_name = get_variable_name(var_name);
                            -
                            652  printer->fmt_push_block("if (save_{} != {})", var_name, instance_name);
                            -
                            653  printer->add_line("make_table = true;");
                            -
                            654  printer->pop_block();
                            -
                            655  }
                            -
                            656 
                            -
                            657  printer->push_block("if (make_table)");
                            -
                            658  {
                            -
                            659  printer->add_line("make_table = false;");
                            -
                            660 
                            -
                            661  printer->add_indent();
                            -
                            662  printer->add_text(tmin_name, " = ");
                            -
                            663  from->accept(*this);
                            -
                            664  printer->add_text(';');
                            -
                            665  printer->add_newline();
                            -
                            666 
                            -
                            667  printer->add_indent();
                            -
                            668  printer->add_text("double tmax = ");
                            -
                            669  to->accept(*this);
                            -
                            670  printer->add_text(';');
                            -
                            671  printer->add_newline();
                            -
                            672 
                            -
                            673 
                            -
                            674  printer->fmt_line("double dx = (tmax-{}) / {}.;", tmin_name, with);
                            -
                            675  printer->fmt_line("{} = 1./dx;", mfac_name);
                            -
                            676 
                            -
                            677  printer->fmt_line("double x = {};", tmin_name);
                            -
                            678  printer->fmt_push_block("for (std::size_t i = 0; i < {}; x += dx, i++)", with + 1);
                            -
                            679  auto function = method_name("f_" + name);
                            -
                            680  if (node.is_procedure_block()) {
                            -
                            681  printer->fmt_line("{}({}, x);", function, internal_method_arguments());
                            -
                            682  for (const auto& variable: table_variables) {
                            -
                            683  auto var_name = variable->get_node_name();
                            -
                            684  auto instance_name = get_variable_name(var_name);
                            -
                            685  auto table_name = get_variable_name("t_" + var_name);
                            -
                            686  auto [is_array, array_length] = check_if_var_is_array(var_name);
                            -
                            687  if (is_array) {
                            -
                            688  for (int j = 0; j < array_length; j++) {
                            -
                            689  printer->fmt_line(
                            -
                            690  "{}[{}][i] = {}[{}];", table_name, j, instance_name, j);
                            -
                            691  }
                            -
                            692  } else {
                            -
                            693  printer->fmt_line("{}[i] = {};", table_name, instance_name);
                            -
                            694  }
                            -
                            695  }
                            -
                            696  } else {
                            -
                            697  auto table_name = get_variable_name("t_" + name);
                            -
                            698  printer->fmt_line("{}[i] = {}({}, x);",
                            -
                            699  table_name,
                            -
                            700  function,
                            -
                            701  internal_method_arguments());
                            -
                            702  }
                            -
                            703  printer->pop_block();
                            -
                            704 
                            -
                            705  for (const auto& variable: depend_variables) {
                            -
                            706  auto var_name = variable->get_node_name();
                            -
                            707  auto instance_name = get_variable_name(var_name);
                            -
                            708  printer->fmt_line("save_{} = {};", var_name, instance_name);
                            -
                            709  }
                            -
                            710  }
                            -
                            711  printer->pop_block();
                            -
                            712  }
                            -
                            713  printer->pop_block();
                            -
                            714 }
                            -
                            715 
                            -
                            716 
                            - -
                            718  auto name = node.get_node_name();
                            -
                            719  auto statement = get_table_statement(node);
                            -
                            720  auto table_variables = statement->get_table_vars();
                            -
                            721  auto with = statement->get_with()->eval();
                            -
                            722  auto use_table_var = get_variable_name(naming::USE_TABLE_VARIABLE);
                            -
                            723  auto tmin_name = get_variable_name("tmin_" + name);
                            -
                            724  auto mfac_name = get_variable_name("mfac_" + name);
                            -
                            725  auto function_name = method_name("f_" + name);
                            -
                            726 
                            -
                            727  printer->add_newline(2);
                            -
                            728  print_function_declaration(node, name);
                            -
                            729  printer->push_block();
                            -
                            730  {
                            -
                            731  const auto& params = node.get_parameters();
                            -
                            732  printer->fmt_push_block("if ({} == 0)", use_table_var);
                            -
                            733  if (node.is_procedure_block()) {
                            -
                            734  printer->fmt_line("{}({}, {});",
                            -
                            735  function_name,
                            -
                            736  internal_method_arguments(),
                            -
                            737  params[0].get()->get_node_name());
                            -
                            738  printer->add_line("return 0;");
                            -
                            739  } else {
                            -
                            740  printer->fmt_line("return {}({}, {});",
                            -
                            741  function_name,
                            -
                            742  internal_method_arguments(),
                            -
                            743  params[0].get()->get_node_name());
                            -
                            744  }
                            -
                            745  printer->pop_block();
                            -
                            746 
                            -
                            747  printer->fmt_line("double xi = {} * ({} - {});",
                            -
                            748  mfac_name,
                            -
                            749  params[0].get()->get_node_name(),
                            -
                            750  tmin_name);
                            -
                            751  printer->push_block("if (isnan(xi))");
                            -
                            752  if (node.is_procedure_block()) {
                            -
                            753  for (const auto& var: table_variables) {
                            -
                            754  auto var_name = get_variable_name(var->get_node_name());
                            -
                            755  auto [is_array, array_length] = check_if_var_is_array(var->get_node_name());
                            -
                            756  if (is_array) {
                            -
                            757  for (int j = 0; j < array_length; j++) {
                            -
                            758  printer->fmt_line("{}[{}] = xi;", var_name, j);
                            -
                            759  }
                            -
                            760  } else {
                            -
                            761  printer->fmt_line("{} = xi;", var_name);
                            -
                            762  }
                            -
                            763  }
                            -
                            764  printer->add_line("return 0;");
                            -
                            765  } else {
                            -
                            766  printer->add_line("return xi;");
                            -
                            767  }
                            -
                            768  printer->pop_block();
                            -
                            769 
                            -
                            770  printer->fmt_push_block("if (xi <= 0. || xi >= {}.)", with);
                            -
                            771  printer->fmt_line("int index = (xi <= 0.) ? 0 : {};", with);
                            -
                            772  if (node.is_procedure_block()) {
                            -
                            773  for (const auto& variable: table_variables) {
                            -
                            774  auto var_name = variable->get_node_name();
                            -
                            775  auto instance_name = get_variable_name(var_name);
                            -
                            776  auto table_name = get_variable_name("t_" + var_name);
                            -
                            777  auto [is_array, array_length] = check_if_var_is_array(var_name);
                            -
                            778  if (is_array) {
                            -
                            779  for (int j = 0; j < array_length; j++) {
                            -
                            780  printer->fmt_line(
                            -
                            781  "{}[{}] = {}[{}][index];", instance_name, j, table_name, j);
                            -
                            782  }
                            -
                            783  } else {
                            -
                            784  printer->fmt_line("{} = {}[index];", instance_name, table_name);
                            -
                            785  }
                            -
                            786  }
                            -
                            787  printer->add_line("return 0;");
                            -
                            788  } else {
                            -
                            789  auto table_name = get_variable_name("t_" + name);
                            -
                            790  printer->fmt_line("return {}[index];", table_name);
                            -
                            791  }
                            -
                            792  printer->pop_block();
                            +
                            620  printer->push_block("if (make_table)");
                            +
                            621  {
                            +
                            622  printer->add_line("make_table = false;");
                            +
                            623 
                            +
                            624  printer->add_indent();
                            +
                            625  printer->add_text(tmin_name, " = ");
                            +
                            626  from->accept(*this);
                            +
                            627  printer->add_text(';');
                            +
                            628  printer->add_newline();
                            +
                            629 
                            +
                            630  printer->add_indent();
                            +
                            631  printer->add_text("double tmax = ");
                            +
                            632  to->accept(*this);
                            +
                            633  printer->add_text(';');
                            +
                            634  printer->add_newline();
                            +
                            635 
                            +
                            636 
                            +
                            637  printer->fmt_line("double dx = (tmax-{}) / {}.;", tmin_name, with);
                            +
                            638  printer->fmt_line("{} = 1./dx;", mfac_name);
                            +
                            639 
                            +
                            640  printer->fmt_line("double x = {};", tmin_name);
                            +
                            641  printer->fmt_push_block("for (std::size_t i = 0; i < {}; x += dx, i++)", with + 1);
                            +
                            642  auto function = method_name("f_" + name);
                            +
                            643  if (node.is_procedure_block()) {
                            +
                            644  printer->fmt_line("{}({}, x);", function, internal_method_arguments());
                            +
                            645  for (const auto& variable: table_variables) {
                            +
                            646  auto var_name = variable->get_node_name();
                            +
                            647  auto instance_name = get_variable_name(var_name);
                            +
                            648  auto table_name = get_variable_name("t_" + var_name);
                            +
                            649  auto [is_array, array_length] = check_if_var_is_array(var_name);
                            +
                            650  if (is_array) {
                            +
                            651  for (int j = 0; j < array_length; j++) {
                            +
                            652  printer->fmt_line(
                            +
                            653  "{}[{}][i] = {}[{}];", table_name, j, instance_name, j);
                            +
                            654  }
                            +
                            655  } else {
                            +
                            656  printer->fmt_line("{}[i] = {};", table_name, instance_name);
                            +
                            657  }
                            +
                            658  }
                            +
                            659  } else {
                            +
                            660  auto table_name = get_variable_name("t_" + name);
                            +
                            661  printer->fmt_line("{}[i] = {}({}, x);",
                            +
                            662  table_name,
                            +
                            663  function,
                            +
                            664  internal_method_arguments());
                            +
                            665  }
                            +
                            666  printer->pop_block();
                            +
                            667 
                            +
                            668  for (const auto& variable: depend_variables) {
                            +
                            669  auto var_name = variable->get_node_name();
                            +
                            670  auto instance_name = get_variable_name(var_name);
                            +
                            671  printer->fmt_line("save_{} = {};", var_name, instance_name);
                            +
                            672  }
                            +
                            673  }
                            +
                            674  printer->pop_block();
                            +
                            675  }
                            +
                            676  printer->pop_block();
                            +
                            677 }
                            +
                            678 
                            +
                            679 
                            + +
                            681  auto name = node.get_node_name();
                            +
                            682  auto statement = get_table_statement(node);
                            +
                            683  auto table_variables = statement->get_table_vars();
                            +
                            684  auto with = statement->get_with()->eval();
                            +
                            685  auto use_table_var = get_variable_name(naming::USE_TABLE_VARIABLE);
                            +
                            686  auto tmin_name = get_variable_name("tmin_" + name);
                            +
                            687  auto mfac_name = get_variable_name("mfac_" + name);
                            +
                            688  auto function_name = method_name("f_" + name);
                            +
                            689 
                            +
                            690  printer->add_newline(2);
                            +
                            691  print_function_declaration(node, name);
                            +
                            692  printer->push_block();
                            +
                            693  {
                            +
                            694  const auto& params = node.get_parameters();
                            +
                            695  printer->fmt_push_block("if ({} == 0)", use_table_var);
                            +
                            696  if (node.is_procedure_block()) {
                            +
                            697  printer->fmt_line("{}({}, {});",
                            +
                            698  function_name,
                            +
                            699  internal_method_arguments(),
                            +
                            700  params[0].get()->get_node_name());
                            +
                            701  printer->add_line("return 0;");
                            +
                            702  } else {
                            +
                            703  printer->fmt_line("return {}({}, {});",
                            +
                            704  function_name,
                            +
                            705  internal_method_arguments(),
                            +
                            706  params[0].get()->get_node_name());
                            +
                            707  }
                            +
                            708  printer->pop_block();
                            +
                            709 
                            +
                            710  printer->fmt_line("double xi = {} * ({} - {});",
                            +
                            711  mfac_name,
                            +
                            712  params[0].get()->get_node_name(),
                            +
                            713  tmin_name);
                            +
                            714  printer->push_block("if (isnan(xi))");
                            +
                            715  if (node.is_procedure_block()) {
                            +
                            716  for (const auto& var: table_variables) {
                            +
                            717  auto var_name = get_variable_name(var->get_node_name());
                            +
                            718  auto [is_array, array_length] = check_if_var_is_array(var->get_node_name());
                            +
                            719  if (is_array) {
                            +
                            720  for (int j = 0; j < array_length; j++) {
                            +
                            721  printer->fmt_line("{}[{}] = xi;", var_name, j);
                            +
                            722  }
                            +
                            723  } else {
                            +
                            724  printer->fmt_line("{} = xi;", var_name);
                            +
                            725  }
                            +
                            726  }
                            +
                            727  printer->add_line("return 0;");
                            +
                            728  } else {
                            +
                            729  printer->add_line("return xi;");
                            +
                            730  }
                            +
                            731  printer->pop_block();
                            +
                            732 
                            +
                            733  printer->fmt_push_block("if (xi <= 0. || xi >= {}.)", with);
                            +
                            734  printer->fmt_line("int index = (xi <= 0.) ? 0 : {};", with);
                            +
                            735  if (node.is_procedure_block()) {
                            +
                            736  for (const auto& variable: table_variables) {
                            +
                            737  auto var_name = variable->get_node_name();
                            +
                            738  auto instance_name = get_variable_name(var_name);
                            +
                            739  auto table_name = get_variable_name("t_" + var_name);
                            +
                            740  auto [is_array, array_length] = check_if_var_is_array(var_name);
                            +
                            741  if (is_array) {
                            +
                            742  for (int j = 0; j < array_length; j++) {
                            +
                            743  printer->fmt_line(
                            +
                            744  "{}[{}] = {}[{}][index];", instance_name, j, table_name, j);
                            +
                            745  }
                            +
                            746  } else {
                            +
                            747  printer->fmt_line("{} = {}[index];", instance_name, table_name);
                            +
                            748  }
                            +
                            749  }
                            +
                            750  printer->add_line("return 0;");
                            +
                            751  } else {
                            +
                            752  auto table_name = get_variable_name("t_" + name);
                            +
                            753  printer->fmt_line("return {}[index];", table_name);
                            +
                            754  }
                            +
                            755  printer->pop_block();
                            +
                            756 
                            +
                            757  printer->add_line("int i = int(xi);");
                            +
                            758  printer->add_line("double theta = xi - double(i);");
                            +
                            759  if (node.is_procedure_block()) {
                            +
                            760  for (const auto& var: table_variables) {
                            +
                            761  auto var_name = var->get_node_name();
                            +
                            762  auto instance_name = get_variable_name(var_name);
                            +
                            763  auto table_name = get_variable_name("t_" + var_name);
                            +
                            764  auto [is_array, array_length] = check_if_var_is_array(var->get_node_name());
                            +
                            765  if (is_array) {
                            +
                            766  for (size_t j = 0; j < array_length; j++) {
                            +
                            767  printer->fmt_line(
                            +
                            768  "{0}[{1}] = {2}[{1}][i] + theta*({2}[{1}][i+1]-{2}[{1}][i]);",
                            +
                            769  instance_name,
                            +
                            770  j,
                            +
                            771  table_name);
                            +
                            772  }
                            +
                            773  } else {
                            +
                            774  printer->fmt_line("{0} = {1}[i] + theta*({1}[i+1]-{1}[i]);",
                            +
                            775  instance_name,
                            +
                            776  table_name);
                            +
                            777  }
                            +
                            778  }
                            +
                            779  printer->add_line("return 0;");
                            +
                            780  } else {
                            +
                            781  auto table_name = get_variable_name("t_" + name);
                            +
                            782  printer->fmt_line("return {0}[i] + theta * ({0}[i+1] - {0}[i]);", table_name);
                            +
                            783  }
                            +
                            784  }
                            +
                            785  printer->pop_block();
                            +
                            786 }
                            +
                            787 
                            +
                            788 
                            + +
                            790  if (info.table_count == 0) {
                            +
                            791  return;
                            +
                            792  }
                            793 
                            -
                            794  printer->add_line("int i = int(xi);");
                            -
                            795  printer->add_line("double theta = xi - double(i);");
                            -
                            796  if (node.is_procedure_block()) {
                            -
                            797  for (const auto& var: table_variables) {
                            -
                            798  auto var_name = var->get_node_name();
                            -
                            799  auto instance_name = get_variable_name(var_name);
                            -
                            800  auto table_name = get_variable_name("t_" + var_name);
                            -
                            801  auto [is_array, array_length] = check_if_var_is_array(var->get_node_name());
                            -
                            802  if (is_array) {
                            -
                            803  for (size_t j = 0; j < array_length; j++) {
                            -
                            804  printer->fmt_line(
                            -
                            805  "{0}[{1}] = {2}[{1}][i] + theta*({2}[{1}][i+1]-{2}[{1}][i]);",
                            -
                            806  instance_name,
                            -
                            807  j,
                            -
                            808  table_name);
                            -
                            809  }
                            -
                            810  } else {
                            -
                            811  printer->fmt_line("{0} = {1}[i] + theta*({1}[i+1]-{1}[i]);",
                            -
                            812  instance_name,
                            -
                            813  table_name);
                            -
                            814  }
                            -
                            815  }
                            -
                            816  printer->add_line("return 0;");
                            -
                            817  } else {
                            -
                            818  auto table_name = get_variable_name("t_" + name);
                            -
                            819  printer->fmt_line("return {0}[i] + theta * ({0}[i+1] - {0}[i]);", table_name);
                            -
                            820  }
                            -
                            821  }
                            -
                            822  printer->pop_block();
                            -
                            823 }
                            -
                            824 
                            -
                            825 
                            - -
                            827  if (info.table_count == 0) {
                            -
                            828  return;
                            -
                            829  }
                            -
                            830 
                            -
                            831  printer->add_newline(2);
                            -
                            832  auto name = method_name("check_table_thread");
                            -
                            833  auto parameters = external_method_parameters(true);
                            -
                            834 
                            -
                            835  printer->fmt_push_block("static void {} ({})", name, parameters);
                            -
                            836  printer->add_line("setup_instance(nt, ml);");
                            -
                            837  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                            -
                            838  printer->add_line("double v = 0;");
                            -
                            839 
                            -
                            840  for (const auto& function: info.functions_with_table) {
                            -
                            841  auto method_name_str = method_name("check_" + function->get_node_name());
                            -
                            842  auto arguments = internal_method_arguments();
                            -
                            843  printer->fmt_line("{}({});", method_name_str, arguments);
                            -
                            844  }
                            -
                            845 
                            -
                            846  printer->pop_block();
                            -
                            847 }
                            -
                            848 
                            +
                            794  printer->add_newline(2);
                            +
                            795  auto name = method_name("check_table_thread");
                            +
                            796  auto parameters = external_method_parameters(true);
                            +
                            797 
                            +
                            798  printer->fmt_push_block("static void {} ({})", name, parameters);
                            +
                            799  printer->add_line("setup_instance(nt, ml);");
                            +
                            800  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                            +
                            801  printer->add_line("double v = 0;");
                            +
                            802 
                            +
                            803  for (const auto& function: info.functions_with_table) {
                            +
                            804  auto method_name_str = method_name("check_" + function->get_node_name());
                            +
                            805  auto arguments = internal_method_arguments();
                            +
                            806  printer->fmt_line("{}({});", method_name_str, arguments);
                            +
                            807  }
                            +
                            808 
                            +
                            809  printer->pop_block();
                            +
                            810 }
                            +
                            811 
                            +
                            812 
                            + +
                            814  const std::string& name) {
                            +
                            815  printer->add_newline(2);
                            +
                            816  print_function_declaration(node, name);
                            +
                            817  printer->add_text(" ");
                            +
                            818  printer->push_block();
                            +
                            819 
                            +
                            820  // function requires return variable declaration
                            +
                            821  if (node.is_function_block()) {
                            +
                            822  auto type = default_float_data_type();
                            +
                            823  printer->fmt_line("{} ret_{} = 0.0;", type, name);
                            +
                            824  } else {
                            +
                            825  printer->fmt_line("int ret_{} = 0;", name);
                            +
                            826  }
                            +
                            827 
                            +
                            828  print_statement_block(*node.get_statement_block(), false, false);
                            +
                            829  printer->fmt_line("return ret_{};", name);
                            +
                            830  printer->pop_block();
                            +
                            831 }
                            +
                            832 
                            +
                            833 
                            + +
                            835  codegen = true;
                            +
                            836  auto name = node.get_node_name();
                            +
                            837 
                            +
                            838  if (info.function_uses_table(name)) {
                            +
                            839  auto new_name = "f_" + name;
                            +
                            840  print_function_or_procedure(node, new_name);
                            +
                            841  print_table_check_function(node);
                            +
                            842  print_table_replacement_function(node);
                            +
                            843  } else {
                            +
                            844  print_function_or_procedure(node, name);
                            +
                            845  }
                            +
                            846 
                            +
                            847  codegen = false;
                            +
                            848 }
                            849 
                            - -
                            851  const std::string& name) {
                            -
                            852  printer->add_newline(2);
                            -
                            853  print_function_declaration(node, name);
                            -
                            854  printer->add_text(" ");
                            -
                            855  printer->push_block();
                            -
                            856 
                            -
                            857  // function requires return variable declaration
                            -
                            858  if (node.is_function_block()) {
                            -
                            859  auto type = default_float_data_type();
                            -
                            860  printer->fmt_line("{} ret_{} = 0.0;", type, name);
                            -
                            861  } else {
                            -
                            862  printer->fmt_line("int ret_{} = 0;", name);
                            -
                            863  }
                            -
                            864 
                            -
                            865  print_statement_block(*node.get_statement_block(), false, false);
                            -
                            866  printer->fmt_line("return ret_{};", name);
                            -
                            867  printer->pop_block();
                            -
                            868 }
                            -
                            869 
                            -
                            870 
                            - -
                            872  codegen = true;
                            -
                            873  auto name = node.get_node_name();
                            +
                            850 
                            + +
                            852  print_function_procedure_helper(node);
                            +
                            853 }
                            +
                            854 
                            +
                            855 
                            + +
                            857  auto name = node.get_node_name();
                            +
                            858 
                            +
                            859  // name of return variable
                            +
                            860  std::string return_var;
                            +
                            861  if (info.function_uses_table(name)) {
                            +
                            862  return_var = "ret_f_" + name;
                            +
                            863  } else {
                            +
                            864  return_var = "ret_" + name;
                            +
                            865  }
                            +
                            866 
                            +
                            867  // first rename return variable name
                            +
                            868  auto block = node.get_statement_block().get();
                            +
                            869  RenameVisitor v(name, return_var);
                            +
                            870  block->accept(v);
                            +
                            871 
                            +
                            872  print_function_procedure_helper(node);
                            +
                            873 }
                            874 
                            -
                            875  if (info.function_uses_table(name)) {
                            -
                            876  auto new_name = "f_" + name;
                            -
                            877  print_function_or_procedure(node, new_name);
                            -
                            878  print_table_check_function(node);
                            -
                            879  print_table_replacement_function(node);
                            -
                            880  } else {
                            -
                            881  print_function_or_procedure(node, name);
                            +
                            875 
                            + +
                            877  auto name = node.get_node_name();
                            +
                            878  const auto& p = node.get_parameters();
                            +
                            879  auto params = internal_method_parameters();
                            +
                            880  for (const auto& i: p) {
                            +
                            881  params.emplace_back("", "double", "", i->get_node_name());
                            882  }
                            -
                            883 
                            -
                            884  codegen = false;
                            -
                            885 }
                            -
                            886 
                            -
                            887 
                            - -
                            889  print_function_procedure_helper(node);
                            -
                            890 }
                            -
                            891 
                            -
                            892 
                            - -
                            894  auto name = node.get_node_name();
                            -
                            895 
                            -
                            896  // name of return variable
                            -
                            897  std::string return_var;
                            -
                            898  if (info.function_uses_table(name)) {
                            -
                            899  return_var = "ret_f_" + name;
                            -
                            900  } else {
                            -
                            901  return_var = "ret_" + name;
                            -
                            902  }
                            -
                            903 
                            -
                            904  // first rename return variable name
                            -
                            905  auto block = node.get_statement_block().get();
                            -
                            906  RenameVisitor v(name, return_var);
                            -
                            907  block->accept(v);
                            -
                            908 
                            -
                            909  print_function_procedure_helper(node);
                            -
                            910 }
                            -
                            911 
                            -
                            912 
                            - -
                            914  auto name = node.get_node_name();
                            -
                            915  const auto& p = node.get_parameters();
                            -
                            916  auto params = internal_method_parameters();
                            -
                            917  for (const auto& i: p) {
                            -
                            918  params.emplace_back("", "double", "", i->get_node_name());
                            -
                            919  }
                            -
                            920  printer->fmt_line("double {}({})", method_name(name), get_parameter_str(params));
                            -
                            921  printer->push_block();
                            -
                            922  printer->fmt_line("double _arg[{}];", p.size());
                            -
                            923  for (size_t i = 0; i < p.size(); ++i) {
                            -
                            924  printer->fmt_line("_arg[{}] = {};", i, p[i]->get_node_name());
                            -
                            925  }
                            -
                            926  printer->fmt_line("return hoc_func_table({}, {}, _arg);",
                            -
                            927  get_variable_name(std::string("_ptable_" + name), true),
                            -
                            928  p.size());
                            -
                            929  printer->pop_block();
                            -
                            930 
                            -
                            931  printer->fmt_push_block("double table_{}()", method_name(name));
                            -
                            932  printer->fmt_line("hoc_spec_table(&{}, {});",
                            -
                            933  get_variable_name(std::string("_ptable_" + name)),
                            -
                            934  p.size());
                            -
                            935  printer->add_line("return 0.;");
                            -
                            936  printer->pop_block();
                            -
                            937 }
                            -
                            938 
                            -
                            939 
                            -
                            940 /**
                            -
                            941  * @brief Checks whether the functor_block generated by sympy solver modifies any variable outside
                            -
                            942  * its scope. If it does then return false, so that the operator() of the struct functor of the
                            -
                            943  * Eigen Newton solver doesn't have const qualifier.
                            -
                            944  *
                            -
                            945  * @param variable_block Statement Block of the variables declarations used in the functor struct of
                            -
                            946  * the solver
                            -
                            947  * @param functor_block Actual code being printed in the operator() of the functor struct of the
                            -
                            948  * solver
                            -
                            949  * @return True if operator() is const else False
                            -
                            950  */
                            - -
                            952  const ast::StatementBlock& functor_block) {
                            -
                            953  // Create complete_block with both variable declarations (done in variable_block) and solver
                            -
                            954  // part (done in functor_block) to be able to run the SymtabVisitor and DefUseAnalyzeVisitor
                            -
                            955  // then and get the proper DUChains for the variables defined in the variable_block
                            -
                            956  ast::StatementBlock complete_block(functor_block);
                            -
                            957  // Typically variable_block has only one statement, a statement containing the declaration
                            -
                            958  // of the local variables
                            -
                            959  for (const auto& statement: variable_block.get_statements()) {
                            -
                            960  complete_block.insert_statement(complete_block.get_statements().begin(), statement);
                            -
                            961  }
                            -
                            962 
                            -
                            963  // Create Symbol Table for complete_block
                            -
                            964  auto model_symbol_table = std::make_shared<symtab::ModelSymbolTable>();
                            -
                            965  SymtabVisitor(model_symbol_table.get()).visit_statement_block(complete_block);
                            -
                            966  // Initialize DefUseAnalyzeVisitor to generate the DUChains for the variables defined in the
                            -
                            967  // variable_block
                            -
                            968  DefUseAnalyzeVisitor v(*complete_block.get_symbol_table());
                            -
                            969 
                            -
                            970  // Check the DUChains for all the variables in the variable_block
                            -
                            971  // If variable is defined in complete_block don't add const quilifier in operator()
                            -
                            972  auto is_functor_const = true;
                            -
                            973  const auto& variables = collect_nodes(variable_block, {ast::AstNodeType::LOCAL_VAR});
                            -
                            974  for (const auto& variable: variables) {
                            -
                            975  const auto& chain = v.analyze(complete_block, variable->get_node_name());
                            -
                            976  is_functor_const = !(chain.eval() == DUState::D || chain.eval() == DUState::LD ||
                            -
                            977  chain.eval() == DUState::CD);
                            -
                            978  if (!is_functor_const) {
                            -
                            979  break;
                            -
                            980  }
                            -
                            981  }
                            -
                            982 
                            -
                            983  return is_functor_const;
                            -
                            984 }
                            -
                            985 
                            -
                            986 
                            - -
                            988  const ast::EigenNewtonSolverBlock& node) {
                            -
                            989  // functor that evaluates F(X) and J(X) for
                            -
                            990  // Newton solver
                            -
                            991  auto float_type = default_float_data_type();
                            -
                            992  int N = node.get_n_state_vars()->get_value();
                            -
                            993 
                            -
                            994  const auto functor_name = info.functor_names[&node];
                            -
                            995  printer->fmt_push_block("struct {0}", functor_name);
                            -
                            996  printer->add_line("NrnThread* nt;");
                            -
                            997  printer->add_line(instance_struct(), "* inst;");
                            -
                            998  printer->add_line("int id, pnodecount;");
                            -
                            999  printer->add_line("double v;");
                            -
                            1000  printer->add_line("const Datum* indexes;");
                            -
                            1001  printer->add_line("double* data;");
                            -
                            1002  printer->add_line("ThreadDatum* thread;");
                            -
                            1003 
                            -
                            1004  if (ion_variable_struct_required()) {
                            -
                            1005  print_ion_variable();
                            -
                            1006  }
                            +
                            883  printer->fmt_line("double {}({})", method_name(name), get_parameter_str(params));
                            +
                            884  printer->push_block();
                            +
                            885  printer->fmt_line("double _arg[{}];", p.size());
                            +
                            886  for (size_t i = 0; i < p.size(); ++i) {
                            +
                            887  printer->fmt_line("_arg[{}] = {};", i, p[i]->get_node_name());
                            +
                            888  }
                            +
                            889  printer->fmt_line("return hoc_func_table({}, {}, _arg);",
                            +
                            890  get_variable_name(std::string("_ptable_" + name), true),
                            +
                            891  p.size());
                            +
                            892  printer->pop_block();
                            +
                            893 
                            +
                            894  printer->fmt_push_block("double table_{}()", method_name(name));
                            +
                            895  printer->fmt_line("hoc_spec_table(&{}, {});",
                            +
                            896  get_variable_name(std::string("_ptable_" + name)),
                            +
                            897  p.size());
                            +
                            898  printer->add_line("return 0.;");
                            +
                            899  printer->pop_block();
                            +
                            900 }
                            +
                            901 
                            +
                            902 
                            +
                            903 /**
                            +
                            904  * @brief Checks whether the functor_block generated by sympy solver modifies any variable outside
                            +
                            905  * its scope. If it does then return false, so that the operator() of the struct functor of the
                            +
                            906  * Eigen Newton solver doesn't have const qualifier.
                            +
                            907  *
                            +
                            908  * @param variable_block Statement Block of the variables declarations used in the functor struct of
                            +
                            909  * the solver
                            +
                            910  * @param functor_block Actual code being printed in the operator() of the functor struct of the
                            +
                            911  * solver
                            +
                            912  * @return True if operator() is const else False
                            +
                            913  */
                            + +
                            915  const ast::StatementBlock& functor_block) {
                            +
                            916  // Create complete_block with both variable declarations (done in variable_block) and solver
                            +
                            917  // part (done in functor_block) to be able to run the SymtabVisitor and DefUseAnalyzeVisitor
                            +
                            918  // then and get the proper DUChains for the variables defined in the variable_block
                            +
                            919  ast::StatementBlock complete_block(functor_block);
                            +
                            920  // Typically variable_block has only one statement, a statement containing the declaration
                            +
                            921  // of the local variables
                            +
                            922  for (const auto& statement: variable_block.get_statements()) {
                            +
                            923  complete_block.insert_statement(complete_block.get_statements().begin(), statement);
                            +
                            924  }
                            +
                            925 
                            +
                            926  // Create Symbol Table for complete_block
                            +
                            927  auto model_symbol_table = std::make_shared<symtab::ModelSymbolTable>();
                            +
                            928  SymtabVisitor(model_symbol_table.get()).visit_statement_block(complete_block);
                            +
                            929  // Initialize DefUseAnalyzeVisitor to generate the DUChains for the variables defined in the
                            +
                            930  // variable_block
                            +
                            931  DefUseAnalyzeVisitor v(*complete_block.get_symbol_table());
                            +
                            932 
                            +
                            933  // Check the DUChains for all the variables in the variable_block
                            +
                            934  // If variable is defined in complete_block don't add const quilifier in operator()
                            +
                            935  auto is_functor_const = true;
                            +
                            936  const auto& variables = collect_nodes(variable_block, {ast::AstNodeType::LOCAL_VAR});
                            +
                            937  for (const auto& variable: variables) {
                            +
                            938  const auto& chain = v.analyze(complete_block, variable->get_node_name());
                            +
                            939  is_functor_const = !(chain.eval() == DUState::D || chain.eval() == DUState::LD ||
                            +
                            940  chain.eval() == DUState::CD);
                            +
                            941  if (!is_functor_const) {
                            +
                            942  break;
                            +
                            943  }
                            +
                            944  }
                            +
                            945 
                            +
                            946  return is_functor_const;
                            +
                            947 }
                            +
                            948 
                            +
                            949 
                            + +
                            951  const ast::EigenNewtonSolverBlock& node) {
                            +
                            952  // functor that evaluates F(X) and J(X) for
                            +
                            953  // Newton solver
                            +
                            954  auto float_type = default_float_data_type();
                            +
                            955  int N = node.get_n_state_vars()->get_value();
                            +
                            956 
                            +
                            957  const auto functor_name = info.functor_names[&node];
                            +
                            958  printer->fmt_push_block("struct {0}", functor_name);
                            +
                            959  printer->add_line("NrnThread* nt;");
                            +
                            960  printer->add_line(instance_struct(), "* inst;");
                            +
                            961  printer->add_line("int id, pnodecount;");
                            +
                            962  printer->add_line("double v;");
                            +
                            963  printer->add_line("const Datum* indexes;");
                            +
                            964  printer->add_line("double* data;");
                            +
                            965  printer->add_line("ThreadDatum* thread;");
                            +
                            966 
                            +
                            967  if (ion_variable_struct_required()) {
                            +
                            968  print_ion_variable();
                            +
                            969  }
                            +
                            970 
                            +
                            971  print_statement_block(*node.get_variable_block(), false, false);
                            +
                            972  printer->add_newline();
                            +
                            973 
                            +
                            974  printer->push_block("void initialize()");
                            +
                            975  print_statement_block(*node.get_initialize_block(), false, false);
                            +
                            976  printer->pop_block();
                            +
                            977  printer->add_newline();
                            +
                            978 
                            +
                            979  printer->fmt_line(
                            +
                            980  "{0}(NrnThread* nt, {1}* inst, int id, int pnodecount, double v, const Datum* indexes, "
                            +
                            981  "double* data, ThreadDatum* thread) : "
                            +
                            982  "nt{{nt}}, inst{{inst}}, id{{id}}, pnodecount{{pnodecount}}, v{{v}}, indexes{{indexes}}, "
                            +
                            983  "data{{data}}, thread{{thread}} "
                            +
                            984  "{{}}",
                            +
                            985  functor_name,
                            +
                            986  instance_struct());
                            +
                            987 
                            +
                            988  printer->add_indent();
                            +
                            989 
                            +
                            990  const auto& variable_block = *node.get_variable_block();
                            +
                            991  const auto& functor_block = *node.get_functor_block();
                            +
                            992 
                            +
                            993  printer->fmt_text(
                            +
                            994  "void operator()(const Eigen::Matrix<{0}, {1}, 1>& nmodl_eigen_xm, Eigen::Matrix<{0}, {1}, "
                            +
                            995  "1>& nmodl_eigen_fm, "
                            +
                            996  "Eigen::Matrix<{0}, {1}, {1}>& nmodl_eigen_jm) {2}",
                            +
                            997  float_type,
                            +
                            998  N,
                            +
                            999  is_functor_const(variable_block, functor_block) ? "const " : "");
                            +
                            1000  printer->push_block();
                            +
                            1001  printer->fmt_line("const {}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                            +
                            1002  printer->fmt_line("{}* nmodl_eigen_j = nmodl_eigen_jm.data();", float_type);
                            +
                            1003  printer->fmt_line("{}* nmodl_eigen_f = nmodl_eigen_fm.data();", float_type);
                            +
                            1004  print_statement_block(functor_block, false, false);
                            +
                            1005  printer->pop_block();
                            +
                            1006  printer->add_newline();
                            1007 
                            -
                            1008  print_statement_block(*node.get_variable_block(), false, false);
                            -
                            1009  printer->add_newline();
                            -
                            1010 
                            -
                            1011  printer->push_block("void initialize()");
                            -
                            1012  print_statement_block(*node.get_initialize_block(), false, false);
                            -
                            1013  printer->pop_block();
                            -
                            1014  printer->add_newline();
                            +
                            1008  // assign newton solver results in matrix X to state vars
                            +
                            1009  printer->push_block("void finalize()");
                            +
                            1010  print_statement_block(*node.get_finalize_block(), false, false);
                            +
                            1011  printer->pop_block();
                            +
                            1012 
                            +
                            1013  printer->pop_block(";");
                            +
                            1014 }
                            1015 
                            -
                            1016  printer->fmt_line(
                            -
                            1017  "{0}(NrnThread* nt, {1}* inst, int id, int pnodecount, double v, const Datum* indexes, "
                            -
                            1018  "double* data, ThreadDatum* thread) : "
                            -
                            1019  "nt{{nt}}, inst{{inst}}, id{{id}}, pnodecount{{pnodecount}}, v{{v}}, indexes{{indexes}}, "
                            -
                            1020  "data{{data}}, thread{{thread}} "
                            -
                            1021  "{{}}",
                            -
                            1022  functor_name,
                            -
                            1023  instance_struct());
                            -
                            1024 
                            -
                            1025  printer->add_indent();
                            -
                            1026 
                            -
                            1027  const auto& variable_block = *node.get_variable_block();
                            -
                            1028  const auto& functor_block = *node.get_functor_block();
                            -
                            1029 
                            -
                            1030  printer->fmt_text(
                            -
                            1031  "void operator()(const Eigen::Matrix<{0}, {1}, 1>& nmodl_eigen_xm, Eigen::Matrix<{0}, {1}, "
                            -
                            1032  "1>& nmodl_eigen_fm, "
                            -
                            1033  "Eigen::Matrix<{0}, {1}, {1}>& nmodl_eigen_jm) {2}",
                            -
                            1034  float_type,
                            -
                            1035  N,
                            -
                            1036  is_functor_const(variable_block, functor_block) ? "const " : "");
                            -
                            1037  printer->push_block();
                            -
                            1038  printer->fmt_line("const {}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                            -
                            1039  printer->fmt_line("{}* nmodl_eigen_j = nmodl_eigen_jm.data();", float_type);
                            -
                            1040  printer->fmt_line("{}* nmodl_eigen_f = nmodl_eigen_fm.data();", float_type);
                            -
                            1041  print_statement_block(functor_block, false, false);
                            -
                            1042  printer->pop_block();
                            -
                            1043  printer->add_newline();
                            -
                            1044 
                            -
                            1045  // assign newton solver results in matrix X to state vars
                            -
                            1046  printer->push_block("void finalize()");
                            -
                            1047  print_statement_block(*node.get_finalize_block(), false, false);
                            -
                            1048  printer->pop_block();
                            -
                            1049 
                            -
                            1050  printer->pop_block(";");
                            +
                            1016 
                            +
                            1017 void CodegenCoreneuronCppVisitor::print_eigen_linear_solver(const std::string& float_type, int N) {
                            +
                            1018  if (N <= 4) {
                            +
                            1019  // Faster compared to LU, given the template specialization in Eigen.
                            +
                            1020  printer->add_multi_line(R"CODE(
                            +
                            1021  bool invertible;
                            +
                            1022  nmodl_eigen_jm.computeInverseWithCheck(nmodl_eigen_jm_inv,invertible);
                            +
                            1023  nmodl_eigen_xm = nmodl_eigen_jm_inv*nmodl_eigen_fm;
                            +
                            1024  if (!invertible) assert(false && "Singular or ill-conditioned matrix (Eigen::inverse)!");
                            +
                            1025  )CODE");
                            +
                            1026  } else {
                            +
                            1027  // In Eigen the default storage order is ColMajor.
                            +
                            1028  // Crout's implementation requires matrices stored in RowMajor order (C++-style arrays).
                            +
                            1029  // Therefore, the transposeInPlace is critical such that the data() method to give the rows
                            +
                            1030  // instead of the columns.
                            +
                            1031  printer->add_line("if (!nmodl_eigen_jm.IsRowMajor) nmodl_eigen_jm.transposeInPlace();");
                            +
                            1032 
                            +
                            1033  // pivot vector
                            +
                            1034  printer->fmt_line("Eigen::Matrix<int, {}, 1> pivot;", N);
                            +
                            1035  printer->fmt_line("Eigen::Matrix<{0}, {1}, 1> rowmax;", float_type, N);
                            +
                            1036 
                            +
                            1037  // In-place LU-Decomposition (Crout Algo) : Jm is replaced by its LU-decomposition
                            +
                            1038  printer->fmt_line(
                            +
                            1039  "if (nmodl::crout::Crout<{0}>({1}, nmodl_eigen_jm.data(), pivot.data(), rowmax.data()) "
                            +
                            1040  "< 0) assert(false && \"Singular or ill-conditioned matrix (nmodl::crout)!\");",
                            +
                            1041  float_type,
                            +
                            1042  N);
                            +
                            1043 
                            +
                            1044  // Solve the linear system : Forward/Backward substitution part
                            +
                            1045  printer->fmt_line(
                            +
                            1046  "nmodl::crout::solveCrout<{0}>({1}, nmodl_eigen_jm.data(), nmodl_eigen_fm.data(), "
                            +
                            1047  "nmodl_eigen_xm.data(), pivot.data());",
                            +
                            1048  float_type,
                            +
                            1049  N);
                            +
                            1050  }
                            1051 }
                            1052 
                            1053 
                            -
                            1054 void CodegenCoreneuronCppVisitor::print_eigen_linear_solver(const std::string& float_type, int N) {
                            -
                            1055  if (N <= 4) {
                            -
                            1056  // Faster compared to LU, given the template specialization in Eigen.
                            -
                            1057  printer->add_multi_line(R"CODE(
                            -
                            1058  bool invertible;
                            -
                            1059  nmodl_eigen_jm.computeInverseWithCheck(nmodl_eigen_jm_inv,invertible);
                            -
                            1060  nmodl_eigen_xm = nmodl_eigen_jm_inv*nmodl_eigen_fm;
                            -
                            1061  if (!invertible) assert(false && "Singular or ill-conditioned matrix (Eigen::inverse)!");
                            -
                            1062  )CODE");
                            -
                            1063  } else {
                            -
                            1064  // In Eigen the default storage order is ColMajor.
                            -
                            1065  // Crout's implementation requires matrices stored in RowMajor order (C++-style arrays).
                            -
                            1066  // Therefore, the transposeInPlace is critical such that the data() method to give the rows
                            -
                            1067  // instead of the columns.
                            -
                            1068  printer->add_line("if (!nmodl_eigen_jm.IsRowMajor) nmodl_eigen_jm.transposeInPlace();");
                            -
                            1069 
                            -
                            1070  // pivot vector
                            -
                            1071  printer->fmt_line("Eigen::Matrix<int, {}, 1> pivot;", N);
                            -
                            1072  printer->fmt_line("Eigen::Matrix<{0}, {1}, 1> rowmax;", float_type, N);
                            -
                            1073 
                            -
                            1074  // In-place LU-Decomposition (Crout Algo) : Jm is replaced by its LU-decomposition
                            -
                            1075  printer->fmt_line(
                            -
                            1076  "if (nmodl::crout::Crout<{0}>({1}, nmodl_eigen_jm.data(), pivot.data(), rowmax.data()) "
                            -
                            1077  "< 0) assert(false && \"Singular or ill-conditioned matrix (nmodl::crout)!\");",
                            -
                            1078  float_type,
                            -
                            1079  N);
                            -
                            1080 
                            -
                            1081  // Solve the linear system : Forward/Backward substitution part
                            -
                            1082  printer->fmt_line(
                            -
                            1083  "nmodl::crout::solveCrout<{0}>({1}, nmodl_eigen_jm.data(), nmodl_eigen_fm.data(), "
                            -
                            1084  "nmodl_eigen_xm.data(), pivot.data());",
                            -
                            1085  float_type,
                            -
                            1086  N);
                            -
                            1087  }
                            -
                            1088 }
                            -
                            1089 
                            +
                            1054 /****************************************************************************************/
                            +
                            1055 /* Code-specific helper routines */
                            +
                            1056 /****************************************************************************************/
                            +
                            1057 
                            +
                            1058 
                            + +
                            1060  if (ion_variable_struct_required()) {
                            +
                            1061  return "id, pnodecount, inst, ionvar, data, indexes, thread, nt, v";
                            +
                            1062  }
                            +
                            1063  return "id, pnodecount, inst, data, indexes, thread, nt, v";
                            +
                            1064 }
                            +
                            1065 
                            +
                            1066 
                            +
                            1067 /**
                            +
                            1068  * @todo: figure out how to correctly handle qualifiers
                            +
                            1069  */
                            + +
                            1071  ParamVector params;
                            +
                            1072  params.emplace_back("", "int", "", "id");
                            +
                            1073  params.emplace_back("", "int", "", "pnodecount");
                            +
                            1074  params.emplace_back("", fmt::format("{}*", instance_struct()), "", "inst");
                            +
                            1075  if (ion_variable_struct_required()) {
                            +
                            1076  params.emplace_back("", "IonCurVar&", "", "ionvar");
                            +
                            1077  }
                            +
                            1078  params.emplace_back("", "double*", "", "data");
                            +
                            1079  params.emplace_back("const ", "Datum*", "", "indexes");
                            +
                            1080  params.emplace_back("", "ThreadDatum*", "", "thread");
                            +
                            1081  params.emplace_back("", "NrnThread*", "", "nt");
                            +
                            1082  params.emplace_back("", "double", "", "v");
                            +
                            1083  return params;
                            +
                            1084 }
                            +
                            1085 
                            +
                            1086 
                            + +
                            1088  return "id, pnodecount, data, indexes, thread, nt, ml, v";
                            +
                            1089 }
                            1090 
                            -
                            1091 /****************************************************************************************/
                            -
                            1092 /* Code-specific helper routines */
                            -
                            1093 /****************************************************************************************/
                            -
                            1094 
                            -
                            1095 
                            - -
                            1097  if (ion_variable_struct_required()) {
                            -
                            1098  return "id, pnodecount, inst, ionvar, data, indexes, thread, nt, v";
                            -
                            1099  }
                            -
                            1100  return "id, pnodecount, inst, data, indexes, thread, nt, v";
                            -
                            1101 }
                            -
                            1102 
                            -
                            1103 
                            -
                            1104 /**
                            -
                            1105  * @todo: figure out how to correctly handle qualifiers
                            -
                            1106  */
                            - -
                            1108  ParamVector params;
                            -
                            1109  params.emplace_back("", "int", "", "id");
                            -
                            1110  params.emplace_back("", "int", "", "pnodecount");
                            -
                            1111  params.emplace_back("", fmt::format("{}*", instance_struct()), "", "inst");
                            -
                            1112  if (ion_variable_struct_required()) {
                            -
                            1113  params.emplace_back("", "IonCurVar&", "", "ionvar");
                            -
                            1114  }
                            -
                            1115  params.emplace_back("", "double*", "", "data");
                            -
                            1116  params.emplace_back("const ", "Datum*", "", "indexes");
                            -
                            1117  params.emplace_back("", "ThreadDatum*", "", "thread");
                            -
                            1118  params.emplace_back("", "NrnThread*", "", "nt");
                            -
                            1119  params.emplace_back("", "double", "", "v");
                            -
                            1120  return params;
                            -
                            1121 }
                            -
                            1122 
                            -
                            1123 
                            - -
                            1125  return "id, pnodecount, data, indexes, thread, nt, ml, v";
                            -
                            1126 }
                            -
                            1127 
                            -
                            1128 
                            - -
                            1130  if (table) {
                            -
                            1131  return "int id, int pnodecount, double* data, Datum* indexes, "
                            -
                            1132  "ThreadDatum* thread, NrnThread* nt, Memb_list* ml, int tml_id";
                            -
                            1133  }
                            -
                            1134  return "int id, int pnodecount, double* data, Datum* indexes, "
                            -
                            1135  "ThreadDatum* thread, NrnThread* nt, Memb_list* ml, double v";
                            -
                            1136 }
                            -
                            1137 
                            -
                            1138 
                            - -
                            1140  if (ion_variable_struct_required()) {
                            -
                            1141  return "id, pnodecount, ionvar, data, indexes, thread, nt, ml, v";
                            +
                            1091 
                            + +
                            1093  if (table) {
                            +
                            1094  return "int id, int pnodecount, double* data, Datum* indexes, "
                            +
                            1095  "ThreadDatum* thread, NrnThread* nt, Memb_list* ml, int tml_id";
                            +
                            1096  }
                            +
                            1097  return "int id, int pnodecount, double* data, Datum* indexes, "
                            +
                            1098  "ThreadDatum* thread, NrnThread* nt, Memb_list* ml, double v";
                            +
                            1099 }
                            +
                            1100 
                            +
                            1101 
                            + +
                            1103  if (ion_variable_struct_required()) {
                            +
                            1104  return "id, pnodecount, ionvar, data, indexes, thread, nt, ml, v";
                            +
                            1105  }
                            +
                            1106  return "id, pnodecount, data, indexes, thread, nt, ml, v";
                            +
                            1107 }
                            +
                            1108 
                            +
                            1109 
                            +
                            1110 /**
                            +
                            1111  * Function call arguments when function or procedure is defined in the
                            +
                            1112  * same mod file itself
                            +
                            1113  */
                            + +
                            1115  if (ion_variable_struct_required()) {
                            +
                            1116  return "id, pnodecount, inst, ionvar, data, indexes, thread, nt, v";
                            +
                            1117  }
                            +
                            1118  return "id, pnodecount, inst, data, indexes, thread, nt, v";
                            +
                            1119 }
                            +
                            1120 
                            +
                            1121 
                            +
                            1122 /**
                            +
                            1123  * Replace commonly used variables in the verbatim blocks into their corresponding
                            +
                            1124  * variable name in the new code generation backend.
                            +
                            1125  */
                            + + +
                            1128  name = naming::VERBATIM_VARIABLES_MAPPING.at(name);
                            +
                            1129  }
                            +
                            1130 
                            +
                            1131  /**
                            +
                            1132  * if function is defined the same mod file then the arguments must
                            +
                            1133  * contain mechanism instance as well.
                            +
                            1134  */
                            +
                            1135  if (name == naming::THREAD_ARGS) {
                            +
                            1136  if (internal_method_call_encountered) {
                            +
                            1137  name = nrn_thread_internal_arguments();
                            +
                            1138  internal_method_call_encountered = false;
                            +
                            1139  } else {
                            +
                            1140  name = nrn_thread_arguments();
                            +
                            1141  }
                            1142  }
                            -
                            1143  return "id, pnodecount, data, indexes, thread, nt, ml, v";
                            -
                            1144 }
                            -
                            1145 
                            -
                            1146 
                            -
                            1147 /**
                            -
                            1148  * Function call arguments when function or procedure is defined in the
                            -
                            1149  * same mod file itself
                            -
                            1150  */
                            - -
                            1152  if (ion_variable_struct_required()) {
                            -
                            1153  return "id, pnodecount, inst, ionvar, data, indexes, thread, nt, v";
                            -
                            1154  }
                            -
                            1155  return "id, pnodecount, inst, data, indexes, thread, nt, v";
                            -
                            1156 }
                            -
                            1157 
                            -
                            1158 
                            -
                            1159 /**
                            -
                            1160  * Replace commonly used variables in the verbatim blocks into their corresponding
                            -
                            1161  * variable name in the new code generation backend.
                            -
                            1162  */
                            - - -
                            1165  name = naming::VERBATIM_VARIABLES_MAPPING.at(name);
                            -
                            1166  }
                            -
                            1167 
                            -
                            1168  /**
                            -
                            1169  * if function is defined the same mod file then the arguments must
                            -
                            1170  * contain mechanism instance as well.
                            -
                            1171  */
                            -
                            1172  if (name == naming::THREAD_ARGS) {
                            -
                            1173  if (internal_method_call_encountered) {
                            -
                            1174  name = nrn_thread_internal_arguments();
                            -
                            1175  internal_method_call_encountered = false;
                            -
                            1176  } else {
                            -
                            1177  name = nrn_thread_arguments();
                            -
                            1178  }
                            -
                            1179  }
                            -
                            1180  if (name == naming::THREAD_ARGS_PROTO) {
                            -
                            1181  name = external_method_parameters();
                            -
                            1182  }
                            -
                            1183  return name;
                            -
                            1184 }
                            -
                            1185 
                            -
                            1186 
                            -
                            1187 /**
                            -
                            1188  * Processing commonly used constructs in the verbatim blocks.
                            -
                            1189  * @todo : this is still ad-hoc and requires re-implementation to
                            -
                            1190  * handle it more elegantly.
                            -
                            1191  */
                            -
                            1192 std::string CodegenCoreneuronCppVisitor::process_verbatim_text(std::string const& text) {
                            - -
                            1194  driver.scan_string(text);
                            -
                            1195  auto tokens = driver.all_tokens();
                            -
                            1196  std::string result;
                            -
                            1197  for (size_t i = 0; i < tokens.size(); i++) {
                            -
                            1198  auto token = tokens[i];
                            +
                            1143  if (name == naming::THREAD_ARGS_PROTO) {
                            +
                            1144  name = external_method_parameters();
                            +
                            1145  }
                            +
                            1146  return name;
                            +
                            1147 }
                            +
                            1148 
                            +
                            1149 
                            +
                            1150 /**
                            +
                            1151  * Processing commonly used constructs in the verbatim blocks.
                            +
                            1152  * @todo : this is still ad-hoc and requires re-implementation to
                            +
                            1153  * handle it more elegantly.
                            +
                            1154  */
                            +
                            1155 std::string CodegenCoreneuronCppVisitor::process_verbatim_text(std::string const& text) {
                            + +
                            1157  driver.scan_string(text);
                            +
                            1158  auto tokens = driver.all_tokens();
                            +
                            1159  std::string result;
                            +
                            1160  for (size_t i = 0; i < tokens.size(); i++) {
                            +
                            1161  auto token = tokens[i];
                            +
                            1162 
                            +
                            1163  // check if we have function call in the verbatim block where
                            +
                            1164  // function is defined in the same mod file
                            +
                            1165  if (program_symtab->is_method_defined(token) && tokens[i + 1] == "(") {
                            +
                            1166  internal_method_call_encountered = true;
                            +
                            1167  }
                            +
                            1168  auto name = process_verbatim_token(token);
                            +
                            1169 
                            +
                            1170  if (token == (std::string("_") + naming::TQITEM_VARIABLE)) {
                            +
                            1171  name.insert(0, 1, '&');
                            +
                            1172  }
                            +
                            1173  if (token == "_STRIDE") {
                            +
                            1174  name = "pnodecount+id";
                            +
                            1175  }
                            +
                            1176  result += name;
                            +
                            1177  }
                            +
                            1178  return result;
                            +
                            1179 }
                            +
                            1180 
                            +
                            1181 
                            + +
                            1183  auto nrn_channel_info_var_name = get_channel_info_var_name();
                            +
                            1184  auto nrn_cur = nrn_cur_required() ? method_name(naming::NRN_CUR_METHOD) : "nullptr";
                            +
                            1185  auto nrn_state = nrn_state_required() ? method_name(naming::NRN_STATE_METHOD) : "nullptr";
                            +
                            1186  auto nrn_alloc = method_name(naming::NRN_ALLOC_METHOD);
                            +
                            1187  auto nrn_init = method_name(naming::NRN_INIT_METHOD);
                            +
                            1188  auto const nrn_private_constructor = method_name(naming::NRN_PRIVATE_CONSTRUCTOR_METHOD);
                            +
                            1189  auto const nrn_private_destructor = method_name(naming::NRN_PRIVATE_DESTRUCTOR_METHOD);
                            +
                            1190  return fmt::format("{}, {}, {}, nullptr, {}, {}, {}, {}, first_pointer_var_index()",
                            +
                            1191  nrn_channel_info_var_name,
                            +
                            1192  nrn_alloc,
                            +
                            1193  nrn_cur,
                            +
                            1194  nrn_state,
                            +
                            1195  nrn_init,
                            +
                            1196  nrn_private_constructor,
                            +
                            1197  nrn_private_destructor);
                            +
                            1198 }
                            1199 
                            -
                            1200  // check if we have function call in the verbatim block where
                            -
                            1201  // function is defined in the same mod file
                            -
                            1202  if (program_symtab->is_method_defined(token) && tokens[i + 1] == "(") {
                            -
                            1203  internal_method_call_encountered = true;
                            -
                            1204  }
                            -
                            1205  auto name = process_verbatim_token(token);
                            +
                            1200 
                            +
                            1201 std::pair<std::string, std::string> CodegenCoreneuronCppVisitor::read_ion_variable_name(
                            +
                            1202  const std::string& name) {
                            +
                            1203  return {name, naming::ION_VARNAME_PREFIX + name};
                            +
                            1204 }
                            +
                            1205 
                            1206 
                            -
                            1207  if (token == (std::string("_") + naming::TQITEM_VARIABLE)) {
                            -
                            1208  name.insert(0, 1, '&');
                            -
                            1209  }
                            -
                            1210  if (token == "_STRIDE") {
                            -
                            1211  name = "pnodecount+id";
                            -
                            1212  }
                            -
                            1213  result += name;
                            -
                            1214  }
                            -
                            1215  return result;
                            -
                            1216 }
                            -
                            1217 
                            -
                            1218 
                            - -
                            1220  auto nrn_channel_info_var_name = get_channel_info_var_name();
                            -
                            1221  auto nrn_cur = nrn_cur_required() ? method_name(naming::NRN_CUR_METHOD) : "nullptr";
                            -
                            1222  auto nrn_state = nrn_state_required() ? method_name(naming::NRN_STATE_METHOD) : "nullptr";
                            -
                            1223  auto nrn_alloc = method_name(naming::NRN_ALLOC_METHOD);
                            -
                            1224  auto nrn_init = method_name(naming::NRN_INIT_METHOD);
                            -
                            1225  auto const nrn_private_constructor = method_name(naming::NRN_PRIVATE_CONSTRUCTOR_METHOD);
                            -
                            1226  auto const nrn_private_destructor = method_name(naming::NRN_PRIVATE_DESTRUCTOR_METHOD);
                            -
                            1227  return fmt::format("{}, {}, {}, nullptr, {}, {}, {}, {}, first_pointer_var_index()",
                            -
                            1228  nrn_channel_info_var_name,
                            -
                            1229  nrn_alloc,
                            -
                            1230  nrn_cur,
                            -
                            1231  nrn_state,
                            -
                            1232  nrn_init,
                            -
                            1233  nrn_private_constructor,
                            -
                            1234  nrn_private_destructor);
                            -
                            1235 }
                            -
                            1236 
                            -
                            1237 
                            -
                            1238 std::pair<std::string, std::string> CodegenCoreneuronCppVisitor::read_ion_variable_name(
                            -
                            1239  const std::string& name) {
                            -
                            1240  return {name, naming::ION_VARNAME_PREFIX + name};
                            -
                            1241 }
                            -
                            1242 
                            -
                            1243 
                            -
                            1244 std::pair<std::string, std::string> CodegenCoreneuronCppVisitor::write_ion_variable_name(
                            -
                            1245  const std::string& name) {
                            -
                            1246  return {naming::ION_VARNAME_PREFIX + name, name};
                            -
                            1247 }
                            -
                            1248 
                            +
                            1207 std::pair<std::string, std::string> CodegenCoreneuronCppVisitor::write_ion_variable_name(
                            +
                            1208  const std::string& name) {
                            +
                            1209  return {naming::ION_VARNAME_PREFIX + name, name};
                            +
                            1210 }
                            +
                            1211 
                            +
                            1212 
                            +
                            1213 std::string CodegenCoreneuronCppVisitor::conc_write_statement(const std::string& ion_name,
                            +
                            1214  const std::string& concentration,
                            +
                            1215  int index) {
                            +
                            1216  auto conc_var_name = get_variable_name(naming::ION_VARNAME_PREFIX + concentration);
                            +
                            1217  auto style_var_name = get_variable_name("style_" + ion_name);
                            +
                            1218  return fmt::format(
                            +
                            1219  "nrn_wrote_conc({}_type,"
                            +
                            1220  " &({}),"
                            +
                            1221  " {},"
                            +
                            1222  " {},"
                            +
                            1223  " nrn_ion_global_map,"
                            +
                            1224  " {},"
                            +
                            1225  " nt->_ml_list[{}_type]->_nodecount_padded)",
                            +
                            1226  ion_name,
                            +
                            1227  conc_var_name,
                            +
                            1228  index,
                            +
                            1229  style_var_name,
                            +
                            1230  get_variable_name(naming::CELSIUS_VARIABLE),
                            +
                            1231  ion_name);
                            +
                            1232 }
                            +
                            1233 
                            +
                            1234 
                            +
                            1235 /**
                            +
                            1236  * If mechanisms dependency level execution is enabled then certain updates
                            +
                            1237  * like ionic current contributions needs to be atomically updated. In this
                            +
                            1238  * case we first update current mechanism's shadow vector and then add statement
                            +
                            1239  * to queue that will be used in reduction queue.
                            +
                            1240  */
                            + +
                            1242  const ShadowUseStatement& statement,
                            +
                            1243  BlockType /* type */) {
                            +
                            1244  // when there is no operator or rhs then that statement doesn't need shadow update
                            +
                            1245  if (statement.op.empty() && statement.rhs.empty()) {
                            +
                            1246  auto text = statement.lhs + ";";
                            +
                            1247  return text;
                            +
                            1248  }
                            1249 
                            -
                            1250 std::string CodegenCoreneuronCppVisitor::conc_write_statement(const std::string& ion_name,
                            -
                            1251  const std::string& concentration,
                            -
                            1252  int index) {
                            -
                            1253  auto conc_var_name = get_variable_name(naming::ION_VARNAME_PREFIX + concentration);
                            -
                            1254  auto style_var_name = get_variable_name("style_" + ion_name);
                            -
                            1255  return fmt::format(
                            -
                            1256  "nrn_wrote_conc({}_type,"
                            -
                            1257  " &({}),"
                            -
                            1258  " {},"
                            -
                            1259  " {},"
                            -
                            1260  " nrn_ion_global_map,"
                            -
                            1261  " {},"
                            -
                            1262  " nt->_ml_list[{}_type]->_nodecount_padded)",
                            -
                            1263  ion_name,
                            -
                            1264  conc_var_name,
                            -
                            1265  index,
                            -
                            1266  style_var_name,
                            -
                            1267  get_variable_name(naming::CELSIUS_VARIABLE),
                            -
                            1268  ion_name);
                            -
                            1269 }
                            +
                            1250  // return regular statement
                            +
                            1251  auto lhs = get_variable_name(statement.lhs);
                            +
                            1252  auto text = fmt::format("{} {} {};", lhs, statement.op, statement.rhs);
                            +
                            1253  return text;
                            +
                            1254 }
                            +
                            1255 
                            +
                            1256 
                            +
                            1257 /****************************************************************************************/
                            +
                            1258 /* Code-specific printing routines for code generation */
                            +
                            1259 /****************************************************************************************/
                            +
                            1260 
                            +
                            1261 
                            + +
                            1263  printer->add_newline(2);
                            +
                            1264  print_device_method_annotation();
                            +
                            1265  printer->push_block("static inline int first_pointer_var_index()");
                            +
                            1266  printer->fmt_line("return {};", info.first_pointer_var_index);
                            +
                            1267  printer->pop_block();
                            +
                            1268 }
                            +
                            1269 
                            1270 
                            -
                            1271 
                            -
                            1272 /**
                            -
                            1273  * If mechanisms dependency level execution is enabled then certain updates
                            -
                            1274  * like ionic current contributions needs to be atomically updated. In this
                            -
                            1275  * case we first update current mechanism's shadow vector and then add statement
                            -
                            1276  * to queue that will be used in reduction queue.
                            -
                            1277  */
                            - -
                            1279  const ShadowUseStatement& statement,
                            -
                            1280  BlockType /* type */) {
                            -
                            1281  // when there is no operator or rhs then that statement doesn't need shadow update
                            -
                            1282  if (statement.op.empty() && statement.rhs.empty()) {
                            -
                            1283  auto text = statement.lhs + ";";
                            -
                            1284  return text;
                            -
                            1285  }
                            -
                            1286 
                            -
                            1287  // return regular statement
                            -
                            1288  auto lhs = get_variable_name(statement.lhs);
                            -
                            1289  auto text = fmt::format("{} {} {};", lhs, statement.op, statement.rhs);
                            -
                            1290  return text;
                            -
                            1291 }
                            -
                            1292 
                            -
                            1293 
                            -
                            1294 /****************************************************************************************/
                            -
                            1295 /* Code-specific printing routines for code generation */
                            -
                            1296 /****************************************************************************************/
                            + +
                            1272  printer->add_newline(2);
                            +
                            1273  print_device_method_annotation();
                            +
                            1274  printer->push_block("static inline int float_variables_size()");
                            +
                            1275  printer->fmt_line("return {};", float_variables_size());
                            +
                            1276  printer->pop_block();
                            +
                            1277 
                            +
                            1278  printer->add_newline(2);
                            +
                            1279  print_device_method_annotation();
                            +
                            1280  printer->push_block("static inline int int_variables_size()");
                            +
                            1281  printer->fmt_line("return {};", int_variables_size());
                            +
                            1282  printer->pop_block();
                            +
                            1283 }
                            +
                            1284 
                            +
                            1285 
                            + +
                            1287  if (!net_receive_exist()) {
                            +
                            1288  return;
                            +
                            1289  }
                            +
                            1290  printer->add_newline(2);
                            +
                            1291  print_device_method_annotation();
                            +
                            1292  printer->push_block("static inline int num_net_receive_args()");
                            +
                            1293  printer->fmt_line("return {};", info.num_net_receive_parameters);
                            +
                            1294  printer->pop_block();
                            +
                            1295 }
                            +
                            1296 
                            1297 
                            -
                            1298 
                            - -
                            1300  printer->add_newline(2);
                            -
                            1301  print_device_method_annotation();
                            -
                            1302  printer->push_block("static inline int first_pointer_var_index()");
                            -
                            1303  printer->fmt_line("return {};", info.first_pointer_var_index);
                            + +
                            1299  printer->add_newline(2);
                            +
                            1300  print_device_method_annotation();
                            +
                            1301  printer->push_block("static inline int get_mech_type()");
                            +
                            1302  // false => get it from the host-only global struct, not the instance structure
                            +
                            1303  printer->fmt_line("return {};", get_variable_name("mech_type", false));
                            1304  printer->pop_block();
                            1305 }
                            1306 
                            1307 
                            - +
                            1309  printer->add_newline(2);
                            1310  print_device_method_annotation();
                            -
                            1311  printer->push_block("static inline int float_variables_size()");
                            -
                            1312  printer->fmt_line("return {};", float_variables_size());
                            -
                            1313  printer->pop_block();
                            -
                            1314 
                            -
                            1315  printer->add_newline(2);
                            -
                            1316  print_device_method_annotation();
                            -
                            1317  printer->push_block("static inline int int_variables_size()");
                            -
                            1318  printer->fmt_line("return {};", int_variables_size());
                            -
                            1319  printer->pop_block();
                            -
                            1320 }
                            -
                            1321 
                            -
                            1322 
                            - -
                            1324  if (!net_receive_exist()) {
                            -
                            1325  return;
                            -
                            1326  }
                            -
                            1327  printer->add_newline(2);
                            -
                            1328  print_device_method_annotation();
                            -
                            1329  printer->push_block("static inline int num_net_receive_args()");
                            -
                            1330  printer->fmt_line("return {};", info.num_net_receive_parameters);
                            -
                            1331  printer->pop_block();
                            -
                            1332 }
                            -
                            1333 
                            -
                            1334 
                            - -
                            1336  printer->add_newline(2);
                            -
                            1337  print_device_method_annotation();
                            -
                            1338  printer->push_block("static inline int get_mech_type()");
                            -
                            1339  // false => get it from the host-only global struct, not the instance structure
                            -
                            1340  printer->fmt_line("return {};", get_variable_name("mech_type", false));
                            -
                            1341  printer->pop_block();
                            -
                            1342 }
                            -
                            1343 
                            -
                            1344 
                            - -
                            1346  printer->add_newline(2);
                            -
                            1347  print_device_method_annotation();
                            -
                            1348  printer->push_block("static inline Memb_list* get_memb_list(NrnThread* nt)");
                            -
                            1349  printer->push_block("if (!nt->_ml_list)");
                            -
                            1350  printer->add_line("return nullptr;");
                            -
                            1351  printer->pop_block();
                            -
                            1352  printer->add_line("return nt->_ml_list[get_mech_type()];");
                            -
                            1353  printer->pop_block();
                            -
                            1354 }
                            -
                            1355 
                            +
                            1311  printer->push_block("static inline Memb_list* get_memb_list(NrnThread* nt)");
                            +
                            1312  printer->push_block("if (!nt->_ml_list)");
                            +
                            1313  printer->add_line("return nullptr;");
                            +
                            1314  printer->pop_block();
                            +
                            1315  printer->add_line("return nt->_ml_list[get_mech_type()];");
                            +
                            1316  printer->pop_block();
                            +
                            1317 }
                            +
                            1318 
                            +
                            1319 
                            + +
                            1321  printer->add_newline(2);
                            +
                            1322  printer->push_block("namespace coreneuron");
                            +
                            1323 }
                            +
                            1324 
                            +
                            1325 
                            + +
                            1327  printer->pop_block();
                            +
                            1328 }
                            +
                            1329 
                            +
                            1330 
                            +
                            1331 /**
                            +
                            1332  * \details There are three types of thread variables currently considered:
                            +
                            1333  * - top local thread variables
                            +
                            1334  * - thread variables in the mod file
                            +
                            1335  * - thread variables for solver
                            +
                            1336  *
                            +
                            1337  * These variables are allocated into different thread structures and have
                            +
                            1338  * corresponding thread ids. Thread id start from 0. In mod2c implementation,
                            +
                            1339  * thread_data_index is increased at various places and it is used to
                            +
                            1340  * decide the index of thread.
                            +
                            1341  */
                            + +
                            1343  if (info.vectorize && info.derivimplicit_used()) {
                            +
                            1344  int tid = info.derivimplicit_var_thread_id;
                            +
                            1345  int list = info.derivimplicit_list_num;
                            +
                            1346 
                            +
                            1347  // clang-format off
                            +
                            1348  printer->add_newline(2);
                            +
                            1349  printer->add_line("/** thread specific helper routines for derivimplicit */");
                            +
                            1350 
                            +
                            1351  printer->add_newline(1);
                            +
                            1352  printer->fmt_push_block("static inline int* deriv{}_advance(ThreadDatum* thread)", list);
                            +
                            1353  printer->fmt_line("return &(thread[{}].i);", tid);
                            +
                            1354  printer->pop_block();
                            +
                            1355  printer->add_newline();
                            1356 
                            - -
                            1358  printer->add_newline(2);
                            -
                            1359  printer->push_block("namespace coreneuron");
                            -
                            1360 }
                            +
                            1357  printer->fmt_push_block("static inline int dith{}()", list);
                            +
                            1358  printer->fmt_line("return {};", tid+1);
                            +
                            1359  printer->pop_block();
                            +
                            1360  printer->add_newline();
                            1361 
                            -
                            1362 
                            - -
                            1364  printer->pop_block();
                            -
                            1365 }
                            +
                            1362  printer->fmt_push_block("static inline void** newtonspace{}(ThreadDatum* thread)", list);
                            +
                            1363  printer->fmt_line("return &(thread[{}]._pvoid);", tid+2);
                            +
                            1364  printer->pop_block();
                            +
                            1365  }
                            1366 
                            -
                            1367 
                            -
                            1368 /**
                            -
                            1369  * \details There are three types of thread variables currently considered:
                            -
                            1370  * - top local thread variables
                            -
                            1371  * - thread variables in the mod file
                            -
                            1372  * - thread variables for solver
                            -
                            1373  *
                            -
                            1374  * These variables are allocated into different thread structures and have
                            -
                            1375  * corresponding thread ids. Thread id start from 0. In mod2c implementation,
                            -
                            1376  * thread_data_index is increased at various places and it is used to
                            -
                            1377  * decide the index of thread.
                            -
                            1378  */
                            - -
                            1380  if (info.vectorize && info.derivimplicit_used()) {
                            -
                            1381  int tid = info.derivimplicit_var_thread_id;
                            -
                            1382  int list = info.derivimplicit_list_num;
                            -
                            1383 
                            -
                            1384  // clang-format off
                            -
                            1385  printer->add_newline(2);
                            -
                            1386  printer->add_line("/** thread specific helper routines for derivimplicit */");
                            -
                            1387 
                            -
                            1388  printer->add_newline(1);
                            -
                            1389  printer->fmt_push_block("static inline int* deriv{}_advance(ThreadDatum* thread)", list);
                            -
                            1390  printer->fmt_line("return &(thread[{}].i);", tid);
                            -
                            1391  printer->pop_block();
                            -
                            1392  printer->add_newline();
                            -
                            1393 
                            -
                            1394  printer->fmt_push_block("static inline int dith{}()", list);
                            -
                            1395  printer->fmt_line("return {};", tid+1);
                            -
                            1396  printer->pop_block();
                            -
                            1397  printer->add_newline();
                            -
                            1398 
                            -
                            1399  printer->fmt_push_block("static inline void** newtonspace{}(ThreadDatum* thread)", list);
                            -
                            1400  printer->fmt_line("return &(thread[{}]._pvoid);", tid+2);
                            -
                            1401  printer->pop_block();
                            +
                            1367  if (info.vectorize && !info.thread_variables.empty()) {
                            +
                            1368  printer->add_newline(2);
                            +
                            1369  printer->add_line("/** tid for thread variables */");
                            +
                            1370  printer->push_block("static inline int thread_var_tid()");
                            +
                            1371  printer->fmt_line("return {};", info.thread_var_thread_id);
                            +
                            1372  printer->pop_block();
                            +
                            1373  }
                            +
                            1374 
                            +
                            1375  if (info.vectorize && !info.top_local_variables.empty()) {
                            +
                            1376  printer->add_newline(2);
                            +
                            1377  printer->add_line("/** tid for top local tread variables */");
                            +
                            1378  printer->push_block("static inline int top_local_var_tid()");
                            +
                            1379  printer->fmt_line("return {};", info.top_local_thread_id);
                            +
                            1380  printer->pop_block();
                            +
                            1381  }
                            +
                            1382  // clang-format on
                            +
                            1383 }
                            +
                            1384 
                            +
                            1385 
                            +
                            1386 /****************************************************************************************/
                            +
                            1387 /* Routines for returning variable name */
                            +
                            1388 /****************************************************************************************/
                            +
                            1389 
                            +
                            1390 
                            + +
                            1392  bool use_instance) const {
                            +
                            1393  auto name = symbol->get_name();
                            +
                            1394  auto dimension = symbol->get_length();
                            +
                            1395  auto position = position_of_float_var(name);
                            +
                            1396  // clang-format off
                            +
                            1397  if (symbol->is_array()) {
                            +
                            1398  if (use_instance) {
                            +
                            1399  return fmt::format("(inst->{}+id*{})", name, dimension);
                            +
                            1400  }
                            +
                            1401  return fmt::format("(data + {}*pnodecount + id*{})", position, dimension);
                            1402  }
                            -
                            1403 
                            -
                            1404  if (info.vectorize && !info.thread_variables.empty()) {
                            -
                            1405  printer->add_newline(2);
                            -
                            1406  printer->add_line("/** tid for thread variables */");
                            -
                            1407  printer->push_block("static inline int thread_var_tid()");
                            -
                            1408  printer->fmt_line("return {};", info.thread_var_thread_id);
                            -
                            1409  printer->pop_block();
                            -
                            1410  }
                            -
                            1411 
                            -
                            1412  if (info.vectorize && !info.top_local_variables.empty()) {
                            -
                            1413  printer->add_newline(2);
                            -
                            1414  printer->add_line("/** tid for top local tread variables */");
                            -
                            1415  printer->push_block("static inline int top_local_var_tid()");
                            -
                            1416  printer->fmt_line("return {};", info.top_local_thread_id);
                            -
                            1417  printer->pop_block();
                            -
                            1418  }
                            -
                            1419  // clang-format on
                            -
                            1420 }
                            -
                            1421 
                            -
                            1422 
                            -
                            1423 /****************************************************************************************/
                            -
                            1424 /* Routines for returning variable name */
                            -
                            1425 /****************************************************************************************/
                            -
                            1426 
                            -
                            1427 
                            - -
                            1429  bool use_instance) const {
                            -
                            1430  auto name = symbol->get_name();
                            -
                            1431  auto dimension = symbol->get_length();
                            -
                            1432  auto position = position_of_float_var(name);
                            -
                            1433  // clang-format off
                            -
                            1434  if (symbol->is_array()) {
                            -
                            1435  if (use_instance) {
                            -
                            1436  return fmt::format("(inst->{}+id*{})", name, dimension);
                            -
                            1437  }
                            -
                            1438  return fmt::format("(data + {}*pnodecount + id*{})", position, dimension);
                            -
                            1439  }
                            -
                            1440  if (use_instance) {
                            -
                            1441  return fmt::format("inst->{}[id]", name);
                            -
                            1442  }
                            -
                            1443  return fmt::format("data[{}*pnodecount + id]", position);
                            -
                            1444  // clang-format on
                            -
                            1445 }
                            +
                            1403  if (use_instance) {
                            +
                            1404  return fmt::format("inst->{}[id]", name);
                            +
                            1405  }
                            +
                            1406  return fmt::format("data[{}*pnodecount + id]", position);
                            +
                            1407  // clang-format on
                            +
                            1408 }
                            +
                            1409 
                            +
                            1410 
                            + +
                            1412  const std::string& name,
                            +
                            1413  bool use_instance) const {
                            +
                            1414  auto position = position_of_int_var(name);
                            +
                            1415  // clang-format off
                            +
                            1416  if (symbol.is_index) {
                            +
                            1417  if (use_instance) {
                            +
                            1418  return fmt::format("inst->{}[{}]", name, position);
                            +
                            1419  }
                            +
                            1420  return fmt::format("indexes[{}]", position);
                            +
                            1421  }
                            +
                            1422  if (symbol.is_integer) {
                            +
                            1423  if (use_instance) {
                            +
                            1424  return fmt::format("inst->{}[{}*pnodecount+id]", name, position);
                            +
                            1425  }
                            +
                            1426  return fmt::format("indexes[{}*pnodecount+id]", position);
                            +
                            1427  }
                            +
                            1428  if (use_instance) {
                            +
                            1429  return fmt::format("inst->{}[indexes[{}*pnodecount + id]]", name, position);
                            +
                            1430  }
                            +
                            1431  auto data = symbol.is_vdata ? "_vdata" : "_data";
                            +
                            1432  return fmt::format("nt->{}[indexes[{}*pnodecount + id]]", data, position);
                            +
                            1433  // clang-format on
                            +
                            1434 }
                            +
                            1435 
                            +
                            1436 
                            + +
                            1438  bool use_instance) const {
                            +
                            1439  if (use_instance) {
                            +
                            1440  return fmt::format("inst->{}->{}", naming::INST_GLOBAL_MEMBER, symbol->get_name());
                            +
                            1441  } else {
                            +
                            1442  return fmt::format("{}.{}", global_struct_instance(), symbol->get_name());
                            +
                            1443  }
                            +
                            1444 }
                            +
                            1445 
                            1446 
                            -
                            1447 
                            - -
                            1449  const std::string& name,
                            -
                            1450  bool use_instance) const {
                            -
                            1451  auto position = position_of_int_var(name);
                            -
                            1452  // clang-format off
                            -
                            1453  if (symbol.is_index) {
                            -
                            1454  if (use_instance) {
                            -
                            1455  return fmt::format("inst->{}[{}]", name, position);
                            + +
                            1448  const std::string& name) const {
                            +
                            1449  std::string result(name);
                            +
                            1450  if (ion_variable_struct_required()) {
                            +
                            1451  if (info.is_ion_read_variable(name)) {
                            +
                            1452  result = naming::ION_VARNAME_PREFIX + name;
                            +
                            1453  }
                            +
                            1454  if (info.is_ion_write_variable(name)) {
                            +
                            1455  result = "ionvar." + name;
                            1456  }
                            -
                            1457  return fmt::format("indexes[{}]", position);
                            -
                            1458  }
                            -
                            1459  if (symbol.is_integer) {
                            -
                            1460  if (use_instance) {
                            -
                            1461  return fmt::format("inst->{}[{}*pnodecount+id]", name, position);
                            -
                            1462  }
                            -
                            1463  return fmt::format("indexes[{}*pnodecount+id]", position);
                            -
                            1464  }
                            -
                            1465  if (use_instance) {
                            -
                            1466  return fmt::format("inst->{}[indexes[{}*pnodecount + id]]", name, position);
                            -
                            1467  }
                            -
                            1468  auto data = symbol.is_vdata ? "_vdata" : "_data";
                            -
                            1469  return fmt::format("nt->{}[indexes[{}*pnodecount + id]]", data, position);
                            -
                            1470  // clang-format on
                            -
                            1471 }
                            -
                            1472 
                            +
                            1457  if (info.is_current(name)) {
                            +
                            1458  result = "ionvar." + name;
                            +
                            1459  }
                            +
                            1460  }
                            +
                            1461  return result;
                            +
                            1462 }
                            +
                            1463 
                            +
                            1464 
                            +
                            1465 std::string CodegenCoreneuronCppVisitor::get_variable_name(const std::string& name,
                            +
                            1466  bool use_instance) const {
                            +
                            1467  const std::string& varname = update_if_ion_variable_name(name);
                            +
                            1468 
                            +
                            1469  // clang-format off
                            +
                            1470  auto symbol_comparator = [&varname](const SymbolType& sym) {
                            +
                            1471  return varname == sym->get_name();
                            +
                            1472  };
                            1473 
                            - -
                            1475  bool use_instance) const {
                            -
                            1476  if (use_instance) {
                            -
                            1477  return fmt::format("inst->{}->{}", naming::INST_GLOBAL_MEMBER, symbol->get_name());
                            -
                            1478  } else {
                            -
                            1479  return fmt::format("{}.{}", global_struct_instance(), symbol->get_name());
                            -
                            1480  }
                            -
                            1481 }
                            -
                            1482 
                            -
                            1483 
                            - -
                            1485  const std::string& name) const {
                            -
                            1486  std::string result(name);
                            -
                            1487  if (ion_variable_struct_required()) {
                            -
                            1488  if (info.is_ion_read_variable(name)) {
                            -
                            1489  result = naming::ION_VARNAME_PREFIX + name;
                            -
                            1490  }
                            -
                            1491  if (info.is_ion_write_variable(name)) {
                            -
                            1492  result = "ionvar." + name;
                            -
                            1493  }
                            -
                            1494  if (info.is_current(name)) {
                            -
                            1495  result = "ionvar." + name;
                            -
                            1496  }
                            -
                            1497  }
                            -
                            1498  return result;
                            -
                            1499 }
                            -
                            1500 
                            +
                            1474  auto index_comparator = [&varname](const IndexVariableInfo& var) {
                            +
                            1475  return varname == var.symbol->get_name();
                            +
                            1476  };
                            +
                            1477  // clang-format on
                            +
                            1478 
                            +
                            1479  // float variable
                            +
                            1480  auto f = std::find_if(codegen_float_variables.begin(),
                            +
                            1481  codegen_float_variables.end(),
                            +
                            1482  symbol_comparator);
                            +
                            1483  if (f != codegen_float_variables.end()) {
                            +
                            1484  return float_variable_name(*f, use_instance);
                            +
                            1485  }
                            +
                            1486 
                            +
                            1487  // integer variable
                            +
                            1488  auto i =
                            +
                            1489  std::find_if(codegen_int_variables.begin(), codegen_int_variables.end(), index_comparator);
                            +
                            1490  if (i != codegen_int_variables.end()) {
                            +
                            1491  return int_variable_name(*i, varname, use_instance);
                            +
                            1492  }
                            +
                            1493 
                            +
                            1494  // global variable
                            +
                            1495  auto g = std::find_if(codegen_global_variables.begin(),
                            +
                            1496  codegen_global_variables.end(),
                            +
                            1497  symbol_comparator);
                            +
                            1498  if (g != codegen_global_variables.end()) {
                            +
                            1499  return global_variable_name(*g, use_instance);
                            +
                            1500  }
                            1501 
                            -
                            1502 std::string CodegenCoreneuronCppVisitor::get_variable_name(const std::string& name,
                            -
                            1503  bool use_instance) const {
                            -
                            1504  const std::string& varname = update_if_ion_variable_name(name);
                            +
                            1502  if (varname == naming::NTHREAD_DT_VARIABLE) {
                            +
                            1503  return std::string("nt->_") + naming::NTHREAD_DT_VARIABLE;
                            +
                            1504  }
                            1505 
                            -
                            1506  // clang-format off
                            -
                            1507  auto symbol_comparator = [&varname](const SymbolType& sym) {
                            -
                            1508  return varname == sym->get_name();
                            -
                            1509  };
                            -
                            1510 
                            -
                            1511  auto index_comparator = [&varname](const IndexVariableInfo& var) {
                            -
                            1512  return varname == var.symbol->get_name();
                            -
                            1513  };
                            -
                            1514  // clang-format on
                            -
                            1515 
                            -
                            1516  // float variable
                            -
                            1517  auto f = std::find_if(codegen_float_variables.begin(),
                            -
                            1518  codegen_float_variables.end(),
                            -
                            1519  symbol_comparator);
                            -
                            1520  if (f != codegen_float_variables.end()) {
                            -
                            1521  return float_variable_name(*f, use_instance);
                            -
                            1522  }
                            -
                            1523 
                            -
                            1524  // integer variable
                            -
                            1525  auto i =
                            -
                            1526  std::find_if(codegen_int_variables.begin(), codegen_int_variables.end(), index_comparator);
                            -
                            1527  if (i != codegen_int_variables.end()) {
                            -
                            1528  return int_variable_name(*i, varname, use_instance);
                            -
                            1529  }
                            -
                            1530 
                            -
                            1531  // global variable
                            -
                            1532  auto g = std::find_if(codegen_global_variables.begin(),
                            -
                            1533  codegen_global_variables.end(),
                            -
                            1534  symbol_comparator);
                            -
                            1535  if (g != codegen_global_variables.end()) {
                            -
                            1536  return global_variable_name(*g, use_instance);
                            -
                            1537  }
                            -
                            1538 
                            -
                            1539  if (varname == naming::NTHREAD_DT_VARIABLE) {
                            -
                            1540  return std::string("nt->_") + naming::NTHREAD_DT_VARIABLE;
                            -
                            1541  }
                            -
                            1542 
                            -
                            1543  // t in net_receive method is an argument to function and hence it should
                            -
                            1544  // ne used instead of nt->_t which is current time of thread
                            -
                            1545  if (varname == naming::NTHREAD_T_VARIABLE && !printing_net_receive) {
                            -
                            1546  return std::string("nt->_") + naming::NTHREAD_T_VARIABLE;
                            -
                            1547  }
                            -
                            1548 
                            -
                            1549  auto const iter =
                            -
                            1550  std::find_if(info.neuron_global_variables.begin(),
                            -
                            1551  info.neuron_global_variables.end(),
                            -
                            1552  [&varname](auto const& entry) { return entry.first->get_name() == varname; });
                            -
                            1553  if (iter != info.neuron_global_variables.end()) {
                            -
                            1554  std::string ret;
                            -
                            1555  if (use_instance) {
                            -
                            1556  ret = "*(inst->";
                            -
                            1557  }
                            -
                            1558  ret.append(varname);
                            -
                            1559  if (use_instance) {
                            -
                            1560  ret.append(")");
                            -
                            1561  }
                            -
                            1562  return ret;
                            -
                            1563  }
                            -
                            1564 
                            -
                            1565  // otherwise return original name
                            -
                            1566  return varname;
                            -
                            1567 }
                            -
                            1568 
                            -
                            1569 
                            -
                            1570 /****************************************************************************************/
                            -
                            1571 /* Main printing routines for code generation */
                            -
                            1572 /****************************************************************************************/
                            -
                            1573 
                            -
                            1574 
                            - -
                            1576  time_t current_time{};
                            -
                            1577  time(&current_time);
                            -
                            1578  std::string data_time_str{std::ctime(&current_time)};
                            -
                            1579  auto version = nmodl::Version::NMODL_VERSION + " [" + nmodl::Version::GIT_REVISION + "]";
                            -
                            1580 
                            -
                            1581  printer->add_line("/*********************************************************");
                            -
                            1582  printer->add_line("Model Name : ", info.mod_suffix);
                            -
                            1583  printer->add_line("Filename : ", info.mod_file, ".mod");
                            -
                            1584  printer->add_line("NMODL Version : ", nmodl_version());
                            -
                            1585  printer->fmt_line("Vectorized : {}", info.vectorize);
                            -
                            1586  printer->fmt_line("Threadsafe : {}", info.thread_safe);
                            -
                            1587  printer->add_line("Created : ", stringutils::trim(data_time_str));
                            -
                            1588  printer->add_line("Simulator : ", simulator_name());
                            -
                            1589  printer->add_line("Backend : ", backend_name());
                            -
                            1590  printer->add_line("NMODL Compiler : ", version);
                            -
                            1591  printer->add_line("*********************************************************/");
                            -
                            1592 }
                            -
                            1593 
                            -
                            1594 
                            - -
                            1596  printer->add_newline();
                            -
                            1597  printer->add_multi_line(R"CODE(
                            -
                            1598  #include <math.h>
                            -
                            1599  #include <stdio.h>
                            -
                            1600  #include <stdlib.h>
                            -
                            1601  #include <string.h>
                            -
                            1602  )CODE");
                            -
                            1603 }
                            -
                            1604 
                            -
                            1605 
                            - -
                            1607  printer->add_newline();
                            -
                            1608  printer->add_multi_line(R"CODE(
                            -
                            1609  #include <coreneuron/gpu/nrn_acc_manager.hpp>
                            -
                            1610  #include <coreneuron/mechanism/mech/mod2c_core_thread.hpp>
                            -
                            1611  #include <coreneuron/mechanism/register_mech.hpp>
                            -
                            1612  #include <coreneuron/nrnconf.h>
                            -
                            1613  #include <coreneuron/nrniv/nrniv_decl.h>
                            -
                            1614  #include <coreneuron/sim/multicore.hpp>
                            -
                            1615  #include <coreneuron/sim/scopmath/newton_thread.hpp>
                            -
                            1616  #include <coreneuron/utils/ivocvect.hpp>
                            -
                            1617  #include <coreneuron/utils/nrnoc_aux.hpp>
                            -
                            1618  #include <coreneuron/utils/randoms/nrnran123.h>
                            -
                            1619  )CODE");
                            -
                            1620  if (info.eigen_newton_solver_exist) {
                            -
                            1621  printer->add_line("#include <newton/newton.hpp>");
                            -
                            1622  }
                            -
                            1623  if (info.eigen_linear_solver_exist) {
                            -
                            1624  if (std::accumulate(info.state_vars.begin(),
                            -
                            1625  info.state_vars.end(),
                            -
                            1626  0,
                            -
                            1627  [](int l, const SymbolType& variable) {
                            -
                            1628  return l += variable->get_length();
                            -
                            1629  }) > 4) {
                            -
                            1630  printer->add_line("#include <crout/crout.hpp>");
                            -
                            1631  } else {
                            -
                            1632  printer->add_line("#include <Eigen/Dense>");
                            -
                            1633  printer->add_line("#include <Eigen/LU>");
                            -
                            1634  }
                            -
                            1635  }
                            -
                            1636 }
                            -
                            1637 
                            -
                            1638 
                            - -
                            1640  if (info.primes_size == 0) {
                            -
                            1641  return;
                            -
                            1642  }
                            -
                            1643  const auto count_prime_variables = [](auto size, const SymbolType& symbol) {
                            -
                            1644  return size += symbol->get_length();
                            -
                            1645  };
                            -
                            1646  const auto prime_variables_by_order_size =
                            -
                            1647  std::accumulate(info.prime_variables_by_order.begin(),
                            -
                            1648  info.prime_variables_by_order.end(),
                            -
                            1649  0,
                            -
                            1650  count_prime_variables);
                            -
                            1651  if (info.primes_size != prime_variables_by_order_size) {
                            -
                            1652  throw std::runtime_error{
                            -
                            1653  fmt::format("primes_size = {} differs from prime_variables_by_order.size() = {}, "
                            -
                            1654  "this should not happen.",
                            -
                            1655  info.primes_size,
                            -
                            1656  info.prime_variables_by_order.size())};
                            -
                            1657  }
                            -
                            1658  auto const initializer_list = [&](auto const& primes, const char* prefix) -> std::string {
                            -
                            1659  if (!print_initializers) {
                            -
                            1660  return {};
                            -
                            1661  }
                            -
                            1662  std::string list{"{"};
                            -
                            1663  for (auto iter = primes.begin(); iter != primes.end(); ++iter) {
                            -
                            1664  auto const& prime = *iter;
                            -
                            1665  list.append(std::to_string(position_of_float_var(prefix + prime->get_name())));
                            -
                            1666  if (std::next(iter) != primes.end()) {
                            -
                            1667  list.append(", ");
                            -
                            1668  }
                            -
                            1669  }
                            -
                            1670  list.append("}");
                            -
                            1671  return list;
                            -
                            1672  };
                            -
                            1673  printer->fmt_line("int slist1[{}]{};",
                            -
                            1674  info.primes_size,
                            -
                            1675  initializer_list(info.prime_variables_by_order, ""));
                            -
                            1676  printer->fmt_line("int dlist1[{}]{};",
                            -
                            1677  info.primes_size,
                            -
                            1678  initializer_list(info.prime_variables_by_order, "D"));
                            -
                            1679  codegen_global_variables.push_back(make_symbol("slist1"));
                            -
                            1680  codegen_global_variables.push_back(make_symbol("dlist1"));
                            -
                            1681  // additional list for derivimplicit method
                            -
                            1682  if (info.derivimplicit_used()) {
                            -
                            1683  auto primes = program_symtab->get_variables_with_properties(NmodlType::prime_name);
                            -
                            1684  printer->fmt_line("int slist2[{}]{};", info.primes_size, initializer_list(primes, ""));
                            -
                            1685  codegen_global_variables.push_back(make_symbol("slist2"));
                            +
                            1506  // t in net_receive method is an argument to function and hence it should
                            +
                            1507  // ne used instead of nt->_t which is current time of thread
                            +
                            1508  if (varname == naming::NTHREAD_T_VARIABLE && !printing_net_receive) {
                            +
                            1509  return std::string("nt->_") + naming::NTHREAD_T_VARIABLE;
                            +
                            1510  }
                            +
                            1511 
                            +
                            1512  auto const iter =
                            +
                            1513  std::find_if(info.neuron_global_variables.begin(),
                            +
                            1514  info.neuron_global_variables.end(),
                            +
                            1515  [&varname](auto const& entry) { return entry.first->get_name() == varname; });
                            +
                            1516  if (iter != info.neuron_global_variables.end()) {
                            +
                            1517  std::string ret;
                            +
                            1518  if (use_instance) {
                            +
                            1519  ret = "*(inst->";
                            +
                            1520  }
                            +
                            1521  ret.append(varname);
                            +
                            1522  if (use_instance) {
                            +
                            1523  ret.append(")");
                            +
                            1524  }
                            +
                            1525  return ret;
                            +
                            1526  }
                            +
                            1527 
                            +
                            1528  // otherwise return original name
                            +
                            1529  return varname;
                            +
                            1530 }
                            +
                            1531 
                            +
                            1532 
                            +
                            1533 /****************************************************************************************/
                            +
                            1534 /* Main printing routines for code generation */
                            +
                            1535 /****************************************************************************************/
                            +
                            1536 
                            +
                            1537 
                            + +
                            1539  time_t current_time{};
                            +
                            1540  time(&current_time);
                            +
                            1541  std::string data_time_str{std::ctime(&current_time)};
                            +
                            1542  auto version = nmodl::Version::NMODL_VERSION + " [" + nmodl::Version::GIT_REVISION + "]";
                            +
                            1543 
                            +
                            1544  printer->add_line("/*********************************************************");
                            +
                            1545  printer->add_line("Model Name : ", info.mod_suffix);
                            +
                            1546  printer->add_line("Filename : ", info.mod_file, ".mod");
                            +
                            1547  printer->add_line("NMODL Version : ", nmodl_version());
                            +
                            1548  printer->fmt_line("Vectorized : {}", info.vectorize);
                            +
                            1549  printer->fmt_line("Threadsafe : {}", info.thread_safe);
                            +
                            1550  printer->add_line("Created : ", stringutils::trim(data_time_str));
                            +
                            1551  printer->add_line("Simulator : ", simulator_name());
                            +
                            1552  printer->add_line("Backend : ", backend_name());
                            +
                            1553  printer->add_line("NMODL Compiler : ", version);
                            +
                            1554  printer->add_line("*********************************************************/");
                            +
                            1555 }
                            +
                            1556 
                            +
                            1557 
                            + +
                            1559  printer->add_newline();
                            +
                            1560  printer->add_multi_line(R"CODE(
                            +
                            1561  #include <math.h>
                            +
                            1562  #include <stdio.h>
                            +
                            1563  #include <stdlib.h>
                            +
                            1564  #include <string.h>
                            +
                            1565  )CODE");
                            +
                            1566 }
                            +
                            1567 
                            +
                            1568 
                            + +
                            1570  printer->add_newline();
                            +
                            1571  printer->add_multi_line(R"CODE(
                            +
                            1572  #include <coreneuron/gpu/nrn_acc_manager.hpp>
                            +
                            1573  #include <coreneuron/mechanism/mech/mod2c_core_thread.hpp>
                            +
                            1574  #include <coreneuron/mechanism/register_mech.hpp>
                            +
                            1575  #include <coreneuron/nrnconf.h>
                            +
                            1576  #include <coreneuron/nrniv/nrniv_decl.h>
                            +
                            1577  #include <coreneuron/sim/multicore.hpp>
                            +
                            1578  #include <coreneuron/sim/scopmath/newton_thread.hpp>
                            +
                            1579  #include <coreneuron/utils/ivocvect.hpp>
                            +
                            1580  #include <coreneuron/utils/nrnoc_aux.hpp>
                            +
                            1581  #include <coreneuron/utils/randoms/nrnran123.h>
                            +
                            1582  )CODE");
                            +
                            1583  if (info.eigen_newton_solver_exist) {
                            +
                            1584  printer->add_line("#include <newton/newton.hpp>");
                            +
                            1585  }
                            +
                            1586  if (info.eigen_linear_solver_exist) {
                            +
                            1587  if (std::accumulate(info.state_vars.begin(),
                            +
                            1588  info.state_vars.end(),
                            +
                            1589  0,
                            +
                            1590  [](int l, const SymbolType& variable) {
                            +
                            1591  return l += variable->get_length();
                            +
                            1592  }) > 4) {
                            +
                            1593  printer->add_line("#include <crout/crout.hpp>");
                            +
                            1594  } else {
                            +
                            1595  printer->add_line("#include <Eigen/Dense>");
                            +
                            1596  printer->add_line("#include <Eigen/LU>");
                            +
                            1597  }
                            +
                            1598  }
                            +
                            1599 }
                            +
                            1600 
                            +
                            1601 
                            + +
                            1603  if (info.primes_size == 0) {
                            +
                            1604  return;
                            +
                            1605  }
                            +
                            1606  const auto count_prime_variables = [](auto size, const SymbolType& symbol) {
                            +
                            1607  return size += symbol->get_length();
                            +
                            1608  };
                            +
                            1609  const auto prime_variables_by_order_size =
                            +
                            1610  std::accumulate(info.prime_variables_by_order.begin(),
                            +
                            1611  info.prime_variables_by_order.end(),
                            +
                            1612  0,
                            +
                            1613  count_prime_variables);
                            +
                            1614  if (info.primes_size != prime_variables_by_order_size) {
                            +
                            1615  throw std::runtime_error{
                            +
                            1616  fmt::format("primes_size = {} differs from prime_variables_by_order.size() = {}, "
                            +
                            1617  "this should not happen.",
                            +
                            1618  info.primes_size,
                            +
                            1619  info.prime_variables_by_order.size())};
                            +
                            1620  }
                            +
                            1621  auto const initializer_list = [&](auto const& primes, const char* prefix) -> std::string {
                            +
                            1622  if (!print_initializers) {
                            +
                            1623  return {};
                            +
                            1624  }
                            +
                            1625  std::string list{"{"};
                            +
                            1626  for (auto iter = primes.begin(); iter != primes.end(); ++iter) {
                            +
                            1627  auto const& prime = *iter;
                            +
                            1628  list.append(std::to_string(position_of_float_var(prefix + prime->get_name())));
                            +
                            1629  if (std::next(iter) != primes.end()) {
                            +
                            1630  list.append(", ");
                            +
                            1631  }
                            +
                            1632  }
                            +
                            1633  list.append("}");
                            +
                            1634  return list;
                            +
                            1635  };
                            +
                            1636  printer->fmt_line("int slist1[{}]{};",
                            +
                            1637  info.primes_size,
                            +
                            1638  initializer_list(info.prime_variables_by_order, ""));
                            +
                            1639  printer->fmt_line("int dlist1[{}]{};",
                            +
                            1640  info.primes_size,
                            +
                            1641  initializer_list(info.prime_variables_by_order, "D"));
                            +
                            1642  codegen_global_variables.push_back(make_symbol("slist1"));
                            +
                            1643  codegen_global_variables.push_back(make_symbol("dlist1"));
                            +
                            1644  // additional list for derivimplicit method
                            +
                            1645  if (info.derivimplicit_used()) {
                            +
                            1646  auto primes = program_symtab->get_variables_with_properties(NmodlType::prime_name);
                            +
                            1647  printer->fmt_line("int slist2[{}]{};", info.primes_size, initializer_list(primes, ""));
                            +
                            1648  codegen_global_variables.push_back(make_symbol("slist2"));
                            +
                            1649  }
                            +
                            1650 }
                            +
                            1651 
                            +
                            1652 
                            +
                            1653 /**
                            +
                            1654  * \details Variables required for type of ion, type of point process etc. are
                            +
                            1655  * of static int type. For the C++ backend type, it's ok to have
                            +
                            1656  * these variables as file scoped static variables.
                            +
                            1657  *
                            +
                            1658  * Initial values of state variables (h0) are also defined as static
                            +
                            1659  * variables. Note that the state could be ion variable and it could
                            +
                            1660  * be also range variable. Hence lookup into symbol table before.
                            +
                            1661  *
                            +
                            1662  * When model is not vectorized (shouldn't be the case in coreneuron)
                            +
                            1663  * the top local variables become static variables.
                            +
                            1664  *
                            +
                            1665  * Note that static variables are already initialized to 0. We do the
                            +
                            1666  * same for some variables to keep same code as neuron.
                            +
                            1667  */
                            +
                            1668 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
                            + +
                            1670  const auto value_initialize = print_initializers ? "{}" : "";
                            +
                            1671 
                            +
                            1672  auto float_type = default_float_data_type();
                            +
                            1673  printer->add_newline(2);
                            +
                            1674  printer->add_line("/** all global variables */");
                            +
                            1675  printer->fmt_push_block("struct {}", global_struct());
                            +
                            1676 
                            +
                            1677  for (const auto& ion: info.ions) {
                            +
                            1678  auto name = fmt::format("{}_type", ion.name);
                            +
                            1679  printer->fmt_line("int {}{};", name, value_initialize);
                            +
                            1680  codegen_global_variables.push_back(make_symbol(name));
                            +
                            1681  }
                            +
                            1682 
                            +
                            1683  if (info.point_process) {
                            +
                            1684  printer->fmt_line("int point_type{};", value_initialize);
                            +
                            1685  codegen_global_variables.push_back(make_symbol("point_type"));
                            1686  }
                            -
                            1687 }
                            -
                            1688 
                            -
                            1689 
                            -
                            1690 /**
                            -
                            1691  * \details Variables required for type of ion, type of point process etc. are
                            -
                            1692  * of static int type. For the C++ backend type, it's ok to have
                            -
                            1693  * these variables as file scoped static variables.
                            -
                            1694  *
                            -
                            1695  * Initial values of state variables (h0) are also defined as static
                            -
                            1696  * variables. Note that the state could be ion variable and it could
                            -
                            1697  * be also range variable. Hence lookup into symbol table before.
                            -
                            1698  *
                            -
                            1699  * When model is not vectorized (shouldn't be the case in coreneuron)
                            -
                            1700  * the top local variables become static variables.
                            -
                            1701  *
                            -
                            1702  * Note that static variables are already initialized to 0. We do the
                            -
                            1703  * same for some variables to keep same code as neuron.
                            -
                            1704  */
                            -
                            1705 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
                            - -
                            1707  const auto value_initialize = print_initializers ? "{}" : "";
                            -
                            1708 
                            -
                            1709  auto float_type = default_float_data_type();
                            -
                            1710  printer->add_newline(2);
                            -
                            1711  printer->add_line("/** all global variables */");
                            -
                            1712  printer->fmt_push_block("struct {}", global_struct());
                            -
                            1713 
                            -
                            1714  for (const auto& ion: info.ions) {
                            -
                            1715  auto name = fmt::format("{}_type", ion.name);
                            -
                            1716  printer->fmt_line("int {}{};", name, value_initialize);
                            -
                            1717  codegen_global_variables.push_back(make_symbol(name));
                            -
                            1718  }
                            -
                            1719 
                            -
                            1720  if (info.point_process) {
                            -
                            1721  printer->fmt_line("int point_type{};", value_initialize);
                            -
                            1722  codegen_global_variables.push_back(make_symbol("point_type"));
                            -
                            1723  }
                            -
                            1724 
                            -
                            1725  for (const auto& var: info.state_vars) {
                            -
                            1726  auto name = var->get_name() + "0";
                            -
                            1727  auto symbol = program_symtab->lookup(name);
                            -
                            1728  if (symbol == nullptr) {
                            -
                            1729  printer->fmt_line("{} {}{};", float_type, name, value_initialize);
                            -
                            1730  codegen_global_variables.push_back(make_symbol(name));
                            -
                            1731  }
                            -
                            1732  }
                            -
                            1733 
                            -
                            1734  // Neuron and Coreneuron adds "v" to global variables when vectorize
                            -
                            1735  // is false. But as v is always local variable and passed as argument,
                            -
                            1736  // we don't need to use global variable v
                            -
                            1737 
                            -
                            1738  auto& top_locals = info.top_local_variables;
                            -
                            1739  if (!info.vectorize && !top_locals.empty()) {
                            -
                            1740  for (const auto& var: top_locals) {
                            -
                            1741  auto name = var->get_name();
                            -
                            1742  auto length = var->get_length();
                            -
                            1743  if (var->is_array()) {
                            -
                            1744  printer->fmt_line("{} {}[{}] /* TODO init top-local-array */;",
                            -
                            1745  float_type,
                            -
                            1746  name,
                            -
                            1747  length);
                            -
                            1748  } else {
                            -
                            1749  printer->fmt_line("{} {} /* TODO init top-local */;", float_type, name);
                            -
                            1750  }
                            -
                            1751  codegen_global_variables.push_back(var);
                            -
                            1752  }
                            -
                            1753  }
                            -
                            1754 
                            -
                            1755  if (!info.thread_variables.empty()) {
                            -
                            1756  printer->fmt_line("int thread_data_in_use{};", value_initialize);
                            -
                            1757  printer->fmt_line("{} thread_data[{}] /* TODO init thread_data */;",
                            -
                            1758  float_type,
                            -
                            1759  info.thread_var_data_size);
                            -
                            1760  codegen_global_variables.push_back(make_symbol("thread_data_in_use"));
                            -
                            1761  auto symbol = make_symbol("thread_data");
                            -
                            1762  symbol->set_as_array(info.thread_var_data_size);
                            -
                            1763  codegen_global_variables.push_back(symbol);
                            -
                            1764  }
                            -
                            1765 
                            -
                            1766  // TODO: remove this entirely?
                            -
                            1767  printer->fmt_line("int reset{};", value_initialize);
                            -
                            1768  codegen_global_variables.push_back(make_symbol("reset"));
                            -
                            1769 
                            -
                            1770  printer->fmt_line("int mech_type{};", value_initialize);
                            -
                            1771  codegen_global_variables.push_back(make_symbol("mech_type"));
                            -
                            1772 
                            -
                            1773  for (const auto& var: info.global_variables) {
                            -
                            1774  auto name = var->get_name();
                            -
                            1775  auto length = var->get_length();
                            -
                            1776  if (var->is_array()) {
                            -
                            1777  printer->fmt_line("{} {}[{}] /* TODO init const-array */;", float_type, name, length);
                            -
                            1778  } else {
                            -
                            1779  double value{};
                            -
                            1780  if (auto const& value_ptr = var->get_value()) {
                            -
                            1781  value = *value_ptr;
                            -
                            1782  }
                            -
                            1783  printer->fmt_line("{} {}{};",
                            -
                            1784  float_type,
                            -
                            1785  name,
                            -
                            1786  print_initializers ? fmt::format("{{{:g}}}", value) : std::string{});
                            -
                            1787  }
                            -
                            1788  codegen_global_variables.push_back(var);
                            -
                            1789  }
                            -
                            1790 
                            -
                            1791  for (const auto& var: info.constant_variables) {
                            -
                            1792  auto const name = var->get_name();
                            -
                            1793  auto* const value_ptr = var->get_value().get();
                            -
                            1794  double const value{value_ptr ? *value_ptr : 0};
                            -
                            1795  printer->fmt_line("{} {}{};",
                            -
                            1796  float_type,
                            -
                            1797  name,
                            -
                            1798  print_initializers ? fmt::format("{{{:g}}}", value) : std::string{});
                            -
                            1799  codegen_global_variables.push_back(var);
                            -
                            1800  }
                            -
                            1801 
                            -
                            1802  print_sdlists_init(print_initializers);
                            -
                            1803 
                            -
                            1804  if (info.table_count > 0) {
                            -
                            1805  printer->fmt_line("double usetable{};", print_initializers ? "{1}" : "");
                            -
                            1806  codegen_global_variables.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
                            -
                            1807 
                            -
                            1808  for (const auto& block: info.functions_with_table) {
                            -
                            1809  const auto& name = block->get_node_name();
                            -
                            1810  printer->fmt_line("{} tmin_{}{};", float_type, name, value_initialize);
                            -
                            1811  printer->fmt_line("{} mfac_{}{};", float_type, name, value_initialize);
                            -
                            1812  codegen_global_variables.push_back(make_symbol("tmin_" + name));
                            -
                            1813  codegen_global_variables.push_back(make_symbol("mfac_" + name));
                            -
                            1814  }
                            -
                            1815 
                            -
                            1816  for (const auto& variable: info.table_statement_variables) {
                            -
                            1817  auto const name = "t_" + variable->get_name();
                            -
                            1818  auto const num_values = variable->get_num_values();
                            -
                            1819  if (variable->is_array()) {
                            -
                            1820  int array_len = variable->get_length();
                            -
                            1821  printer->fmt_line(
                            -
                            1822  "{} {}[{}][{}]{};", float_type, name, array_len, num_values, value_initialize);
                            -
                            1823  } else {
                            -
                            1824  printer->fmt_line("{} {}[{}]{};", float_type, name, num_values, value_initialize);
                            -
                            1825  }
                            -
                            1826  codegen_global_variables.push_back(make_symbol(name));
                            -
                            1827  }
                            -
                            1828  }
                            -
                            1829 
                            -
                            1830  for (const auto& f: info.function_tables) {
                            -
                            1831  printer->fmt_line("void* _ptable_{}{{}};", f->get_node_name());
                            -
                            1832  codegen_global_variables.push_back(make_symbol("_ptable_" + f->get_node_name()));
                            -
                            1833  }
                            -
                            1834 
                            -
                            1835  if (info.vectorize && info.thread_data_index) {
                            -
                            1836  printer->fmt_line("ThreadDatum ext_call_thread[{}]{};",
                            -
                            1837  info.thread_data_index,
                            -
                            1838  value_initialize);
                            -
                            1839  codegen_global_variables.push_back(make_symbol("ext_call_thread"));
                            -
                            1840  }
                            -
                            1841 
                            -
                            1842  printer->pop_block(";");
                            -
                            1843 
                            -
                            1844  print_global_var_struct_assertions();
                            -
                            1845  print_global_var_struct_decl();
                            -
                            1846 }
                            +
                            1687 
                            +
                            1688  for (const auto& var: info.state_vars) {
                            +
                            1689  auto name = var->get_name() + "0";
                            +
                            1690  auto symbol = program_symtab->lookup(name);
                            +
                            1691  if (symbol == nullptr) {
                            +
                            1692  printer->fmt_line("{} {}{};", float_type, name, value_initialize);
                            +
                            1693  codegen_global_variables.push_back(make_symbol(name));
                            +
                            1694  }
                            +
                            1695  }
                            +
                            1696 
                            +
                            1697  // Neuron and Coreneuron adds "v" to global variables when vectorize
                            +
                            1698  // is false. But as v is always local variable and passed as argument,
                            +
                            1699  // we don't need to use global variable v
                            +
                            1700 
                            +
                            1701  auto& top_locals = info.top_local_variables;
                            +
                            1702  if (!info.vectorize && !top_locals.empty()) {
                            +
                            1703  for (const auto& var: top_locals) {
                            +
                            1704  auto name = var->get_name();
                            +
                            1705  auto length = var->get_length();
                            +
                            1706  if (var->is_array()) {
                            +
                            1707  printer->fmt_line("{} {}[{}] /* TODO init top-local-array */;",
                            +
                            1708  float_type,
                            +
                            1709  name,
                            +
                            1710  length);
                            +
                            1711  } else {
                            +
                            1712  printer->fmt_line("{} {} /* TODO init top-local */;", float_type, name);
                            +
                            1713  }
                            +
                            1714  codegen_global_variables.push_back(var);
                            +
                            1715  }
                            +
                            1716  }
                            +
                            1717 
                            +
                            1718  if (!info.thread_variables.empty()) {
                            +
                            1719  printer->fmt_line("int thread_data_in_use{};", value_initialize);
                            +
                            1720  printer->fmt_line("{} thread_data[{}] /* TODO init thread_data */;",
                            +
                            1721  float_type,
                            +
                            1722  info.thread_var_data_size);
                            +
                            1723  codegen_global_variables.push_back(make_symbol("thread_data_in_use"));
                            +
                            1724  auto symbol = make_symbol("thread_data");
                            +
                            1725  symbol->set_as_array(info.thread_var_data_size);
                            +
                            1726  codegen_global_variables.push_back(symbol);
                            +
                            1727  }
                            +
                            1728 
                            +
                            1729  // TODO: remove this entirely?
                            +
                            1730  printer->fmt_line("int reset{};", value_initialize);
                            +
                            1731  codegen_global_variables.push_back(make_symbol("reset"));
                            +
                            1732 
                            +
                            1733  printer->fmt_line("int mech_type{};", value_initialize);
                            +
                            1734  codegen_global_variables.push_back(make_symbol("mech_type"));
                            +
                            1735 
                            +
                            1736  for (const auto& var: info.global_variables) {
                            +
                            1737  auto name = var->get_name();
                            +
                            1738  auto length = var->get_length();
                            +
                            1739  if (var->is_array()) {
                            +
                            1740  printer->fmt_line("{} {}[{}] /* TODO init const-array */;", float_type, name, length);
                            +
                            1741  } else {
                            +
                            1742  double value{};
                            +
                            1743  if (auto const& value_ptr = var->get_value()) {
                            +
                            1744  value = *value_ptr;
                            +
                            1745  }
                            +
                            1746  printer->fmt_line("{} {}{};",
                            +
                            1747  float_type,
                            +
                            1748  name,
                            +
                            1749  print_initializers ? fmt::format("{{{:g}}}", value) : std::string{});
                            +
                            1750  }
                            +
                            1751  codegen_global_variables.push_back(var);
                            +
                            1752  }
                            +
                            1753 
                            +
                            1754  for (const auto& var: info.constant_variables) {
                            +
                            1755  auto const name = var->get_name();
                            +
                            1756  auto* const value_ptr = var->get_value().get();
                            +
                            1757  double const value{value_ptr ? *value_ptr : 0};
                            +
                            1758  printer->fmt_line("{} {}{};",
                            +
                            1759  float_type,
                            +
                            1760  name,
                            +
                            1761  print_initializers ? fmt::format("{{{:g}}}", value) : std::string{});
                            +
                            1762  codegen_global_variables.push_back(var);
                            +
                            1763  }
                            +
                            1764 
                            +
                            1765  print_sdlists_init(print_initializers);
                            +
                            1766 
                            +
                            1767  if (info.table_count > 0) {
                            +
                            1768  printer->fmt_line("double usetable{};", print_initializers ? "{1}" : "");
                            +
                            1769  codegen_global_variables.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
                            +
                            1770 
                            +
                            1771  for (const auto& block: info.functions_with_table) {
                            +
                            1772  const auto& name = block->get_node_name();
                            +
                            1773  printer->fmt_line("{} tmin_{}{};", float_type, name, value_initialize);
                            +
                            1774  printer->fmt_line("{} mfac_{}{};", float_type, name, value_initialize);
                            +
                            1775  codegen_global_variables.push_back(make_symbol("tmin_" + name));
                            +
                            1776  codegen_global_variables.push_back(make_symbol("mfac_" + name));
                            +
                            1777  }
                            +
                            1778 
                            +
                            1779  for (const auto& variable: info.table_statement_variables) {
                            +
                            1780  auto const name = "t_" + variable->get_name();
                            +
                            1781  auto const num_values = variable->get_num_values();
                            +
                            1782  if (variable->is_array()) {
                            +
                            1783  int array_len = variable->get_length();
                            +
                            1784  printer->fmt_line(
                            +
                            1785  "{} {}[{}][{}]{};", float_type, name, array_len, num_values, value_initialize);
                            +
                            1786  } else {
                            +
                            1787  printer->fmt_line("{} {}[{}]{};", float_type, name, num_values, value_initialize);
                            +
                            1788  }
                            +
                            1789  codegen_global_variables.push_back(make_symbol(name));
                            +
                            1790  }
                            +
                            1791  }
                            +
                            1792 
                            +
                            1793  for (const auto& f: info.function_tables) {
                            +
                            1794  printer->fmt_line("void* _ptable_{}{{}};", f->get_node_name());
                            +
                            1795  codegen_global_variables.push_back(make_symbol("_ptable_" + f->get_node_name()));
                            +
                            1796  }
                            +
                            1797 
                            +
                            1798  if (info.vectorize && info.thread_data_index) {
                            +
                            1799  printer->fmt_line("ThreadDatum ext_call_thread[{}]{};",
                            +
                            1800  info.thread_data_index,
                            +
                            1801  value_initialize);
                            +
                            1802  codegen_global_variables.push_back(make_symbol("ext_call_thread"));
                            +
                            1803  }
                            +
                            1804 
                            +
                            1805  printer->pop_block(";");
                            +
                            1806 
                            +
                            1807  print_global_var_struct_assertions();
                            +
                            1808  print_global_var_struct_decl();
                            +
                            1809 }
                            +
                            1810 
                            +
                            1811 
                            + +
                            1813  // Assert some things that we assume when copying instances of this struct
                            +
                            1814  // to the GPU and so on.
                            +
                            1815  printer->fmt_line("static_assert(std::is_trivially_copy_constructible_v<{}>);",
                            +
                            1816  global_struct());
                            +
                            1817  printer->fmt_line("static_assert(std::is_trivially_move_constructible_v<{}>);",
                            +
                            1818  global_struct());
                            +
                            1819  printer->fmt_line("static_assert(std::is_trivially_copy_assignable_v<{}>);", global_struct());
                            +
                            1820  printer->fmt_line("static_assert(std::is_trivially_move_assignable_v<{}>);", global_struct());
                            +
                            1821  printer->fmt_line("static_assert(std::is_trivially_destructible_v<{}>);", global_struct());
                            +
                            1822 }
                            +
                            1823 
                            +
                            1824 
                            +
                            1825 /**
                            +
                            1826  * Print structs that encapsulate information about scalar and
                            +
                            1827  * vector elements of type global and thread variables.
                            +
                            1828  */
                            + +
                            1830  auto variable_printer =
                            +
                            1831  [&](const std::vector<SymbolType>& variables, bool if_array, bool if_vector) {
                            +
                            1832  for (const auto& variable: variables) {
                            +
                            1833  if (variable->is_array() == if_array) {
                            +
                            1834  // false => do not use the instance struct, which is not
                            +
                            1835  // defined in the global declaration that we are printing
                            +
                            1836  auto name = get_variable_name(variable->get_name(), false);
                            +
                            1837  auto ename = add_escape_quote(variable->get_name() + "_" + info.mod_suffix);
                            +
                            1838  auto length = variable->get_length();
                            +
                            1839  if (if_vector) {
                            +
                            1840  printer->fmt_line("{{{}, {}, {}}},", ename, name, length);
                            +
                            1841  } else {
                            +
                            1842  printer->fmt_line("{{{}, &{}}},", ename, name);
                            +
                            1843  }
                            +
                            1844  }
                            +
                            1845  }
                            +
                            1846  };
                            1847 
                            -
                            1848 
                            - -
                            1850  // Assert some things that we assume when copying instances of this struct
                            -
                            1851  // to the GPU and so on.
                            -
                            1852  printer->fmt_line("static_assert(std::is_trivially_copy_constructible_v<{}>);",
                            -
                            1853  global_struct());
                            -
                            1854  printer->fmt_line("static_assert(std::is_trivially_move_constructible_v<{}>);",
                            -
                            1855  global_struct());
                            -
                            1856  printer->fmt_line("static_assert(std::is_trivially_copy_assignable_v<{}>);", global_struct());
                            -
                            1857  printer->fmt_line("static_assert(std::is_trivially_move_assignable_v<{}>);", global_struct());
                            -
                            1858  printer->fmt_line("static_assert(std::is_trivially_destructible_v<{}>);", global_struct());
                            -
                            1859 }
                            -
                            1860 
                            -
                            1861 
                            -
                            1862 /**
                            -
                            1863  * Print structs that encapsulate information about scalar and
                            -
                            1864  * vector elements of type global and thread variables.
                            -
                            1865  */
                            - -
                            1867  auto variable_printer =
                            -
                            1868  [&](const std::vector<SymbolType>& variables, bool if_array, bool if_vector) {
                            -
                            1869  for (const auto& variable: variables) {
                            -
                            1870  if (variable->is_array() == if_array) {
                            -
                            1871  // false => do not use the instance struct, which is not
                            -
                            1872  // defined in the global declaration that we are printing
                            -
                            1873  auto name = get_variable_name(variable->get_name(), false);
                            -
                            1874  auto ename = add_escape_quote(variable->get_name() + "_" + info.mod_suffix);
                            -
                            1875  auto length = variable->get_length();
                            -
                            1876  if (if_vector) {
                            -
                            1877  printer->fmt_line("{{{}, {}, {}}},", ename, name, length);
                            -
                            1878  } else {
                            -
                            1879  printer->fmt_line("{{{}, &{}}},", ename, name);
                            -
                            1880  }
                            -
                            1881  }
                            -
                            1882  }
                            -
                            1883  };
                            -
                            1884 
                            -
                            1885  auto globals = info.global_variables;
                            -
                            1886  auto thread_vars = info.thread_variables;
                            -
                            1887 
                            -
                            1888  if (info.table_count > 0) {
                            -
                            1889  globals.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
                            -
                            1890  }
                            -
                            1891 
                            -
                            1892  printer->add_newline(2);
                            -
                            1893  printer->add_line("/** connect global (scalar) variables to hoc -- */");
                            -
                            1894  printer->add_line("static DoubScal hoc_scalar_double[] = {");
                            -
                            1895  printer->increase_indent();
                            -
                            1896  variable_printer(globals, false, false);
                            -
                            1897  variable_printer(thread_vars, false, false);
                            -
                            1898  printer->add_line("{nullptr, nullptr}");
                            -
                            1899  printer->decrease_indent();
                            -
                            1900  printer->add_line("};");
                            -
                            1901 
                            -
                            1902  printer->add_newline(2);
                            -
                            1903  printer->add_line("/** connect global (array) variables to hoc -- */");
                            -
                            1904  printer->add_line("static DoubVec hoc_vector_double[] = {");
                            -
                            1905  printer->increase_indent();
                            -
                            1906  variable_printer(globals, true, true);
                            -
                            1907  variable_printer(thread_vars, true, true);
                            -
                            1908  printer->add_line("{nullptr, nullptr, 0}");
                            -
                            1909  printer->decrease_indent();
                            -
                            1910  printer->add_line("};");
                            -
                            1911 }
                            -
                            1912 
                            -
                            1913 
                            -
                            1914 /**
                            -
                            1915  * Return registration type for a given BEFORE/AFTER block
                            -
                            1916  * /param block A BEFORE/AFTER block being registered
                            -
                            1917  *
                            -
                            1918  * Depending on a block type i.e. BEFORE or AFTER and also type
                            -
                            1919  * of it's associated block i.e. BREAKPOINT, INITIAL, SOLVE and
                            -
                            1920  * STEP, the registration type (as an integer) is calculated.
                            -
                            1921  * These values are then interpreted by CoreNEURON internally.
                            -
                            1922  */
                            -
                            1923 static std::string get_register_type_for_ba_block(const ast::Block* block) {
                            -
                            1924  std::string register_type{};
                            -
                            1925  BAType ba_type{};
                            -
                            1926  /// before block have value 10 and after block 20
                            -
                            1927  if (block->is_before_block()) {
                            -
                            1928  // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
                            -
                            1929  register_type = "BAType::Before";
                            -
                            1930  ba_type =
                            -
                            1931  dynamic_cast<const ast::BeforeBlock*>(block)->get_bablock()->get_type()->get_value();
                            -
                            1932  } else {
                            -
                            1933  // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
                            -
                            1934  register_type = "BAType::After";
                            -
                            1935  ba_type =
                            -
                            1936  dynamic_cast<const ast::AfterBlock*>(block)->get_bablock()->get_type()->get_value();
                            -
                            1937  }
                            -
                            1938 
                            -
                            1939  /// associated blocks have different values (1 to 4) based on type.
                            -
                            1940  /// These values are based on neuron/coreneuron implementation details.
                            -
                            1941  if (ba_type == BATYPE_BREAKPOINT) {
                            -
                            1942  register_type += " + BAType::Breakpoint";
                            -
                            1943  } else if (ba_type == BATYPE_SOLVE) {
                            -
                            1944  register_type += " + BAType::Solve";
                            -
                            1945  } else if (ba_type == BATYPE_INITIAL) {
                            -
                            1946  register_type += " + BAType::Initial";
                            -
                            1947  } else if (ba_type == BATYPE_STEP) {
                            -
                            1948  register_type += " + BAType::Step";
                            -
                            1949  } else {
                            -
                            1950  throw std::runtime_error("Unhandled Before/After type encountered during code generation");
                            -
                            1951  }
                            -
                            1952  return register_type;
                            -
                            1953 }
                            -
                            1954 
                            -
                            1955 
                            -
                            1956 /**
                            -
                            1957  * \details Every mod file has register function to connect with the simulator.
                            -
                            1958  * Various information about mechanism and callbacks get registered with
                            -
                            1959  * the simulator using suffix_reg() function.
                            -
                            1960  *
                            -
                            1961  * Here are details:
                            -
                            1962  * - We should exclude that callback based on the solver, watch statements.
                            -
                            1963  * - If nrn_get_mechtype is < -1 means that mechanism is not used in the
                            -
                            1964  * context of neuron execution and hence could be ignored in coreneuron
                            -
                            1965  * execution.
                            -
                            1966  * - Ions are internally defined and their types can be queried similar to
                            -
                            1967  * other mechanisms.
                            -
                            1968  * - hoc_register_var may not be needed in the context of coreneuron
                            -
                            1969  * - We assume net receive buffer is on. This is because generated code is
                            -
                            1970  * compatible for cpu as well as gpu target.
                            -
                            1971  */
                            -
                            1972 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
                            - -
                            1974  printer->add_newline(2);
                            -
                            1975  printer->add_line("/** register channel with the simulator */");
                            -
                            1976  printer->fmt_push_block("void _{}_reg()", info.mod_file);
                            -
                            1977 
                            -
                            1978  // type related information
                            -
                            1979  auto suffix = add_escape_quote(info.mod_suffix);
                            -
                            1980  printer->add_newline();
                            -
                            1981  printer->fmt_line("int mech_type = nrn_get_mechtype({});", suffix);
                            -
                            1982  printer->fmt_line("{} = mech_type;", get_variable_name("mech_type", false));
                            -
                            1983  printer->push_block("if (mech_type == -1)");
                            -
                            1984  printer->add_line("return;");
                            -
                            1985  printer->pop_block();
                            -
                            1986 
                            -
                            1987  printer->add_newline();
                            -
                            1988  printer->add_line("_nrn_layout_reg(mech_type, 0);"); // 0 for SoA
                            -
                            1989 
                            -
                            1990  // register mechanism
                            -
                            1991  const auto mech_arguments = register_mechanism_arguments();
                            -
                            1992  const auto number_of_thread_objects = num_thread_objects();
                            -
                            1993  if (info.point_process) {
                            -
                            1994  printer->fmt_line("point_register_mech({}, {}, {}, {});",
                            -
                            1995  mech_arguments,
                            -
                            1996  info.constructor_node ? method_name(naming::NRN_CONSTRUCTOR_METHOD)
                            -
                            1997  : "nullptr",
                            -
                            1998  info.destructor_node ? method_name(naming::NRN_DESTRUCTOR_METHOD)
                            -
                            1999  : "nullptr",
                            -
                            2000  number_of_thread_objects);
                            -
                            2001  } else {
                            -
                            2002  printer->fmt_line("register_mech({}, {});", mech_arguments, number_of_thread_objects);
                            -
                            2003  if (info.constructor_node) {
                            -
                            2004  printer->fmt_line("register_constructor({});",
                            -
                            2005  method_name(naming::NRN_CONSTRUCTOR_METHOD));
                            -
                            2006  }
                            +
                            1848  auto globals = info.global_variables;
                            +
                            1849  auto thread_vars = info.thread_variables;
                            +
                            1850 
                            +
                            1851  if (info.table_count > 0) {
                            +
                            1852  globals.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
                            +
                            1853  }
                            +
                            1854 
                            +
                            1855  printer->add_newline(2);
                            +
                            1856  printer->add_line("/** connect global (scalar) variables to hoc -- */");
                            +
                            1857  printer->add_line("static DoubScal hoc_scalar_double[] = {");
                            +
                            1858  printer->increase_indent();
                            +
                            1859  variable_printer(globals, false, false);
                            +
                            1860  variable_printer(thread_vars, false, false);
                            +
                            1861  printer->add_line("{nullptr, nullptr}");
                            +
                            1862  printer->decrease_indent();
                            +
                            1863  printer->add_line("};");
                            +
                            1864 
                            +
                            1865  printer->add_newline(2);
                            +
                            1866  printer->add_line("/** connect global (array) variables to hoc -- */");
                            +
                            1867  printer->add_line("static DoubVec hoc_vector_double[] = {");
                            +
                            1868  printer->increase_indent();
                            +
                            1869  variable_printer(globals, true, true);
                            +
                            1870  variable_printer(thread_vars, true, true);
                            +
                            1871  printer->add_line("{nullptr, nullptr, 0}");
                            +
                            1872  printer->decrease_indent();
                            +
                            1873  printer->add_line("};");
                            +
                            1874 }
                            +
                            1875 
                            +
                            1876 
                            +
                            1877 /**
                            +
                            1878  * Return registration type for a given BEFORE/AFTER block
                            +
                            1879  * /param block A BEFORE/AFTER block being registered
                            +
                            1880  *
                            +
                            1881  * Depending on a block type i.e. BEFORE or AFTER and also type
                            +
                            1882  * of it's associated block i.e. BREAKPOINT, INITIAL, SOLVE and
                            +
                            1883  * STEP, the registration type (as an integer) is calculated.
                            +
                            1884  * These values are then interpreted by CoreNEURON internally.
                            +
                            1885  */
                            +
                            1886 static std::string get_register_type_for_ba_block(const ast::Block* block) {
                            +
                            1887  std::string register_type{};
                            +
                            1888  BAType ba_type{};
                            +
                            1889  /// before block have value 10 and after block 20
                            +
                            1890  if (block->is_before_block()) {
                            +
                            1891  // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
                            +
                            1892  register_type = "BAType::Before";
                            +
                            1893  ba_type =
                            +
                            1894  dynamic_cast<const ast::BeforeBlock*>(block)->get_bablock()->get_type()->get_value();
                            +
                            1895  } else {
                            +
                            1896  // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
                            +
                            1897  register_type = "BAType::After";
                            +
                            1898  ba_type =
                            +
                            1899  dynamic_cast<const ast::AfterBlock*>(block)->get_bablock()->get_type()->get_value();
                            +
                            1900  }
                            +
                            1901 
                            +
                            1902  /// associated blocks have different values (1 to 4) based on type.
                            +
                            1903  /// These values are based on neuron/coreneuron implementation details.
                            +
                            1904  if (ba_type == BATYPE_BREAKPOINT) {
                            +
                            1905  register_type += " + BAType::Breakpoint";
                            +
                            1906  } else if (ba_type == BATYPE_SOLVE) {
                            +
                            1907  register_type += " + BAType::Solve";
                            +
                            1908  } else if (ba_type == BATYPE_INITIAL) {
                            +
                            1909  register_type += " + BAType::Initial";
                            +
                            1910  } else if (ba_type == BATYPE_STEP) {
                            +
                            1911  register_type += " + BAType::Step";
                            +
                            1912  } else {
                            +
                            1913  throw std::runtime_error("Unhandled Before/After type encountered during code generation");
                            +
                            1914  }
                            +
                            1915  return register_type;
                            +
                            1916 }
                            +
                            1917 
                            +
                            1918 
                            +
                            1919 /**
                            +
                            1920  * \details Every mod file has register function to connect with the simulator.
                            +
                            1921  * Various information about mechanism and callbacks get registered with
                            +
                            1922  * the simulator using suffix_reg() function.
                            +
                            1923  *
                            +
                            1924  * Here are details:
                            +
                            1925  * - We should exclude that callback based on the solver, watch statements.
                            +
                            1926  * - If nrn_get_mechtype is < -1 means that mechanism is not used in the
                            +
                            1927  * context of neuron execution and hence could be ignored in coreneuron
                            +
                            1928  * execution.
                            +
                            1929  * - Ions are internally defined and their types can be queried similar to
                            +
                            1930  * other mechanisms.
                            +
                            1931  * - hoc_register_var may not be needed in the context of coreneuron
                            +
                            1932  * - We assume net receive buffer is on. This is because generated code is
                            +
                            1933  * compatible for cpu as well as gpu target.
                            +
                            1934  */
                            +
                            1935 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
                            + +
                            1937  printer->add_newline(2);
                            +
                            1938  printer->add_line("/** register channel with the simulator */");
                            +
                            1939  printer->fmt_push_block("void _{}_reg()", info.mod_file);
                            +
                            1940 
                            +
                            1941  // type related information
                            +
                            1942  auto suffix = add_escape_quote(info.mod_suffix);
                            +
                            1943  printer->add_newline();
                            +
                            1944  printer->fmt_line("int mech_type = nrn_get_mechtype({});", suffix);
                            +
                            1945  printer->fmt_line("{} = mech_type;", get_variable_name("mech_type", false));
                            +
                            1946  printer->push_block("if (mech_type == -1)");
                            +
                            1947  printer->add_line("return;");
                            +
                            1948  printer->pop_block();
                            +
                            1949 
                            +
                            1950  printer->add_newline();
                            +
                            1951  printer->add_line("_nrn_layout_reg(mech_type, 0);"); // 0 for SoA
                            +
                            1952 
                            +
                            1953  // register mechanism
                            +
                            1954  const auto mech_arguments = register_mechanism_arguments();
                            +
                            1955  const auto number_of_thread_objects = num_thread_objects();
                            +
                            1956  if (info.point_process) {
                            +
                            1957  printer->fmt_line("point_register_mech({}, {}, {}, {});",
                            +
                            1958  mech_arguments,
                            +
                            1959  info.constructor_node ? method_name(naming::NRN_CONSTRUCTOR_METHOD)
                            +
                            1960  : "nullptr",
                            +
                            1961  info.destructor_node ? method_name(naming::NRN_DESTRUCTOR_METHOD)
                            +
                            1962  : "nullptr",
                            +
                            1963  number_of_thread_objects);
                            +
                            1964  } else {
                            +
                            1965  printer->fmt_line("register_mech({}, {});", mech_arguments, number_of_thread_objects);
                            +
                            1966  if (info.constructor_node) {
                            +
                            1967  printer->fmt_line("register_constructor({});",
                            +
                            1968  method_name(naming::NRN_CONSTRUCTOR_METHOD));
                            +
                            1969  }
                            +
                            1970  }
                            +
                            1971 
                            +
                            1972  // types for ion
                            +
                            1973  for (const auto& ion: info.ions) {
                            +
                            1974  printer->fmt_line("{} = nrn_get_mechtype({});",
                            +
                            1975  get_variable_name(ion.name + "_type", false),
                            +
                            1976  add_escape_quote(ion.name + "_ion"));
                            +
                            1977  }
                            +
                            1978  printer->add_newline();
                            +
                            1979 
                            +
                            1980  /*
                            +
                            1981  * Register callbacks for thread allocation and cleanup. Note that thread_data_index
                            +
                            1982  * represent total number of thread used minus 1 (i.e. index of last thread).
                            +
                            1983  */
                            +
                            1984  if (info.vectorize && (info.thread_data_index != 0)) {
                            +
                            1985  // false to avoid getting the copy from the instance structure
                            +
                            1986  printer->fmt_line("thread_mem_init({});", get_variable_name("ext_call_thread", false));
                            +
                            1987  }
                            +
                            1988 
                            +
                            1989  if (!info.thread_variables.empty()) {
                            +
                            1990  printer->fmt_line("{} = 0;", get_variable_name("thread_data_in_use"));
                            +
                            1991  }
                            +
                            1992 
                            +
                            1993  if (info.thread_callback_register) {
                            +
                            1994  printer->add_line("_nrn_thread_reg0(mech_type, thread_mem_cleanup);");
                            +
                            1995  printer->add_line("_nrn_thread_reg1(mech_type, thread_mem_init);");
                            +
                            1996  }
                            +
                            1997 
                            +
                            1998  if (info.emit_table_thread()) {
                            +
                            1999  auto name = method_name("check_table_thread");
                            +
                            2000  printer->fmt_line("_nrn_thread_table_reg(mech_type, {});", name);
                            +
                            2001  }
                            +
                            2002 
                            +
                            2003  // register read/write callbacks for pointers
                            +
                            2004  if (info.bbcore_pointer_used) {
                            +
                            2005  printer->add_line("hoc_reg_bbcore_read(mech_type, bbcore_read);");
                            +
                            2006  printer->add_line("hoc_reg_bbcore_write(mech_type, bbcore_write);");
                            2007  }
                            2008 
                            -
                            2009  // types for ion
                            -
                            2010  for (const auto& ion: info.ions) {
                            -
                            2011  printer->fmt_line("{} = nrn_get_mechtype({});",
                            -
                            2012  get_variable_name(ion.name + "_type", false),
                            -
                            2013  add_escape_quote(ion.name + "_ion"));
                            -
                            2014  }
                            -
                            2015  printer->add_newline();
                            -
                            2016 
                            -
                            2017  /*
                            -
                            2018  * Register callbacks for thread allocation and cleanup. Note that thread_data_index
                            -
                            2019  * represent total number of thread used minus 1 (i.e. index of last thread).
                            -
                            2020  */
                            -
                            2021  if (info.vectorize && (info.thread_data_index != 0)) {
                            -
                            2022  // false to avoid getting the copy from the instance structure
                            -
                            2023  printer->fmt_line("thread_mem_init({});", get_variable_name("ext_call_thread", false));
                            +
                            2009  // register size of double and int elements
                            +
                            2010  // clang-format off
                            +
                            2011  printer->add_line("hoc_register_prop_size(mech_type, float_variables_size(), int_variables_size());");
                            +
                            2012  // clang-format on
                            +
                            2013 
                            +
                            2014  // register semantics for index variables
                            +
                            2015  for (auto& semantic: info.semantics) {
                            +
                            2016  auto args =
                            +
                            2017  fmt::format("mech_type, {}, {}", semantic.index, add_escape_quote(semantic.name));
                            +
                            2018  printer->fmt_line("hoc_register_dparam_semantics({});", args);
                            +
                            2019  }
                            +
                            2020 
                            +
                            2021  if (info.is_watch_used()) {
                            +
                            2022  auto watch_fun = compute_method_name(BlockType::Watch);
                            +
                            2023  printer->fmt_line("hoc_register_watch_check({}, mech_type);", watch_fun);
                            2024  }
                            2025 
                            -
                            2026  if (!info.thread_variables.empty()) {
                            -
                            2027  printer->fmt_line("{} = 0;", get_variable_name("thread_data_in_use"));
                            +
                            2026  if (info.write_concentration) {
                            +
                            2027  printer->add_line("nrn_writes_conc(mech_type, 0);");
                            2028  }
                            2029 
                            -
                            2030  if (info.thread_callback_register) {
                            -
                            2031  printer->add_line("_nrn_thread_reg0(mech_type, thread_mem_cleanup);");
                            -
                            2032  printer->add_line("_nrn_thread_reg1(mech_type, thread_mem_init);");
                            +
                            2030  // register various information for point process type
                            +
                            2031  if (info.net_event_used) {
                            +
                            2032  printer->add_line("add_nrn_has_net_event(mech_type);");
                            2033  }
                            -
                            2034 
                            -
                            2035  if (info.emit_table_thread()) {
                            -
                            2036  auto name = method_name("check_table_thread");
                            -
                            2037  printer->fmt_line("_nrn_thread_table_reg(mech_type, {});", name);
                            -
                            2038  }
                            -
                            2039 
                            -
                            2040  // register read/write callbacks for pointers
                            -
                            2041  if (info.bbcore_pointer_used) {
                            -
                            2042  printer->add_line("hoc_reg_bbcore_read(mech_type, bbcore_read);");
                            -
                            2043  printer->add_line("hoc_reg_bbcore_write(mech_type, bbcore_write);");
                            -
                            2044  }
                            -
                            2045 
                            -
                            2046  // register size of double and int elements
                            -
                            2047  // clang-format off
                            -
                            2048  printer->add_line("hoc_register_prop_size(mech_type, float_variables_size(), int_variables_size());");
                            -
                            2049  // clang-format on
                            -
                            2050 
                            -
                            2051  // register semantics for index variables
                            -
                            2052  for (auto& semantic: info.semantics) {
                            -
                            2053  auto args =
                            -
                            2054  fmt::format("mech_type, {}, {}", semantic.index, add_escape_quote(semantic.name));
                            -
                            2055  printer->fmt_line("hoc_register_dparam_semantics({});", args);
                            -
                            2056  }
                            -
                            2057 
                            -
                            2058  if (info.is_watch_used()) {
                            -
                            2059  auto watch_fun = compute_method_name(BlockType::Watch);
                            -
                            2060  printer->fmt_line("hoc_register_watch_check({}, mech_type);", watch_fun);
                            +
                            2034  if (info.artificial_cell) {
                            +
                            2035  printer->fmt_line("add_nrn_artcell(mech_type, {});", info.tqitem_index);
                            +
                            2036  }
                            +
                            2037  if (net_receive_buffering_required()) {
                            +
                            2038  printer->fmt_line("hoc_register_net_receive_buffering({}, mech_type);",
                            +
                            2039  method_name("net_buf_receive"));
                            +
                            2040  }
                            +
                            2041  if (info.num_net_receive_parameters != 0) {
                            +
                            2042  auto net_recv_init_arg = "nullptr";
                            +
                            2043  if (info.net_receive_initial_node != nullptr) {
                            +
                            2044  net_recv_init_arg = "net_init";
                            +
                            2045  }
                            +
                            2046  printer->fmt_line("set_pnt_receive(mech_type, {}, {}, num_net_receive_args());",
                            +
                            2047  method_name("net_receive"),
                            +
                            2048  net_recv_init_arg);
                            +
                            2049  }
                            +
                            2050  if (info.for_netcon_used) {
                            +
                            2051  // index where information about FOR_NETCON is stored in the integer array
                            +
                            2052  const auto index =
                            +
                            2053  std::find_if(info.semantics.begin(), info.semantics.end(), [](const IndexSemantics& a) {
                            +
                            2054  return a.name == naming::FOR_NETCON_SEMANTIC;
                            +
                            2055  })->index;
                            +
                            2056  printer->fmt_line("add_nrn_fornetcons(mech_type, {});", index);
                            +
                            2057  }
                            +
                            2058 
                            +
                            2059  if (info.net_event_used || info.net_send_used) {
                            +
                            2060  printer->add_line("hoc_register_net_send_buffering(mech_type);");
                            2061  }
                            -
                            2062 
                            -
                            2063  if (info.write_concentration) {
                            -
                            2064  printer->add_line("nrn_writes_conc(mech_type, 0);");
                            -
                            2065  }
                            -
                            2066 
                            -
                            2067  // register various information for point process type
                            -
                            2068  if (info.net_event_used) {
                            -
                            2069  printer->add_line("add_nrn_has_net_event(mech_type);");
                            +
                            2062 
                            +
                            2063  /// register all before/after blocks
                            +
                            2064  for (size_t i = 0; i < info.before_after_blocks.size(); i++) {
                            +
                            2065  // register type and associated function name for the block
                            +
                            2066  const auto& block = info.before_after_blocks[i];
                            +
                            2067  std::string register_type = get_register_type_for_ba_block(block);
                            +
                            2068  std::string function_name = method_name(fmt::format("nrn_before_after_{}", i));
                            +
                            2069  printer->fmt_line("hoc_reg_ba(mech_type, {}, {});", function_name, register_type);
                            2070  }
                            -
                            2071  if (info.artificial_cell) {
                            -
                            2072  printer->fmt_line("add_nrn_artcell(mech_type, {});", info.tqitem_index);
                            -
                            2073  }
                            -
                            2074  if (net_receive_buffering_required()) {
                            -
                            2075  printer->fmt_line("hoc_register_net_receive_buffering({}, mech_type);",
                            -
                            2076  method_name("net_buf_receive"));
                            -
                            2077  }
                            -
                            2078  if (info.num_net_receive_parameters != 0) {
                            -
                            2079  auto net_recv_init_arg = "nullptr";
                            -
                            2080  if (info.net_receive_initial_node != nullptr) {
                            -
                            2081  net_recv_init_arg = "net_init";
                            -
                            2082  }
                            -
                            2083  printer->fmt_line("set_pnt_receive(mech_type, {}, {}, num_net_receive_args());",
                            -
                            2084  method_name("net_receive"),
                            -
                            2085  net_recv_init_arg);
                            -
                            2086  }
                            -
                            2087  if (info.for_netcon_used) {
                            -
                            2088  // index where information about FOR_NETCON is stored in the integer array
                            -
                            2089  const auto index =
                            -
                            2090  std::find_if(info.semantics.begin(), info.semantics.end(), [](const IndexSemantics& a) {
                            -
                            2091  return a.name == naming::FOR_NETCON_SEMANTIC;
                            -
                            2092  })->index;
                            -
                            2093  printer->fmt_line("add_nrn_fornetcons(mech_type, {});", index);
                            -
                            2094  }
                            -
                            2095 
                            -
                            2096  if (info.net_event_used || info.net_send_used) {
                            -
                            2097  printer->add_line("hoc_register_net_send_buffering(mech_type);");
                            -
                            2098  }
                            -
                            2099 
                            -
                            2100  /// register all before/after blocks
                            -
                            2101  for (size_t i = 0; i < info.before_after_blocks.size(); i++) {
                            -
                            2102  // register type and associated function name for the block
                            -
                            2103  const auto& block = info.before_after_blocks[i];
                            -
                            2104  std::string register_type = get_register_type_for_ba_block(block);
                            -
                            2105  std::string function_name = method_name(fmt::format("nrn_before_after_{}", i));
                            -
                            2106  printer->fmt_line("hoc_reg_ba(mech_type, {}, {});", function_name, register_type);
                            +
                            2071 
                            +
                            2072  // register variables for hoc
                            +
                            2073  printer->add_line("hoc_register_var(hoc_scalar_double, hoc_vector_double, NULL);");
                            +
                            2074  printer->pop_block();
                            +
                            2075 }
                            +
                            2076 
                            +
                            2077 
                            + +
                            2079  if (!info.thread_callback_register) {
                            +
                            2080  return;
                            +
                            2081  }
                            +
                            2082 
                            +
                            2083  // thread_mem_init callback
                            +
                            2084  printer->add_newline(2);
                            +
                            2085  printer->add_line("/** thread memory allocation callback */");
                            +
                            2086  printer->push_block("static void thread_mem_init(ThreadDatum* thread) ");
                            +
                            2087 
                            +
                            2088  if (info.vectorize && info.derivimplicit_used()) {
                            +
                            2089  printer->fmt_line("thread[dith{}()].pval = nullptr;", info.derivimplicit_list_num);
                            +
                            2090  }
                            +
                            2091  if (info.vectorize && (info.top_local_thread_size != 0)) {
                            +
                            2092  auto length = info.top_local_thread_size;
                            +
                            2093  auto allocation = fmt::format("(double*)mem_alloc({}, sizeof(double))", length);
                            +
                            2094  printer->fmt_line("thread[top_local_var_tid()].pval = {};", allocation);
                            +
                            2095  }
                            +
                            2096  if (info.thread_var_data_size != 0) {
                            +
                            2097  auto length = info.thread_var_data_size;
                            +
                            2098  auto thread_data = get_variable_name("thread_data");
                            +
                            2099  auto thread_data_in_use = get_variable_name("thread_data_in_use");
                            +
                            2100  auto allocation = fmt::format("(double*)mem_alloc({}, sizeof(double))", length);
                            +
                            2101  printer->fmt_push_block("if ({})", thread_data_in_use);
                            +
                            2102  printer->fmt_line("thread[thread_var_tid()].pval = {};", allocation);
                            +
                            2103  printer->chain_block("else");
                            +
                            2104  printer->fmt_line("thread[thread_var_tid()].pval = {};", thread_data);
                            +
                            2105  printer->fmt_line("{} = 1;", thread_data_in_use);
                            +
                            2106  printer->pop_block();
                            2107  }
                            -
                            2108 
                            -
                            2109  // register variables for hoc
                            -
                            2110  printer->add_line("hoc_register_var(hoc_scalar_double, hoc_vector_double, NULL);");
                            -
                            2111  printer->pop_block();
                            -
                            2112 }
                            -
                            2113 
                            -
                            2114 
                            - -
                            2116  if (!info.thread_callback_register) {
                            -
                            2117  return;
                            -
                            2118  }
                            -
                            2119 
                            -
                            2120  // thread_mem_init callback
                            -
                            2121  printer->add_newline(2);
                            -
                            2122  printer->add_line("/** thread memory allocation callback */");
                            -
                            2123  printer->push_block("static void thread_mem_init(ThreadDatum* thread) ");
                            -
                            2124 
                            -
                            2125  if (info.vectorize && info.derivimplicit_used()) {
                            -
                            2126  printer->fmt_line("thread[dith{}()].pval = nullptr;", info.derivimplicit_list_num);
                            +
                            2108  printer->pop_block();
                            +
                            2109  printer->add_newline(2);
                            +
                            2110 
                            +
                            2111 
                            +
                            2112  // thread_mem_cleanup callback
                            +
                            2113  printer->add_line("/** thread memory cleanup callback */");
                            +
                            2114  printer->push_block("static void thread_mem_cleanup(ThreadDatum* thread) ");
                            +
                            2115 
                            +
                            2116  // clang-format off
                            +
                            2117  if (info.vectorize && info.derivimplicit_used()) {
                            +
                            2118  int n = info.derivimplicit_list_num;
                            +
                            2119  printer->fmt_line("free(thread[dith{}()].pval);", n);
                            +
                            2120  printer->fmt_line("nrn_destroy_newtonspace(static_cast<NewtonSpace*>(*newtonspace{}(thread)));", n);
                            +
                            2121  }
                            +
                            2122  // clang-format on
                            +
                            2123 
                            +
                            2124  if (info.top_local_thread_size != 0) {
                            +
                            2125  auto line = "free(thread[top_local_var_tid()].pval);";
                            +
                            2126  printer->add_line(line);
                            2127  }
                            -
                            2128  if (info.vectorize && (info.top_local_thread_size != 0)) {
                            -
                            2129  auto length = info.top_local_thread_size;
                            -
                            2130  auto allocation = fmt::format("(double*)mem_alloc({}, sizeof(double))", length);
                            -
                            2131  printer->fmt_line("thread[top_local_var_tid()].pval = {};", allocation);
                            -
                            2132  }
                            -
                            2133  if (info.thread_var_data_size != 0) {
                            -
                            2134  auto length = info.thread_var_data_size;
                            -
                            2135  auto thread_data = get_variable_name("thread_data");
                            -
                            2136  auto thread_data_in_use = get_variable_name("thread_data_in_use");
                            -
                            2137  auto allocation = fmt::format("(double*)mem_alloc({}, sizeof(double))", length);
                            -
                            2138  printer->fmt_push_block("if ({})", thread_data_in_use);
                            -
                            2139  printer->fmt_line("thread[thread_var_tid()].pval = {};", allocation);
                            -
                            2140  printer->chain_block("else");
                            -
                            2141  printer->fmt_line("thread[thread_var_tid()].pval = {};", thread_data);
                            -
                            2142  printer->fmt_line("{} = 1;", thread_data_in_use);
                            -
                            2143  printer->pop_block();
                            -
                            2144  }
                            -
                            2145  printer->pop_block();
                            -
                            2146  printer->add_newline(2);
                            +
                            2128  if (info.thread_var_data_size != 0) {
                            +
                            2129  auto thread_data = get_variable_name("thread_data");
                            +
                            2130  auto thread_data_in_use = get_variable_name("thread_data_in_use");
                            +
                            2131  printer->fmt_push_block("if (thread[thread_var_tid()].pval == {})", thread_data);
                            +
                            2132  printer->fmt_line("{} = 0;", thread_data_in_use);
                            +
                            2133  printer->chain_block("else");
                            +
                            2134  printer->add_line("free(thread[thread_var_tid()].pval);");
                            +
                            2135  printer->pop_block();
                            +
                            2136  }
                            +
                            2137  printer->pop_block();
                            +
                            2138 }
                            +
                            2139 
                            +
                            2140 
                            + +
                            2142  auto const value_initialize = print_initializers ? "{}" : "";
                            +
                            2143  auto int_type = default_int_data_type();
                            +
                            2144  printer->add_newline(2);
                            +
                            2145  printer->add_line("/** all mechanism instance variables and global variables */");
                            +
                            2146  printer->fmt_push_block("struct {} ", instance_struct());
                            2147 
                            -
                            2148 
                            -
                            2149  // thread_mem_cleanup callback
                            -
                            2150  printer->add_line("/** thread memory cleanup callback */");
                            -
                            2151  printer->push_block("static void thread_mem_cleanup(ThreadDatum* thread) ");
                            -
                            2152 
                            -
                            2153  // clang-format off
                            -
                            2154  if (info.vectorize && info.derivimplicit_used()) {
                            -
                            2155  int n = info.derivimplicit_list_num;
                            -
                            2156  printer->fmt_line("free(thread[dith{}()].pval);", n);
                            -
                            2157  printer->fmt_line("nrn_destroy_newtonspace(static_cast<NewtonSpace*>(*newtonspace{}(thread)));", n);
                            -
                            2158  }
                            -
                            2159  // clang-format on
                            -
                            2160 
                            -
                            2161  if (info.top_local_thread_size != 0) {
                            -
                            2162  auto line = "free(thread[top_local_var_tid()].pval);";
                            -
                            2163  printer->add_line(line);
                            -
                            2164  }
                            -
                            2165  if (info.thread_var_data_size != 0) {
                            -
                            2166  auto thread_data = get_variable_name("thread_data");
                            -
                            2167  auto thread_data_in_use = get_variable_name("thread_data_in_use");
                            -
                            2168  printer->fmt_push_block("if (thread[thread_var_tid()].pval == {})", thread_data);
                            -
                            2169  printer->fmt_line("{} = 0;", thread_data_in_use);
                            -
                            2170  printer->chain_block("else");
                            -
                            2171  printer->add_line("free(thread[thread_var_tid()].pval);");
                            -
                            2172  printer->pop_block();
                            -
                            2173  }
                            -
                            2174  printer->pop_block();
                            -
                            2175 }
                            -
                            2176 
                            -
                            2177 
                            - -
                            2179  auto const value_initialize = print_initializers ? "{}" : "";
                            -
                            2180  auto int_type = default_int_data_type();
                            -
                            2181  printer->add_newline(2);
                            -
                            2182  printer->add_line("/** all mechanism instance variables and global variables */");
                            -
                            2183  printer->fmt_push_block("struct {} ", instance_struct());
                            -
                            2184 
                            -
                            2185  for (auto const& [var, type]: info.neuron_global_variables) {
                            -
                            2186  auto const name = var->get_name();
                            -
                            2187  printer->fmt_line("{}* {}{};",
                            -
                            2188  type,
                            -
                            2189  name,
                            -
                            2190  print_initializers ? fmt::format("{{&coreneuron::{}}}", name)
                            -
                            2191  : std::string{});
                            -
                            2192  }
                            -
                            2193  for (auto& var: codegen_float_variables) {
                            -
                            2194  const auto& name = var->get_name();
                            -
                            2195  auto type = get_range_var_float_type(var);
                            -
                            2196  auto qualifier = is_constant_variable(name) ? "const " : "";
                            -
                            2197  printer->fmt_line("{}{}* {}{};", qualifier, type, name, value_initialize);
                            -
                            2198  }
                            -
                            2199  for (auto& var: codegen_int_variables) {
                            -
                            2200  const auto& name = var.symbol->get_name();
                            -
                            2201  if (var.is_index || var.is_integer) {
                            -
                            2202  auto qualifier = var.is_constant ? "const " : "";
                            -
                            2203  printer->fmt_line("{}{}* {}{};", qualifier, int_type, name, value_initialize);
                            -
                            2204  } else {
                            -
                            2205  auto qualifier = var.is_constant ? "const " : "";
                            -
                            2206  auto type = var.is_vdata ? "void*" : default_float_data_type();
                            -
                            2207  printer->fmt_line("{}{}* {}{};", qualifier, type, name, value_initialize);
                            -
                            2208  }
                            -
                            2209  }
                            -
                            2210 
                            -
                            2211  printer->fmt_line("{}* {}{};",
                            -
                            2212  global_struct(),
                            - -
                            2214  print_initializers ? fmt::format("{{&{}}}", global_struct_instance())
                            -
                            2215  : std::string{});
                            -
                            2216  printer->pop_block(";");
                            -
                            2217 }
                            -
                            2218 
                            -
                            2219 
                            - -
                            2221  if (!ion_variable_struct_required()) {
                            -
                            2222  return;
                            -
                            2223  }
                            -
                            2224  printer->add_newline(2);
                            -
                            2225  printer->add_line("/** ion write variables */");
                            -
                            2226  printer->push_block("struct IonCurVar");
                            -
                            2227 
                            -
                            2228  std::string float_type = default_float_data_type();
                            -
                            2229  std::vector<std::string> members;
                            -
                            2230 
                            -
                            2231  for (auto& ion: info.ions) {
                            -
                            2232  for (auto& var: ion.writes) {
                            -
                            2233  printer->fmt_line("{} {};", float_type, var);
                            -
                            2234  members.push_back(var);
                            -
                            2235  }
                            -
                            2236  }
                            -
                            2237  for (auto& var: info.currents) {
                            -
                            2238  if (!info.is_ion_variable(var)) {
                            -
                            2239  printer->fmt_line("{} {};", float_type, var);
                            -
                            2240  members.push_back(var);
                            -
                            2241  }
                            -
                            2242  }
                            -
                            2243 
                            -
                            2244  print_ion_var_constructor(members);
                            -
                            2245 
                            -
                            2246  printer->pop_block(";");
                            -
                            2247 }
                            -
                            2248 
                            -
                            2249 
                            - -
                            2251  const std::vector<std::string>& members) {
                            -
                            2252  // constructor
                            -
                            2253  printer->add_newline();
                            -
                            2254  printer->add_indent();
                            -
                            2255  printer->add_text("IonCurVar() : ");
                            -
                            2256  for (int i = 0; i < members.size(); i++) {
                            -
                            2257  printer->fmt_text("{}(0)", members[i]);
                            -
                            2258  if (i + 1 < members.size()) {
                            -
                            2259  printer->add_text(", ");
                            -
                            2260  }
                            -
                            2261  }
                            -
                            2262  printer->add_text(" {}");
                            -
                            2263  printer->add_newline();
                            -
                            2264 }
                            -
                            2265 
                            -
                            2266 
                            - -
                            2268  printer->add_line("IonCurVar ionvar;");
                            -
                            2269 }
                            -
                            2270 
                            -
                            2271 
                            - -
                            2273  // nothing for cpu
                            +
                            2148  for (auto const& [var, type]: info.neuron_global_variables) {
                            +
                            2149  auto const name = var->get_name();
                            +
                            2150  printer->fmt_line("{}* {}{};",
                            +
                            2151  type,
                            +
                            2152  name,
                            +
                            2153  print_initializers ? fmt::format("{{&coreneuron::{}}}", name)
                            +
                            2154  : std::string{});
                            +
                            2155  }
                            +
                            2156  for (auto& var: codegen_float_variables) {
                            +
                            2157  const auto& name = var->get_name();
                            +
                            2158  auto type = get_range_var_float_type(var);
                            +
                            2159  auto qualifier = is_constant_variable(name) ? "const " : "";
                            +
                            2160  printer->fmt_line("{}{}* {}{};", qualifier, type, name, value_initialize);
                            +
                            2161  }
                            +
                            2162  for (auto& var: codegen_int_variables) {
                            +
                            2163  const auto& name = var.symbol->get_name();
                            +
                            2164  if (var.is_index || var.is_integer) {
                            +
                            2165  auto qualifier = var.is_constant ? "const " : "";
                            +
                            2166  printer->fmt_line("{}{}* {}{};", qualifier, int_type, name, value_initialize);
                            +
                            2167  } else {
                            +
                            2168  auto qualifier = var.is_constant ? "const " : "";
                            +
                            2169  auto type = var.is_vdata ? "void*" : default_float_data_type();
                            +
                            2170  printer->fmt_line("{}{}* {}{};", qualifier, type, name, value_initialize);
                            +
                            2171  }
                            +
                            2172  }
                            +
                            2173 
                            +
                            2174  printer->fmt_line("{}* {}{};",
                            +
                            2175  global_struct(),
                            + +
                            2177  print_initializers ? fmt::format("{{&{}}}", global_struct_instance())
                            +
                            2178  : std::string{});
                            +
                            2179  printer->pop_block(";");
                            +
                            2180 }
                            +
                            2181 
                            +
                            2182 
                            + +
                            2184  if (!ion_variable_struct_required()) {
                            +
                            2185  return;
                            +
                            2186  }
                            +
                            2187  printer->add_newline(2);
                            +
                            2188  printer->add_line("/** ion write variables */");
                            +
                            2189  printer->push_block("struct IonCurVar");
                            +
                            2190 
                            +
                            2191  std::string float_type = default_float_data_type();
                            +
                            2192  std::vector<std::string> members;
                            +
                            2193 
                            +
                            2194  for (auto& ion: info.ions) {
                            +
                            2195  for (auto& var: ion.writes) {
                            +
                            2196  printer->fmt_line("{} {};", float_type, var);
                            +
                            2197  members.push_back(var);
                            +
                            2198  }
                            +
                            2199  }
                            +
                            2200  for (auto& var: info.currents) {
                            +
                            2201  if (!info.is_ion_variable(var)) {
                            +
                            2202  printer->fmt_line("{} {};", float_type, var);
                            +
                            2203  members.push_back(var);
                            +
                            2204  }
                            +
                            2205  }
                            +
                            2206 
                            +
                            2207  print_ion_var_constructor(members);
                            +
                            2208 
                            +
                            2209  printer->pop_block(";");
                            +
                            2210 }
                            +
                            2211 
                            +
                            2212 
                            + +
                            2214  const std::vector<std::string>& members) {
                            +
                            2215  // constructor
                            +
                            2216  printer->add_newline();
                            +
                            2217  printer->add_indent();
                            +
                            2218  printer->add_text("IonCurVar() : ");
                            +
                            2219  for (int i = 0; i < members.size(); i++) {
                            +
                            2220  printer->fmt_text("{}(0)", members[i]);
                            +
                            2221  if (i + 1 < members.size()) {
                            +
                            2222  printer->add_text(", ");
                            +
                            2223  }
                            +
                            2224  }
                            +
                            2225  printer->add_text(" {}");
                            +
                            2226  printer->add_newline();
                            +
                            2227 }
                            +
                            2228 
                            +
                            2229 
                            + +
                            2231  printer->add_line("IonCurVar ionvar;");
                            +
                            2232 }
                            +
                            2233 
                            +
                            2234 
                            + +
                            2236  // nothing for cpu
                            +
                            2237 }
                            +
                            2238 
                            +
                            2239 
                            + +
                            2241  auto type = float_data_type();
                            +
                            2242  printer->add_newline(2);
                            +
                            2243  printer->add_line("/** allocate and setup array for range variable */");
                            +
                            2244  printer->fmt_push_block("static inline {}* setup_range_variable(double* variable, int n)",
                            +
                            2245  type);
                            +
                            2246  printer->fmt_line("{0}* data = ({0}*) mem_alloc(n, sizeof({0}));", type);
                            +
                            2247  printer->push_block("for(size_t i = 0; i < n; i++)");
                            +
                            2248  printer->add_line("data[i] = variable[i];");
                            +
                            2249  printer->pop_block();
                            +
                            2250  printer->add_line("return data;");
                            +
                            2251  printer->pop_block();
                            +
                            2252 }
                            +
                            2253 
                            +
                            2254 
                            +
                            2255 /**
                            +
                            2256  * \details If floating point type like "float" is specified on command line then
                            +
                            2257  * we can't turn all variables to new type. This is because certain variables
                            +
                            2258  * are pointers to internal variables (e.g. ions). Hence, we check if given
                            +
                            2259  * variable can be safely converted to new type. If so, return new type.
                            +
                            2260  */
                            + +
                            2262  // clang-format off
                            +
                            2263  auto with = NmodlType::read_ion_var
                            +
                            2264  | NmodlType::write_ion_var
                            +
                            2265  | NmodlType::pointer_var
                            +
                            2266  | NmodlType::bbcore_pointer_var
                            +
                            2267  | NmodlType::extern_neuron_variable;
                            +
                            2268  // clang-format on
                            +
                            2269  bool need_default_type = symbol->has_any_property(with);
                            +
                            2270  if (need_default_type) {
                            +
                            2271  return default_float_data_type();
                            +
                            2272  }
                            +
                            2273  return float_data_type();
                            2274 }
                            2275 
                            2276 
                            - -
                            2278  auto type = float_data_type();
                            -
                            2279  printer->add_newline(2);
                            -
                            2280  printer->add_line("/** allocate and setup array for range variable */");
                            -
                            2281  printer->fmt_push_block("static inline {}* setup_range_variable(double* variable, int n)",
                            -
                            2282  type);
                            -
                            2283  printer->fmt_line("{0}* data = ({0}*) mem_alloc(n, sizeof({0}));", type);
                            -
                            2284  printer->push_block("for(size_t i = 0; i < n; i++)");
                            -
                            2285  printer->add_line("data[i] = variable[i];");
                            -
                            2286  printer->pop_block();
                            -
                            2287  printer->add_line("return data;");
                            -
                            2288  printer->pop_block();
                            -
                            2289 }
                            -
                            2290 
                            -
                            2291 
                            -
                            2292 /**
                            -
                            2293  * \details If floating point type like "float" is specified on command line then
                            -
                            2294  * we can't turn all variables to new type. This is because certain variables
                            -
                            2295  * are pointers to internal variables (e.g. ions). Hence, we check if given
                            -
                            2296  * variable can be safely converted to new type. If so, return new type.
                            -
                            2297  */
                            - -
                            2299  // clang-format off
                            -
                            2300  auto with = NmodlType::read_ion_var
                            -
                            2301  | NmodlType::write_ion_var
                            -
                            2302  | NmodlType::pointer_var
                            -
                            2303  | NmodlType::bbcore_pointer_var
                            -
                            2304  | NmodlType::extern_neuron_variable;
                            -
                            2305  // clang-format on
                            -
                            2306  bool need_default_type = symbol->has_any_property(with);
                            -
                            2307  if (need_default_type) {
                            -
                            2308  return default_float_data_type();
                            -
                            2309  }
                            -
                            2310  return float_data_type();
                            -
                            2311 }
                            -
                            2312 
                            + +
                            2278  if (range_variable_setup_required()) {
                            +
                            2279  print_setup_range_variable();
                            +
                            2280  }
                            +
                            2281 
                            +
                            2282  printer->add_newline();
                            +
                            2283  printer->add_line("// Allocate instance structure");
                            +
                            2284  printer->fmt_push_block("static void {}(NrnThread* nt, Memb_list* ml, int type)",
                            + +
                            2286  printer->add_line("assert(!ml->instance);");
                            +
                            2287  printer->add_line("assert(!ml->global_variables);");
                            +
                            2288  printer->add_line("assert(ml->global_variables_size == 0);");
                            +
                            2289  printer->fmt_line("auto* const inst = new {}{{}};", instance_struct());
                            +
                            2290  printer->fmt_line("assert(inst->{} == &{});",
                            + +
                            2292  global_struct_instance());
                            +
                            2293  printer->add_line("ml->instance = inst;");
                            +
                            2294  printer->fmt_line("ml->global_variables = inst->{};", naming::INST_GLOBAL_MEMBER);
                            +
                            2295  printer->fmt_line("ml->global_variables_size = sizeof({});", global_struct());
                            +
                            2296  printer->pop_block();
                            +
                            2297  printer->add_newline();
                            +
                            2298 
                            +
                            2299  auto const cast_inst_and_assert_validity = [&]() {
                            +
                            2300  printer->fmt_line("auto* const inst = static_cast<{}*>(ml->instance);", instance_struct());
                            +
                            2301  printer->add_line("assert(inst);");
                            +
                            2302  printer->fmt_line("assert(inst->{});", naming::INST_GLOBAL_MEMBER);
                            +
                            2303  printer->fmt_line("assert(inst->{} == &{});",
                            + +
                            2305  global_struct_instance());
                            +
                            2306  printer->fmt_line("assert(inst->{} == ml->global_variables);", naming::INST_GLOBAL_MEMBER);
                            +
                            2307  printer->fmt_line("assert(ml->global_variables_size == sizeof({}));", global_struct());
                            +
                            2308  };
                            +
                            2309 
                            +
                            2310  // Must come before print_instance_struct_copy_to_device and
                            +
                            2311  // print_instance_struct_delete_from_device
                            +
                            2312  print_instance_struct_transfer_routine_declarations();
                            2313 
                            - -
                            2315  if (range_variable_setup_required()) {
                            -
                            2316  print_setup_range_variable();
                            -
                            2317  }
                            -
                            2318 
                            -
                            2319  printer->add_newline();
                            -
                            2320  printer->add_line("// Allocate instance structure");
                            -
                            2321  printer->fmt_push_block("static void {}(NrnThread* nt, Memb_list* ml, int type)",
                            - -
                            2323  printer->add_line("assert(!ml->instance);");
                            -
                            2324  printer->add_line("assert(!ml->global_variables);");
                            -
                            2325  printer->add_line("assert(ml->global_variables_size == 0);");
                            -
                            2326  printer->fmt_line("auto* const inst = new {}{{}};", instance_struct());
                            -
                            2327  printer->fmt_line("assert(inst->{} == &{});",
                            - -
                            2329  global_struct_instance());
                            -
                            2330  printer->add_line("ml->instance = inst;");
                            -
                            2331  printer->fmt_line("ml->global_variables = inst->{};", naming::INST_GLOBAL_MEMBER);
                            -
                            2332  printer->fmt_line("ml->global_variables_size = sizeof({});", global_struct());
                            -
                            2333  printer->pop_block();
                            -
                            2334  printer->add_newline();
                            -
                            2335 
                            -
                            2336  auto const cast_inst_and_assert_validity = [&]() {
                            -
                            2337  printer->fmt_line("auto* const inst = static_cast<{}*>(ml->instance);", instance_struct());
                            -
                            2338  printer->add_line("assert(inst);");
                            -
                            2339  printer->fmt_line("assert(inst->{});", naming::INST_GLOBAL_MEMBER);
                            -
                            2340  printer->fmt_line("assert(inst->{} == &{});",
                            - -
                            2342  global_struct_instance());
                            -
                            2343  printer->fmt_line("assert(inst->{} == ml->global_variables);", naming::INST_GLOBAL_MEMBER);
                            -
                            2344  printer->fmt_line("assert(ml->global_variables_size == sizeof({}));", global_struct());
                            -
                            2345  };
                            -
                            2346 
                            -
                            2347  // Must come before print_instance_struct_copy_to_device and
                            -
                            2348  // print_instance_struct_delete_from_device
                            -
                            2349  print_instance_struct_transfer_routine_declarations();
                            -
                            2350 
                            -
                            2351  printer->add_line("// Deallocate the instance structure");
                            -
                            2352  printer->fmt_push_block("static void {}(NrnThread* nt, Memb_list* ml, int type)",
                            - -
                            2354  cast_inst_and_assert_validity();
                            -
                            2355  print_instance_struct_delete_from_device();
                            -
                            2356  printer->add_multi_line(R"CODE(
                            -
                            2357  delete inst;
                            -
                            2358  ml->instance = nullptr;
                            -
                            2359  ml->global_variables = nullptr;
                            -
                            2360  ml->global_variables_size = 0;
                            -
                            2361  )CODE");
                            -
                            2362  printer->pop_block();
                            -
                            2363  printer->add_newline();
                            -
                            2364 
                            -
                            2365 
                            -
                            2366  printer->add_line("/** initialize mechanism instance variables */");
                            -
                            2367  printer->push_block("static inline void setup_instance(NrnThread* nt, Memb_list* ml)");
                            -
                            2368  cast_inst_and_assert_validity();
                            -
                            2369 
                            -
                            2370  std::string stride;
                            -
                            2371  printer->add_line("int pnodecount = ml->_nodecount_padded;");
                            -
                            2372  stride = "*pnodecount";
                            -
                            2373 
                            -
                            2374  printer->add_line("Datum* indexes = ml->pdata;");
                            -
                            2375 
                            -
                            2376  auto const float_type = default_float_data_type();
                            -
                            2377 
                            -
                            2378  int id = 0;
                            -
                            2379  std::vector<std::string> ptr_members{naming::INST_GLOBAL_MEMBER};
                            -
                            2380  for (auto const& [var, type]: info.neuron_global_variables) {
                            -
                            2381  ptr_members.push_back(var->get_name());
                            -
                            2382  }
                            -
                            2383  ptr_members.reserve(ptr_members.size() + codegen_float_variables.size() +
                            -
                            2384  codegen_int_variables.size());
                            -
                            2385  for (auto& var: codegen_float_variables) {
                            -
                            2386  auto name = var->get_name();
                            -
                            2387  auto range_var_type = get_range_var_float_type(var);
                            -
                            2388  if (float_type == range_var_type) {
                            -
                            2389  auto const variable = fmt::format("ml->data+{}{}", id, stride);
                            -
                            2390  printer->fmt_line("inst->{} = {};", name, variable);
                            -
                            2391  } else {
                            -
                            2392  // TODO what MOD file exercises this?
                            -
                            2393  printer->fmt_line("inst->{} = setup_range_variable(ml->data+{}{}, pnodecount);",
                            -
                            2394  name,
                            -
                            2395  id,
                            -
                            2396  stride);
                            -
                            2397  }
                            -
                            2398  ptr_members.push_back(std::move(name));
                            -
                            2399  id += var->get_length();
                            -
                            2400  }
                            -
                            2401 
                            -
                            2402  for (auto& var: codegen_int_variables) {
                            -
                            2403  auto name = var.symbol->get_name();
                            -
                            2404  auto const variable = [&var]() {
                            -
                            2405  if (var.is_index || var.is_integer) {
                            -
                            2406  return "ml->pdata";
                            -
                            2407  } else if (var.is_vdata) {
                            -
                            2408  return "nt->_vdata";
                            -
                            2409  } else {
                            -
                            2410  return "nt->_data";
                            -
                            2411  }
                            -
                            2412  }();
                            -
                            2413  printer->fmt_line("inst->{} = {};", name, variable);
                            -
                            2414  ptr_members.push_back(std::move(name));
                            -
                            2415  }
                            -
                            2416  print_instance_struct_copy_to_device();
                            -
                            2417  printer->pop_block(); // setup_instance
                            -
                            2418  printer->add_newline();
                            -
                            2419 
                            -
                            2420  print_instance_struct_transfer_routines(ptr_members);
                            -
                            2421 }
                            -
                            2422 
                            -
                            2423 
                            - -
                            2425  if (info.artificial_cell) {
                            -
                            2426  printer->add_line("double v = 0.0;");
                            -
                            2427  } else {
                            -
                            2428  printer->add_line("int node_id = node_index[id];");
                            -
                            2429  printer->add_line("double v = voltage[node_id];");
                            -
                            2430  print_v_unused();
                            -
                            2431  }
                            -
                            2432 
                            -
                            2433  if (ion_variable_struct_required()) {
                            -
                            2434  printer->add_line("IonCurVar ionvar;");
                            -
                            2435  }
                            +
                            2314  printer->add_line("// Deallocate the instance structure");
                            +
                            2315  printer->fmt_push_block("static void {}(NrnThread* nt, Memb_list* ml, int type)",
                            + +
                            2317  cast_inst_and_assert_validity();
                            +
                            2318  print_instance_struct_delete_from_device();
                            +
                            2319  printer->add_multi_line(R"CODE(
                            +
                            2320  delete inst;
                            +
                            2321  ml->instance = nullptr;
                            +
                            2322  ml->global_variables = nullptr;
                            +
                            2323  ml->global_variables_size = 0;
                            +
                            2324  )CODE");
                            +
                            2325  printer->pop_block();
                            +
                            2326  printer->add_newline();
                            +
                            2327 
                            +
                            2328 
                            +
                            2329  printer->add_line("/** initialize mechanism instance variables */");
                            +
                            2330  printer->push_block("static inline void setup_instance(NrnThread* nt, Memb_list* ml)");
                            +
                            2331  cast_inst_and_assert_validity();
                            +
                            2332 
                            +
                            2333  std::string stride;
                            +
                            2334  printer->add_line("int pnodecount = ml->_nodecount_padded;");
                            +
                            2335  stride = "*pnodecount";
                            +
                            2336 
                            +
                            2337  printer->add_line("Datum* indexes = ml->pdata;");
                            +
                            2338 
                            +
                            2339  auto const float_type = default_float_data_type();
                            +
                            2340 
                            +
                            2341  int id = 0;
                            +
                            2342  std::vector<std::string> ptr_members{naming::INST_GLOBAL_MEMBER};
                            +
                            2343  for (auto const& [var, type]: info.neuron_global_variables) {
                            +
                            2344  ptr_members.push_back(var->get_name());
                            +
                            2345  }
                            +
                            2346  ptr_members.reserve(ptr_members.size() + codegen_float_variables.size() +
                            +
                            2347  codegen_int_variables.size());
                            +
                            2348  for (auto& var: codegen_float_variables) {
                            +
                            2349  auto name = var->get_name();
                            +
                            2350  auto range_var_type = get_range_var_float_type(var);
                            +
                            2351  if (float_type == range_var_type) {
                            +
                            2352  auto const variable = fmt::format("ml->data+{}{}", id, stride);
                            +
                            2353  printer->fmt_line("inst->{} = {};", name, variable);
                            +
                            2354  } else {
                            +
                            2355  // TODO what MOD file exercises this?
                            +
                            2356  printer->fmt_line("inst->{} = setup_range_variable(ml->data+{}{}, pnodecount);",
                            +
                            2357  name,
                            +
                            2358  id,
                            +
                            2359  stride);
                            +
                            2360  }
                            +
                            2361  ptr_members.push_back(std::move(name));
                            +
                            2362  id += var->get_length();
                            +
                            2363  }
                            +
                            2364 
                            +
                            2365  for (auto& var: codegen_int_variables) {
                            +
                            2366  auto name = var.symbol->get_name();
                            +
                            2367  auto const variable = [&var]() {
                            +
                            2368  if (var.is_index || var.is_integer) {
                            +
                            2369  return "ml->pdata";
                            +
                            2370  } else if (var.is_vdata) {
                            +
                            2371  return "nt->_vdata";
                            +
                            2372  } else {
                            +
                            2373  return "nt->_data";
                            +
                            2374  }
                            +
                            2375  }();
                            +
                            2376  printer->fmt_line("inst->{} = {};", name, variable);
                            +
                            2377  ptr_members.push_back(std::move(name));
                            +
                            2378  }
                            +
                            2379  print_instance_struct_copy_to_device();
                            +
                            2380  printer->pop_block(); // setup_instance
                            +
                            2381  printer->add_newline();
                            +
                            2382 
                            +
                            2383  print_instance_struct_transfer_routines(ptr_members);
                            +
                            2384 }
                            +
                            2385 
                            +
                            2386 
                            + +
                            2388  if (info.artificial_cell) {
                            +
                            2389  printer->add_line("double v = 0.0;");
                            +
                            2390  } else {
                            +
                            2391  printer->add_line("int node_id = node_index[id];");
                            +
                            2392  printer->add_line("double v = voltage[node_id];");
                            +
                            2393  print_v_unused();
                            +
                            2394  }
                            +
                            2395 
                            +
                            2396  if (ion_variable_struct_required()) {
                            +
                            2397  printer->add_line("IonCurVar ionvar;");
                            +
                            2398  }
                            +
                            2399 
                            +
                            2400  // read ion statements
                            +
                            2401  auto read_statements = ion_read_statements(BlockType::Initial);
                            +
                            2402  for (auto& statement: read_statements) {
                            +
                            2403  printer->add_line(statement);
                            +
                            2404  }
                            +
                            2405 
                            +
                            2406  // initialize state variables (excluding ion state)
                            +
                            2407  for (auto& var: info.state_vars) {
                            +
                            2408  auto name = var->get_name();
                            +
                            2409  if (!info.is_ionic_conc(name)) {
                            +
                            2410  auto lhs = get_variable_name(name);
                            +
                            2411  auto rhs = get_variable_name(name + "0");
                            +
                            2412  if (var->is_array()) {
                            +
                            2413  for (int i = 0; i < var->get_length(); ++i) {
                            +
                            2414  printer->fmt_line("{}[{}] = {};", lhs, i, rhs);
                            +
                            2415  }
                            +
                            2416  } else {
                            +
                            2417  printer->fmt_line("{} = {};", lhs, rhs);
                            +
                            2418  }
                            +
                            2419  }
                            +
                            2420  }
                            +
                            2421 
                            +
                            2422  // initial block
                            +
                            2423  if (node != nullptr) {
                            +
                            2424  const auto& block = node->get_statement_block();
                            +
                            2425  print_statement_block(*block, false, false);
                            +
                            2426  }
                            +
                            2427 
                            +
                            2428  // write ion statements
                            +
                            2429  auto write_statements = ion_write_statements(BlockType::Initial);
                            +
                            2430  for (auto& statement: write_statements) {
                            +
                            2431  auto text = process_shadow_update_statement(statement, BlockType::Initial);
                            +
                            2432  printer->add_line(text);
                            +
                            2433  }
                            +
                            2434 }
                            +
                            2435 
                            2436 
                            -
                            2437  // read ion statements
                            -
                            2438  auto read_statements = ion_read_statements(BlockType::Initial);
                            -
                            2439  for (auto& statement: read_statements) {
                            -
                            2440  printer->add_line(statement);
                            -
                            2441  }
                            -
                            2442 
                            -
                            2443  // initialize state variables (excluding ion state)
                            -
                            2444  for (auto& var: info.state_vars) {
                            -
                            2445  auto name = var->get_name();
                            -
                            2446  if (!info.is_ionic_conc(name)) {
                            -
                            2447  auto lhs = get_variable_name(name);
                            -
                            2448  auto rhs = get_variable_name(name + "0");
                            -
                            2449  if (var->is_array()) {
                            -
                            2450  for (int i = 0; i < var->get_length(); ++i) {
                            -
                            2451  printer->fmt_line("{}[{}] = {};", lhs, i, rhs);
                            -
                            2452  }
                            -
                            2453  } else {
                            -
                            2454  printer->fmt_line("{} = {};", lhs, rhs);
                            -
                            2455  }
                            -
                            2456  }
                            -
                            2457  }
                            -
                            2458 
                            -
                            2459  // initial block
                            -
                            2460  if (node != nullptr) {
                            -
                            2461  const auto& block = node->get_statement_block();
                            -
                            2462  print_statement_block(*block, false, false);
                            + +
                            2438  BlockType type,
                            +
                            2439  const std::string& function_name) {
                            +
                            2440  std::string method;
                            +
                            2441  if (function_name.empty()) {
                            +
                            2442  method = compute_method_name(type);
                            +
                            2443  } else {
                            +
                            2444  method = function_name;
                            +
                            2445  }
                            +
                            2446  auto args = "NrnThread* nt, Memb_list* ml, int type";
                            +
                            2447 
                            +
                            2448  // watch statement function doesn't have type argument
                            +
                            2449  if (type == BlockType::Watch) {
                            +
                            2450  args = "NrnThread* nt, Memb_list* ml";
                            +
                            2451  }
                            +
                            2452 
                            +
                            2453  print_global_method_annotation();
                            +
                            2454  printer->fmt_push_block("void {}({})", method, args);
                            +
                            2455  if (type != BlockType::Destructor && type != BlockType::Constructor) {
                            +
                            2456  // We do not (currently) support DESTRUCTOR and CONSTRUCTOR blocks
                            +
                            2457  // running anything on the GPU.
                            +
                            2458  print_kernel_data_present_annotation_block_begin();
                            +
                            2459  } else {
                            +
                            2460  /// TODO: Remove this when the code generation is propery done
                            +
                            2461  /// Related to https://github.com/BlueBrain/nmodl/issues/692
                            +
                            2462  printer->add_line("#ifndef CORENEURON_BUILD");
                            2463  }
                            -
                            2464 
                            -
                            2465  // write ion statements
                            -
                            2466  auto write_statements = ion_write_statements(BlockType::Initial);
                            -
                            2467  for (auto& statement: write_statements) {
                            -
                            2468  auto text = process_shadow_update_statement(statement, BlockType::Initial);
                            -
                            2469  printer->add_line(text);
                            -
                            2470  }
                            -
                            2471 }
                            -
                            2472 
                            -
                            2473 
                            - -
                            2475  BlockType type,
                            -
                            2476  const std::string& function_name) {
                            -
                            2477  std::string method;
                            -
                            2478  if (function_name.empty()) {
                            -
                            2479  method = compute_method_name(type);
                            -
                            2480  } else {
                            -
                            2481  method = function_name;
                            -
                            2482  }
                            -
                            2483  auto args = "NrnThread* nt, Memb_list* ml, int type";
                            -
                            2484 
                            -
                            2485  // watch statement function doesn't have type argument
                            -
                            2486  if (type == BlockType::Watch) {
                            -
                            2487  args = "NrnThread* nt, Memb_list* ml";
                            -
                            2488  }
                            -
                            2489 
                            -
                            2490  print_global_method_annotation();
                            -
                            2491  printer->fmt_push_block("void {}({})", method, args);
                            -
                            2492  if (type != BlockType::Destructor && type != BlockType::Constructor) {
                            -
                            2493  // We do not (currently) support DESTRUCTOR and CONSTRUCTOR blocks
                            -
                            2494  // running anything on the GPU.
                            -
                            2495  print_kernel_data_present_annotation_block_begin();
                            -
                            2496  } else {
                            -
                            2497  /// TODO: Remove this when the code generation is propery done
                            -
                            2498  /// Related to https://github.com/BlueBrain/nmodl/issues/692
                            -
                            2499  printer->add_line("#ifndef CORENEURON_BUILD");
                            -
                            2500  }
                            -
                            2501  printer->add_multi_line(R"CODE(
                            -
                            2502  int nodecount = ml->nodecount;
                            -
                            2503  int pnodecount = ml->_nodecount_padded;
                            -
                            2504  const int* node_index = ml->nodeindices;
                            -
                            2505  double* data = ml->data;
                            -
                            2506  const double* voltage = nt->_actual_v;
                            -
                            2507  )CODE");
                            -
                            2508 
                            -
                            2509  if (type == BlockType::Equation) {
                            -
                            2510  printer->add_line("double* vec_rhs = nt->_actual_rhs;");
                            -
                            2511  printer->add_line("double* vec_d = nt->_actual_d;");
                            -
                            2512  print_rhs_d_shadow_variables();
                            -
                            2513  }
                            -
                            2514  printer->add_line("Datum* indexes = ml->pdata;");
                            -
                            2515  printer->add_line("ThreadDatum* thread = ml->_thread;");
                            -
                            2516 
                            -
                            2517  if (type == BlockType::Initial) {
                            -
                            2518  printer->add_newline();
                            -
                            2519  printer->add_line("setup_instance(nt, ml);");
                            -
                            2520  }
                            -
                            2521  printer->fmt_line("auto* const inst = static_cast<{}*>(ml->instance);", instance_struct());
                            -
                            2522  printer->add_newline(1);
                            -
                            2523 }
                            -
                            2524 
                            - -
                            2526  codegen = true;
                            -
                            2527  printer->add_newline(2);
                            -
                            2528  printer->add_line("/** initialize channel */");
                            -
                            2529 
                            -
                            2530  print_global_function_common_code(BlockType::Initial);
                            -
                            2531  if (info.derivimplicit_used()) {
                            -
                            2532  printer->add_newline();
                            -
                            2533  int nequation = info.num_equations;
                            -
                            2534  int list_num = info.derivimplicit_list_num;
                            -
                            2535  // clang-format off
                            -
                            2536  printer->fmt_line("int& deriv_advance_flag = *deriv{}_advance(thread);", list_num);
                            -
                            2537  printer->add_line("deriv_advance_flag = 0;");
                            -
                            2538  print_deriv_advance_flag_transfer_to_device();
                            -
                            2539  printer->fmt_line("auto ns = newtonspace{}(thread);", list_num);
                            -
                            2540  printer->fmt_line("auto& th = thread[dith{}()];", list_num);
                            -
                            2541  printer->push_block("if (*ns == nullptr)");
                            -
                            2542  printer->fmt_line("int vec_size = 2*{}*pnodecount*sizeof(double);", nequation);
                            -
                            2543  printer->fmt_line("double* vec = makevector(vec_size);", nequation);
                            -
                            2544  printer->fmt_line("th.pval = vec;", list_num);
                            -
                            2545  printer->fmt_line("*ns = nrn_cons_newtonspace({}, pnodecount);", nequation);
                            -
                            2546  print_newtonspace_transfer_to_device();
                            -
                            2547  printer->pop_block();
                            -
                            2548  // clang-format on
                            -
                            2549  }
                            -
                            2550 
                            -
                            2551  // update global variable as those might be updated via python/hoc API
                            -
                            2552  // NOTE: CoreNEURON has enough information to do this on its own, which
                            -
                            2553  // would be neater.
                            -
                            2554  print_global_variable_device_update_annotation();
                            -
                            2555 
                            -
                            2556  if (skip_init_check) {
                            -
                            2557  printer->push_block("if (_nrn_skip_initmodel == 0)");
                            -
                            2558  }
                            -
                            2559 
                            -
                            2560  if (!info.changed_dt.empty()) {
                            -
                            2561  printer->fmt_line("double _save_prev_dt = {};",
                            -
                            2562  get_variable_name(naming::NTHREAD_DT_VARIABLE));
                            -
                            2563  printer->fmt_line("{} = {};",
                            -
                            2564  get_variable_name(naming::NTHREAD_DT_VARIABLE),
                            -
                            2565  info.changed_dt);
                            -
                            2566  print_dt_update_to_device();
                            -
                            2567  }
                            +
                            2464  printer->add_multi_line(R"CODE(
                            +
                            2465  int nodecount = ml->nodecount;
                            +
                            2466  int pnodecount = ml->_nodecount_padded;
                            +
                            2467  const int* node_index = ml->nodeindices;
                            +
                            2468  double* data = ml->data;
                            +
                            2469  const double* voltage = nt->_actual_v;
                            +
                            2470  )CODE");
                            +
                            2471 
                            +
                            2472  if (type == BlockType::Equation) {
                            +
                            2473  printer->add_line("double* vec_rhs = nt->_actual_rhs;");
                            +
                            2474  printer->add_line("double* vec_d = nt->_actual_d;");
                            +
                            2475  print_rhs_d_shadow_variables();
                            +
                            2476  }
                            +
                            2477  printer->add_line("Datum* indexes = ml->pdata;");
                            +
                            2478  printer->add_line("ThreadDatum* thread = ml->_thread;");
                            +
                            2479 
                            +
                            2480  if (type == BlockType::Initial) {
                            +
                            2481  printer->add_newline();
                            +
                            2482  printer->add_line("setup_instance(nt, ml);");
                            +
                            2483  }
                            +
                            2484  printer->fmt_line("auto* const inst = static_cast<{}*>(ml->instance);", instance_struct());
                            +
                            2485  printer->add_newline(1);
                            +
                            2486 }
                            +
                            2487 
                            + +
                            2489  codegen = true;
                            +
                            2490  printer->add_newline(2);
                            +
                            2491  printer->add_line("/** initialize channel */");
                            +
                            2492 
                            +
                            2493  print_global_function_common_code(BlockType::Initial);
                            +
                            2494  if (info.derivimplicit_used()) {
                            +
                            2495  printer->add_newline();
                            +
                            2496  int nequation = info.num_equations;
                            +
                            2497  int list_num = info.derivimplicit_list_num;
                            +
                            2498  // clang-format off
                            +
                            2499  printer->fmt_line("int& deriv_advance_flag = *deriv{}_advance(thread);", list_num);
                            +
                            2500  printer->add_line("deriv_advance_flag = 0;");
                            +
                            2501  print_deriv_advance_flag_transfer_to_device();
                            +
                            2502  printer->fmt_line("auto ns = newtonspace{}(thread);", list_num);
                            +
                            2503  printer->fmt_line("auto& th = thread[dith{}()];", list_num);
                            +
                            2504  printer->push_block("if (*ns == nullptr)");
                            +
                            2505  printer->fmt_line("int vec_size = 2*{}*pnodecount*sizeof(double);", nequation);
                            +
                            2506  printer->fmt_line("double* vec = makevector(vec_size);", nequation);
                            +
                            2507  printer->fmt_line("th.pval = vec;", list_num);
                            +
                            2508  printer->fmt_line("*ns = nrn_cons_newtonspace({}, pnodecount);", nequation);
                            +
                            2509  print_newtonspace_transfer_to_device();
                            +
                            2510  printer->pop_block();
                            +
                            2511  // clang-format on
                            +
                            2512  }
                            +
                            2513 
                            +
                            2514  // update global variable as those might be updated via python/hoc API
                            +
                            2515  // NOTE: CoreNEURON has enough information to do this on its own, which
                            +
                            2516  // would be neater.
                            +
                            2517  print_global_variable_device_update_annotation();
                            +
                            2518 
                            +
                            2519  if (skip_init_check) {
                            +
                            2520  printer->push_block("if (_nrn_skip_initmodel == 0)");
                            +
                            2521  }
                            +
                            2522 
                            +
                            2523  if (!info.changed_dt.empty()) {
                            +
                            2524  printer->fmt_line("double _save_prev_dt = {};",
                            +
                            2525  get_variable_name(naming::NTHREAD_DT_VARIABLE));
                            +
                            2526  printer->fmt_line("{} = {};",
                            +
                            2527  get_variable_name(naming::NTHREAD_DT_VARIABLE),
                            +
                            2528  info.changed_dt);
                            +
                            2529  print_dt_update_to_device();
                            +
                            2530  }
                            +
                            2531 
                            +
                            2532  print_channel_iteration_block_parallel_hint(BlockType::Initial, info.initial_node);
                            +
                            2533  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            +
                            2534 
                            +
                            2535  if (info.net_receive_node != nullptr) {
                            +
                            2536  printer->fmt_line("{} = -1e20;", get_variable_name("tsave"));
                            +
                            2537  }
                            +
                            2538 
                            +
                            2539  print_initial_block(info.initial_node);
                            +
                            2540  printer->pop_block();
                            +
                            2541 
                            +
                            2542  if (!info.changed_dt.empty()) {
                            +
                            2543  printer->fmt_line("{} = _save_prev_dt;", get_variable_name(naming::NTHREAD_DT_VARIABLE));
                            +
                            2544  print_dt_update_to_device();
                            +
                            2545  }
                            +
                            2546 
                            +
                            2547  printer->pop_block();
                            +
                            2548 
                            +
                            2549  if (info.derivimplicit_used()) {
                            +
                            2550  printer->add_line("deriv_advance_flag = 1;");
                            +
                            2551  print_deriv_advance_flag_transfer_to_device();
                            +
                            2552  }
                            +
                            2553 
                            +
                            2554  if (info.net_send_used && !info.artificial_cell) {
                            +
                            2555  print_send_event_move();
                            +
                            2556  }
                            +
                            2557 
                            +
                            2558  print_kernel_data_present_annotation_block_end();
                            +
                            2559  if (skip_init_check) {
                            +
                            2560  printer->pop_block();
                            +
                            2561  }
                            +
                            2562  codegen = false;
                            +
                            2563 }
                            +
                            2564 
                            + +
                            2566  size_t block_id) {
                            +
                            2567  codegen = true;
                            2568 
                            -
                            2569  print_channel_iteration_block_parallel_hint(BlockType::Initial, info.initial_node);
                            -
                            2570  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            +
                            2569  std::string ba_type;
                            +
                            2570  std::shared_ptr<ast::BABlock> ba_block;
                            2571 
                            -
                            2572  if (info.net_receive_node != nullptr) {
                            -
                            2573  printer->fmt_line("{} = -1e20;", get_variable_name("tsave"));
                            -
                            2574  }
                            -
                            2575 
                            -
                            2576  print_initial_block(info.initial_node);
                            -
                            2577  printer->pop_block();
                            -
                            2578 
                            -
                            2579  if (!info.changed_dt.empty()) {
                            -
                            2580  printer->fmt_line("{} = _save_prev_dt;", get_variable_name(naming::NTHREAD_DT_VARIABLE));
                            -
                            2581  print_dt_update_to_device();
                            -
                            2582  }
                            -
                            2583 
                            -
                            2584  printer->pop_block();
                            -
                            2585 
                            -
                            2586  if (info.derivimplicit_used()) {
                            -
                            2587  printer->add_line("deriv_advance_flag = 1;");
                            -
                            2588  print_deriv_advance_flag_transfer_to_device();
                            -
                            2589  }
                            -
                            2590 
                            -
                            2591  if (info.net_send_used && !info.artificial_cell) {
                            -
                            2592  print_send_event_move();
                            -
                            2593  }
                            -
                            2594 
                            -
                            2595  print_kernel_data_present_annotation_block_end();
                            -
                            2596  if (skip_init_check) {
                            -
                            2597  printer->pop_block();
                            -
                            2598  }
                            -
                            2599  codegen = false;
                            -
                            2600 }
                            -
                            2601 
                            - -
                            2603  size_t block_id) {
                            -
                            2604  codegen = true;
                            -
                            2605 
                            -
                            2606  std::string ba_type;
                            -
                            2607  std::shared_ptr<ast::BABlock> ba_block;
                            -
                            2608 
                            -
                            2609  if (node->is_before_block()) {
                            -
                            2610  ba_block = dynamic_cast<const ast::BeforeBlock*>(node)->get_bablock();
                            -
                            2611  ba_type = "BEFORE";
                            -
                            2612  } else {
                            -
                            2613  ba_block = dynamic_cast<const ast::AfterBlock*>(node)->get_bablock();
                            -
                            2614  ba_type = "AFTER";
                            -
                            2615  }
                            -
                            2616 
                            -
                            2617  std::string ba_block_type = ba_block->get_type()->eval();
                            -
                            2618 
                            -
                            2619  /// name of the before/after function
                            -
                            2620  std::string function_name = method_name(fmt::format("nrn_before_after_{}", block_id));
                            -
                            2621 
                            -
                            2622  /// print common function code like init/state/current
                            -
                            2623  printer->add_newline(2);
                            -
                            2624  printer->fmt_line("/** {} of block type {} # {} */", ba_type, ba_block_type, block_id);
                            -
                            2625  print_global_function_common_code(BlockType::BeforeAfter, function_name);
                            -
                            2626 
                            -
                            2627  print_channel_iteration_block_parallel_hint(BlockType::BeforeAfter, node);
                            -
                            2628  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            -
                            2629 
                            -
                            2630  printer->add_line("int node_id = node_index[id];");
                            -
                            2631  printer->add_line("double v = voltage[node_id];");
                            -
                            2632  print_v_unused();
                            +
                            2572  if (node->is_before_block()) {
                            +
                            2573  ba_block = dynamic_cast<const ast::BeforeBlock*>(node)->get_bablock();
                            +
                            2574  ba_type = "BEFORE";
                            +
                            2575  } else {
                            +
                            2576  ba_block = dynamic_cast<const ast::AfterBlock*>(node)->get_bablock();
                            +
                            2577  ba_type = "AFTER";
                            +
                            2578  }
                            +
                            2579 
                            +
                            2580  std::string ba_block_type = ba_block->get_type()->eval();
                            +
                            2581 
                            +
                            2582  /// name of the before/after function
                            +
                            2583  std::string function_name = method_name(fmt::format("nrn_before_after_{}", block_id));
                            +
                            2584 
                            +
                            2585  /// print common function code like init/state/current
                            +
                            2586  printer->add_newline(2);
                            +
                            2587  printer->fmt_line("/** {} of block type {} # {} */", ba_type, ba_block_type, block_id);
                            +
                            2588  print_global_function_common_code(BlockType::BeforeAfter, function_name);
                            +
                            2589 
                            +
                            2590  print_channel_iteration_block_parallel_hint(BlockType::BeforeAfter, node);
                            +
                            2591  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            +
                            2592 
                            +
                            2593  printer->add_line("int node_id = node_index[id];");
                            +
                            2594  printer->add_line("double v = voltage[node_id];");
                            +
                            2595  print_v_unused();
                            +
                            2596 
                            +
                            2597  // read ion statements
                            +
                            2598  const auto& read_statements = ion_read_statements(BlockType::Equation);
                            +
                            2599  for (auto& statement: read_statements) {
                            +
                            2600  printer->add_line(statement);
                            +
                            2601  }
                            +
                            2602 
                            +
                            2603  /// print main body
                            +
                            2604  printer->add_indent();
                            +
                            2605  print_statement_block(*ba_block->get_statement_block());
                            +
                            2606  printer->add_newline();
                            +
                            2607 
                            +
                            2608  // write ion statements
                            +
                            2609  const auto& write_statements = ion_write_statements(BlockType::Equation);
                            +
                            2610  for (auto& statement: write_statements) {
                            +
                            2611  auto text = process_shadow_update_statement(statement, BlockType::Equation);
                            +
                            2612  printer->add_line(text);
                            +
                            2613  }
                            +
                            2614 
                            +
                            2615  /// loop end including data annotation block
                            +
                            2616  printer->pop_block();
                            +
                            2617  printer->pop_block();
                            +
                            2618  print_kernel_data_present_annotation_block_end();
                            +
                            2619 
                            +
                            2620  codegen = false;
                            +
                            2621 }
                            +
                            2622 
                            + +
                            2624  printer->add_newline(2);
                            +
                            2625  print_global_function_common_code(BlockType::Constructor);
                            +
                            2626  if (info.constructor_node != nullptr) {
                            +
                            2627  const auto& block = info.constructor_node->get_statement_block();
                            +
                            2628  print_statement_block(*block, false, false);
                            +
                            2629  }
                            +
                            2630  printer->add_line("#endif");
                            +
                            2631  printer->pop_block();
                            +
                            2632 }
                            2633 
                            -
                            2634  // read ion statements
                            -
                            2635  const auto& read_statements = ion_read_statements(BlockType::Equation);
                            -
                            2636  for (auto& statement: read_statements) {
                            -
                            2637  printer->add_line(statement);
                            -
                            2638  }
                            -
                            2639 
                            -
                            2640  /// print main body
                            -
                            2641  printer->add_indent();
                            -
                            2642  print_statement_block(*ba_block->get_statement_block());
                            -
                            2643  printer->add_newline();
                            -
                            2644 
                            -
                            2645  // write ion statements
                            -
                            2646  const auto& write_statements = ion_write_statements(BlockType::Equation);
                            -
                            2647  for (auto& statement: write_statements) {
                            -
                            2648  auto text = process_shadow_update_statement(statement, BlockType::Equation);
                            -
                            2649  printer->add_line(text);
                            -
                            2650  }
                            -
                            2651 
                            -
                            2652  /// loop end including data annotation block
                            -
                            2653  printer->pop_block();
                            -
                            2654  printer->pop_block();
                            -
                            2655  print_kernel_data_present_annotation_block_end();
                            +
                            2634 
                            + +
                            2636  printer->add_newline(2);
                            +
                            2637  print_global_function_common_code(BlockType::Destructor);
                            +
                            2638  if (info.destructor_node != nullptr) {
                            +
                            2639  const auto& block = info.destructor_node->get_statement_block();
                            +
                            2640  print_statement_block(*block, false, false);
                            +
                            2641  }
                            +
                            2642  printer->add_line("#endif");
                            +
                            2643  printer->pop_block();
                            +
                            2644 }
                            +
                            2645 
                            +
                            2646 
                            + +
                            2648  codegen = true;
                            +
                            2649  for (const auto& functor_name: info.functor_names) {
                            +
                            2650  printer->add_newline(2);
                            +
                            2651  print_functor_definition(*functor_name.first);
                            +
                            2652  }
                            +
                            2653  codegen = false;
                            +
                            2654 }
                            +
                            2655 
                            2656 
                            -
                            2657  codegen = false;
                            -
                            2658 }
                            -
                            2659 
                            - -
                            2661  printer->add_newline(2);
                            -
                            2662  print_global_function_common_code(BlockType::Constructor);
                            -
                            2663  if (info.constructor_node != nullptr) {
                            -
                            2664  const auto& block = info.constructor_node->get_statement_block();
                            -
                            2665  print_statement_block(*block, false, false);
                            -
                            2666  }
                            -
                            2667  printer->add_line("#endif");
                            -
                            2668  printer->pop_block();
                            -
                            2669 }
                            -
                            2670 
                            -
                            2671 
                            - -
                            2673  printer->add_newline(2);
                            -
                            2674  print_global_function_common_code(BlockType::Destructor);
                            -
                            2675  if (info.destructor_node != nullptr) {
                            -
                            2676  const auto& block = info.destructor_node->get_statement_block();
                            -
                            2677  print_statement_block(*block, false, false);
                            -
                            2678  }
                            -
                            2679  printer->add_line("#endif");
                            -
                            2680  printer->pop_block();
                            -
                            2681 }
                            + +
                            2658  printer->add_newline(2);
                            +
                            2659  auto method = method_name(naming::NRN_ALLOC_METHOD);
                            +
                            2660  printer->fmt_push_block("static void {}(double* data, Datum* indexes, int type)", method);
                            +
                            2661  printer->add_line("// do nothing");
                            +
                            2662  printer->pop_block();
                            +
                            2663 }
                            +
                            2664 
                            +
                            2665 /**
                            +
                            2666  * \todo Number of watch could be more than number of statements
                            +
                            2667  * according to grammar. Check if this is correctly handled in neuron
                            +
                            2668  * and coreneuron.
                            +
                            2669  */
                            + +
                            2671  if (info.watch_statements.empty()) {
                            +
                            2672  return;
                            +
                            2673  }
                            +
                            2674  codegen = true;
                            +
                            2675  printer->add_newline(2);
                            +
                            2676  auto inst = fmt::format("{}* inst", instance_struct());
                            +
                            2677 
                            +
                            2678  printer->fmt_push_block(
                            +
                            2679  "static void nrn_watch_activate({}, int id, int pnodecount, int watch_id, "
                            +
                            2680  "double v, bool &watch_remove)",
                            +
                            2681  inst);
                            2682 
                            -
                            2683 
                            - -
                            2685  codegen = true;
                            -
                            2686  for (const auto& functor_name: info.functor_names) {
                            -
                            2687  printer->add_newline(2);
                            -
                            2688  print_functor_definition(*functor_name.first);
                            -
                            2689  }
                            -
                            2690  codegen = false;
                            -
                            2691 }
                            -
                            2692 
                            -
                            2693 
                            - -
                            2695  printer->add_newline(2);
                            -
                            2696  auto method = method_name(naming::NRN_ALLOC_METHOD);
                            -
                            2697  printer->fmt_push_block("static void {}(double* data, Datum* indexes, int type)", method);
                            -
                            2698  printer->add_line("// do nothing");
                            -
                            2699  printer->pop_block();
                            -
                            2700 }
                            -
                            2701 
                            -
                            2702 /**
                            -
                            2703  * \todo Number of watch could be more than number of statements
                            -
                            2704  * according to grammar. Check if this is correctly handled in neuron
                            -
                            2705  * and coreneuron.
                            -
                            2706  */
                            - -
                            2708  if (info.watch_statements.empty()) {
                            -
                            2709  return;
                            -
                            2710  }
                            -
                            2711  codegen = true;
                            -
                            2712  printer->add_newline(2);
                            -
                            2713  auto inst = fmt::format("{}* inst", instance_struct());
                            -
                            2714 
                            -
                            2715  printer->fmt_push_block(
                            -
                            2716  "static void nrn_watch_activate({}, int id, int pnodecount, int watch_id, "
                            -
                            2717  "double v, bool &watch_remove)",
                            -
                            2718  inst);
                            -
                            2719 
                            -
                            2720  // initialize all variables only during first watch statement
                            -
                            2721  printer->push_block("if (watch_remove == false)");
                            -
                            2722  for (int i = 0; i < info.watch_count; i++) {
                            -
                            2723  auto name = get_variable_name(fmt::format("watch{}", i + 1));
                            -
                            2724  printer->fmt_line("{} = 0;", name);
                            -
                            2725  }
                            -
                            2726  printer->add_line("watch_remove = true;");
                            -
                            2727  printer->pop_block();
                            -
                            2728 
                            -
                            2729  /**
                            -
                            2730  * \todo Similar to neuron/coreneuron we are using
                            -
                            2731  * first watch and ignoring rest.
                            -
                            2732  */
                            -
                            2733  for (int i = 0; i < info.watch_statements.size(); i++) {
                            -
                            2734  auto statement = info.watch_statements[i];
                            -
                            2735  printer->fmt_push_block("if (watch_id == {})", i);
                            -
                            2736 
                            -
                            2737  auto varname = get_variable_name(fmt::format("watch{}", i + 1));
                            -
                            2738  printer->add_indent();
                            -
                            2739  printer->fmt_text("{} = 2 + (", varname);
                            -
                            2740  auto watch = statement->get_statements().front();
                            -
                            2741  watch->get_expression()->visit_children(*this);
                            -
                            2742  printer->add_text(");");
                            -
                            2743  printer->add_newline();
                            +
                            2683  // initialize all variables only during first watch statement
                            +
                            2684  printer->push_block("if (watch_remove == false)");
                            +
                            2685  for (int i = 0; i < info.watch_count; i++) {
                            +
                            2686  auto name = get_variable_name(fmt::format("watch{}", i + 1));
                            +
                            2687  printer->fmt_line("{} = 0;", name);
                            +
                            2688  }
                            +
                            2689  printer->add_line("watch_remove = true;");
                            +
                            2690  printer->pop_block();
                            +
                            2691 
                            +
                            2692  /**
                            +
                            2693  * \todo Similar to neuron/coreneuron we are using
                            +
                            2694  * first watch and ignoring rest.
                            +
                            2695  */
                            +
                            2696  for (int i = 0; i < info.watch_statements.size(); i++) {
                            +
                            2697  auto statement = info.watch_statements[i];
                            +
                            2698  printer->fmt_push_block("if (watch_id == {})", i);
                            +
                            2699 
                            +
                            2700  auto varname = get_variable_name(fmt::format("watch{}", i + 1));
                            +
                            2701  printer->add_indent();
                            +
                            2702  printer->fmt_text("{} = 2 + (", varname);
                            +
                            2703  auto watch = statement->get_statements().front();
                            +
                            2704  watch->get_expression()->visit_children(*this);
                            +
                            2705  printer->add_text(");");
                            +
                            2706  printer->add_newline();
                            +
                            2707 
                            +
                            2708  printer->pop_block();
                            +
                            2709  }
                            +
                            2710  printer->pop_block();
                            +
                            2711  codegen = false;
                            +
                            2712 }
                            +
                            2713 
                            +
                            2714 
                            +
                            2715 /**
                            +
                            2716  * \todo Similar to print_watch_activate, we are using only
                            +
                            2717  * first watch. need to verify with neuron/coreneuron about rest.
                            +
                            2718  */
                            + +
                            2720  if (info.watch_statements.empty()) {
                            +
                            2721  return;
                            +
                            2722  }
                            +
                            2723  codegen = true;
                            +
                            2724  printer->add_newline(2);
                            +
                            2725  printer->add_line("/** routine to check watch activation */");
                            +
                            2726  print_global_function_common_code(BlockType::Watch);
                            +
                            2727 
                            +
                            2728  // WATCH statements appears in NET_RECEIVE block and while printing
                            +
                            2729  // net_receive function we already check if it contains any MUTEX/PROTECT
                            +
                            2730  // constructs. As WATCH is not a top level block but list of statements,
                            +
                            2731  // we don't need to have ivdep pragma related check
                            +
                            2732  print_channel_iteration_block_parallel_hint(BlockType::Watch, nullptr);
                            +
                            2733 
                            +
                            2734  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            +
                            2735 
                            +
                            2736  if (info.is_voltage_used_by_watch_statements()) {
                            +
                            2737  printer->add_line("int node_id = node_index[id];");
                            +
                            2738  printer->add_line("double v = voltage[node_id];");
                            +
                            2739  print_v_unused();
                            +
                            2740  }
                            +
                            2741 
                            +
                            2742  // flat to make sure only one WATCH statement can be triggered at a time
                            +
                            2743  printer->add_line("bool watch_untriggered = true;");
                            2744 
                            -
                            2745  printer->pop_block();
                            -
                            2746  }
                            -
                            2747  printer->pop_block();
                            -
                            2748  codegen = false;
                            -
                            2749 }
                            -
                            2750 
                            -
                            2751 
                            -
                            2752 /**
                            -
                            2753  * \todo Similar to print_watch_activate, we are using only
                            -
                            2754  * first watch. need to verify with neuron/coreneuron about rest.
                            -
                            2755  */
                            - -
                            2757  if (info.watch_statements.empty()) {
                            -
                            2758  return;
                            -
                            2759  }
                            -
                            2760  codegen = true;
                            -
                            2761  printer->add_newline(2);
                            -
                            2762  printer->add_line("/** routine to check watch activation */");
                            -
                            2763  print_global_function_common_code(BlockType::Watch);
                            -
                            2764 
                            -
                            2765  // WATCH statements appears in NET_RECEIVE block and while printing
                            -
                            2766  // net_receive function we already check if it contains any MUTEX/PROTECT
                            -
                            2767  // constructs. As WATCH is not a top level block but list of statements,
                            -
                            2768  // we don't need to have ivdep pragma related check
                            -
                            2769  print_channel_iteration_block_parallel_hint(BlockType::Watch, nullptr);
                            -
                            2770 
                            -
                            2771  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            -
                            2772 
                            -
                            2773  if (info.is_voltage_used_by_watch_statements()) {
                            -
                            2774  printer->add_line("int node_id = node_index[id];");
                            -
                            2775  printer->add_line("double v = voltage[node_id];");
                            -
                            2776  print_v_unused();
                            -
                            2777  }
                            -
                            2778 
                            -
                            2779  // flat to make sure only one WATCH statement can be triggered at a time
                            -
                            2780  printer->add_line("bool watch_untriggered = true;");
                            -
                            2781 
                            -
                            2782  for (int i = 0; i < info.watch_statements.size(); i++) {
                            -
                            2783  auto statement = info.watch_statements[i];
                            -
                            2784  const auto& watch = statement->get_statements().front();
                            -
                            2785  const auto& varname = get_variable_name(fmt::format("watch{}", i + 1));
                            -
                            2786 
                            -
                            2787  // start block 1
                            -
                            2788  printer->fmt_push_block("if ({}&2 && watch_untriggered)", varname);
                            +
                            2745  for (int i = 0; i < info.watch_statements.size(); i++) {
                            +
                            2746  auto statement = info.watch_statements[i];
                            +
                            2747  const auto& watch = statement->get_statements().front();
                            +
                            2748  const auto& varname = get_variable_name(fmt::format("watch{}", i + 1));
                            +
                            2749 
                            +
                            2750  // start block 1
                            +
                            2751  printer->fmt_push_block("if ({}&2 && watch_untriggered)", varname);
                            +
                            2752 
                            +
                            2753  // start block 2
                            +
                            2754  printer->add_indent();
                            +
                            2755  printer->add_text("if (");
                            +
                            2756  watch->get_expression()->accept(*this);
                            +
                            2757  printer->add_text(") {");
                            +
                            2758  printer->add_newline();
                            +
                            2759  printer->increase_indent();
                            +
                            2760 
                            +
                            2761  // start block 3
                            +
                            2762  printer->fmt_push_block("if (({}&1) == 0)", varname);
                            +
                            2763 
                            +
                            2764  printer->add_line("watch_untriggered = false;");
                            +
                            2765 
                            +
                            2766  const auto& tqitem = get_variable_name("tqitem");
                            +
                            2767  const auto& point_process = get_variable_name("point_process");
                            +
                            2768  printer->add_indent();
                            +
                            2769  printer->add_text("net_send_buffering(");
                            +
                            2770  const auto& t = get_variable_name("t");
                            +
                            2771  printer->fmt_text("nt, ml->_net_send_buffer, 0, {}, -1, {}, {}+0.0, ",
                            +
                            2772  tqitem,
                            +
                            2773  point_process,
                            +
                            2774  t);
                            +
                            2775  watch->get_value()->accept(*this);
                            +
                            2776  printer->add_text(");");
                            +
                            2777  printer->add_newline();
                            +
                            2778  printer->pop_block();
                            +
                            2779 
                            +
                            2780  printer->add_line(varname, " = 3;");
                            +
                            2781  // end block 3
                            +
                            2782 
                            +
                            2783  // start block 3
                            +
                            2784  printer->decrease_indent();
                            +
                            2785  printer->push_block("} else");
                            +
                            2786  printer->add_line(varname, " = 2;");
                            +
                            2787  printer->pop_block();
                            +
                            2788  // end block 3
                            2789 
                            -
                            2790  // start block 2
                            -
                            2791  printer->add_indent();
                            -
                            2792  printer->add_text("if (");
                            -
                            2793  watch->get_expression()->accept(*this);
                            -
                            2794  printer->add_text(") {");
                            -
                            2795  printer->add_newline();
                            -
                            2796  printer->increase_indent();
                            -
                            2797 
                            -
                            2798  // start block 3
                            -
                            2799  printer->fmt_push_block("if (({}&1) == 0)", varname);
                            +
                            2790  printer->pop_block();
                            +
                            2791  // end block 1
                            +
                            2792  }
                            +
                            2793 
                            +
                            2794  printer->pop_block();
                            +
                            2795  print_send_event_move();
                            +
                            2796  print_kernel_data_present_annotation_block_end();
                            +
                            2797  printer->pop_block();
                            +
                            2798  codegen = false;
                            +
                            2799 }
                            2800 
                            -
                            2801  printer->add_line("watch_untriggered = false;");
                            -
                            2802 
                            -
                            2803  const auto& tqitem = get_variable_name("tqitem");
                            -
                            2804  const auto& point_process = get_variable_name("point_process");
                            -
                            2805  printer->add_indent();
                            -
                            2806  printer->add_text("net_send_buffering(");
                            -
                            2807  const auto& t = get_variable_name("t");
                            -
                            2808  printer->fmt_text("nt, ml->_net_send_buffer, 0, {}, -1, {}, {}+0.0, ",
                            -
                            2809  tqitem,
                            -
                            2810  point_process,
                            -
                            2811  t);
                            -
                            2812  watch->get_value()->accept(*this);
                            -
                            2813  printer->add_text(");");
                            -
                            2814  printer->add_newline();
                            -
                            2815  printer->pop_block();
                            -
                            2816 
                            -
                            2817  printer->add_line(varname, " = 3;");
                            -
                            2818  // end block 3
                            -
                            2819 
                            -
                            2820  // start block 3
                            -
                            2821  printer->decrease_indent();
                            -
                            2822  printer->push_block("} else");
                            -
                            2823  printer->add_line(varname, " = 2;");
                            -
                            2824  printer->pop_block();
                            -
                            2825  // end block 3
                            -
                            2826 
                            -
                            2827  printer->pop_block();
                            -
                            2828  // end block 1
                            -
                            2829  }
                            -
                            2830 
                            -
                            2831  printer->pop_block();
                            -
                            2832  print_send_event_move();
                            -
                            2833  print_kernel_data_present_annotation_block_end();
                            -
                            2834  printer->pop_block();
                            -
                            2835  codegen = false;
                            -
                            2836 }
                            -
                            2837 
                            -
                            2838 
                            - -
                            2840  bool need_mech_inst) {
                            -
                            2841  printer->add_multi_line(R"CODE(
                            -
                            2842  int tid = pnt->_tid;
                            -
                            2843  int id = pnt->_i_instance;
                            -
                            2844  double v = 0;
                            -
                            2845  )CODE");
                            -
                            2846 
                            -
                            2847  if (info.artificial_cell || node.is_initial_block()) {
                            -
                            2848  printer->add_line("NrnThread* nt = nrn_threads + tid;");
                            -
                            2849  printer->add_line("Memb_list* ml = nt->_ml_list[pnt->_type];");
                            -
                            2850  }
                            -
                            2851  if (node.is_initial_block()) {
                            -
                            2852  print_kernel_data_present_annotation_block_begin();
                            -
                            2853  }
                            -
                            2854 
                            -
                            2855  printer->add_multi_line(R"CODE(
                            -
                            2856  int nodecount = ml->nodecount;
                            -
                            2857  int pnodecount = ml->_nodecount_padded;
                            -
                            2858  double* data = ml->data;
                            -
                            2859  double* weights = nt->weights;
                            -
                            2860  Datum* indexes = ml->pdata;
                            -
                            2861  ThreadDatum* thread = ml->_thread;
                            -
                            2862  )CODE");
                            -
                            2863  if (need_mech_inst) {
                            -
                            2864  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                            -
                            2865  }
                            -
                            2866 
                            -
                            2867  if (node.is_initial_block()) {
                            -
                            2868  print_net_init_acc_serial_annotation_block_begin();
                            -
                            2869  }
                            -
                            2870 
                            -
                            2871  // rename variables but need to see if they are actually used
                            -
                            2872  auto parameters = info.net_receive_node->get_parameters();
                            -
                            2873  if (!parameters.empty()) {
                            -
                            2874  int i = 0;
                            -
                            2875  printer->add_newline();
                            -
                            2876  for (auto& parameter: parameters) {
                            -
                            2877  auto name = parameter->get_node_name();
                            -
                            2878  bool var_used = VarUsageVisitor().variable_used(node, "(*" + name + ")");
                            -
                            2879  if (var_used) {
                            -
                            2880  printer->fmt_line("double* {} = weights + weight_index + {};", name, i);
                            -
                            2881  RenameVisitor vr(name, "*" + name);
                            -
                            2882  node.visit_children(vr);
                            -
                            2883  }
                            -
                            2884  i++;
                            -
                            2885  }
                            -
                            2886  }
                            -
                            2887 }
                            -
                            2888 
                            +
                            2801 
                            + +
                            2803  bool need_mech_inst) {
                            +
                            2804  printer->add_multi_line(R"CODE(
                            +
                            2805  int tid = pnt->_tid;
                            +
                            2806  int id = pnt->_i_instance;
                            +
                            2807  double v = 0;
                            +
                            2808  )CODE");
                            +
                            2809 
                            +
                            2810  if (info.artificial_cell || node.is_initial_block()) {
                            +
                            2811  printer->add_line("NrnThread* nt = nrn_threads + tid;");
                            +
                            2812  printer->add_line("Memb_list* ml = nt->_ml_list[pnt->_type];");
                            +
                            2813  }
                            +
                            2814  if (node.is_initial_block()) {
                            +
                            2815  print_kernel_data_present_annotation_block_begin();
                            +
                            2816  }
                            +
                            2817 
                            +
                            2818  printer->add_multi_line(R"CODE(
                            +
                            2819  int nodecount = ml->nodecount;
                            +
                            2820  int pnodecount = ml->_nodecount_padded;
                            +
                            2821  double* data = ml->data;
                            +
                            2822  double* weights = nt->weights;
                            +
                            2823  Datum* indexes = ml->pdata;
                            +
                            2824  ThreadDatum* thread = ml->_thread;
                            +
                            2825  )CODE");
                            +
                            2826  if (need_mech_inst) {
                            +
                            2827  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                            +
                            2828  }
                            +
                            2829 
                            +
                            2830  if (node.is_initial_block()) {
                            +
                            2831  print_net_init_acc_serial_annotation_block_begin();
                            +
                            2832  }
                            +
                            2833 
                            +
                            2834  // rename variables but need to see if they are actually used
                            +
                            2835  auto parameters = info.net_receive_node->get_parameters();
                            +
                            2836  if (!parameters.empty()) {
                            +
                            2837  int i = 0;
                            +
                            2838  printer->add_newline();
                            +
                            2839  for (auto& parameter: parameters) {
                            +
                            2840  auto name = parameter->get_node_name();
                            +
                            2841  bool var_used = VarUsageVisitor().variable_used(node, "(*" + name + ")");
                            +
                            2842  if (var_used) {
                            +
                            2843  printer->fmt_line("double* {} = weights + weight_index + {};", name, i);
                            +
                            2844  RenameVisitor vr(name, "*" + name);
                            +
                            2845  node.visit_children(vr);
                            +
                            2846  }
                            +
                            2847  i++;
                            +
                            2848  }
                            +
                            2849  }
                            +
                            2850 }
                            +
                            2851 
                            +
                            2852 
                            + +
                            2854  auto const& arguments = node.get_arguments();
                            +
                            2855  const auto& tqitem = get_variable_name("tqitem");
                            +
                            2856  std::string weight_index = "weight_index";
                            +
                            2857  std::string pnt = "pnt";
                            +
                            2858 
                            +
                            2859  // for functions not generated from NET_RECEIVE blocks (i.e. top level INITIAL block)
                            +
                            2860  // the weight_index argument is 0.
                            +
                            2861  if (!printing_net_receive && !printing_net_init) {
                            +
                            2862  weight_index = "0";
                            +
                            2863  auto var = get_variable_name("point_process");
                            +
                            2864  if (info.artificial_cell) {
                            +
                            2865  pnt = "(Point_process*)" + var;
                            +
                            2866  }
                            +
                            2867  }
                            +
                            2868 
                            +
                            2869  // artificial cells don't use spike buffering
                            +
                            2870  // clang-format off
                            +
                            2871  if (info.artificial_cell) {
                            +
                            2872  printer->fmt_text("artcell_net_send(&{}, {}, {}, nt->_t+", tqitem, weight_index, pnt);
                            +
                            2873  } else {
                            +
                            2874  const auto& point_process = get_variable_name("point_process");
                            +
                            2875  const auto& t = get_variable_name("t");
                            +
                            2876  printer->add_text("net_send_buffering(");
                            +
                            2877  printer->fmt_text("nt, ml->_net_send_buffer, 0, {}, {}, {}, {}+", tqitem, weight_index, point_process, t);
                            +
                            2878  }
                            +
                            2879  // clang-format off
                            +
                            2880  print_vector_elements(arguments, ", ");
                            +
                            2881  printer->add_text(')');
                            +
                            2882 }
                            +
                            2883 
                            +
                            2884 
                            + +
                            2886  if (!printing_net_receive && !printing_net_init) {
                            +
                            2887  throw std::runtime_error("Error : net_move only allowed in NET_RECEIVE block");
                            +
                            2888  }
                            2889 
                            - -
                            2891  auto const& arguments = node.get_arguments();
                            -
                            2892  const auto& tqitem = get_variable_name("tqitem");
                            -
                            2893  std::string weight_index = "weight_index";
                            -
                            2894  std::string pnt = "pnt";
                            -
                            2895 
                            -
                            2896  // for functions not generated from NET_RECEIVE blocks (i.e. top level INITIAL block)
                            -
                            2897  // the weight_index argument is 0.
                            -
                            2898  if (!printing_net_receive && !printing_net_init) {
                            -
                            2899  weight_index = "0";
                            -
                            2900  auto var = get_variable_name("point_process");
                            -
                            2901  if (info.artificial_cell) {
                            -
                            2902  pnt = "(Point_process*)" + var;
                            -
                            2903  }
                            -
                            2904  }
                            -
                            2905 
                            -
                            2906  // artificial cells don't use spike buffering
                            -
                            2907  // clang-format off
                            -
                            2908  if (info.artificial_cell) {
                            -
                            2909  printer->fmt_text("artcell_net_send(&{}, {}, {}, nt->_t+", tqitem, weight_index, pnt);
                            -
                            2910  } else {
                            -
                            2911  const auto& point_process = get_variable_name("point_process");
                            -
                            2912  const auto& t = get_variable_name("t");
                            -
                            2913  printer->add_text("net_send_buffering(");
                            -
                            2914  printer->fmt_text("nt, ml->_net_send_buffer, 0, {}, {}, {}, {}+", tqitem, weight_index, point_process, t);
                            -
                            2915  }
                            -
                            2916  // clang-format off
                            -
                            2917  print_vector_elements(arguments, ", ");
                            -
                            2918  printer->add_text(')');
                            -
                            2919 }
                            -
                            2920 
                            -
                            2921 
                            - -
                            2923  if (!printing_net_receive && !printing_net_init) {
                            -
                            2924  throw std::runtime_error("Error : net_move only allowed in NET_RECEIVE block");
                            -
                            2925  }
                            -
                            2926 
                            -
                            2927  auto const& arguments = node.get_arguments();
                            -
                            2928  const auto& tqitem = get_variable_name("tqitem");
                            -
                            2929  std::string weight_index = "-1";
                            -
                            2930  std::string pnt = "pnt";
                            -
                            2931 
                            -
                            2932  // artificial cells don't use spike buffering
                            -
                            2933  // clang-format off
                            -
                            2934  if (info.artificial_cell) {
                            -
                            2935  printer->fmt_text("artcell_net_move(&{}, {}, ", tqitem, pnt);
                            -
                            2936  print_vector_elements(arguments, ", ");
                            -
                            2937  printer->add_text(")");
                            -
                            2938  } else {
                            -
                            2939  const auto& point_process = get_variable_name("point_process");
                            -
                            2940  printer->add_text("net_send_buffering(");
                            -
                            2941  printer->fmt_text("nt, ml->_net_send_buffer, 2, {}, {}, {}, ", tqitem, weight_index, point_process);
                            -
                            2942  print_vector_elements(arguments, ", ");
                            -
                            2943  printer->add_text(", 0.0");
                            -
                            2944  printer->add_text(")");
                            -
                            2945  }
                            -
                            2946 }
                            -
                            2947 
                            -
                            2948 
                            - -
                            2950  const auto& arguments = node.get_arguments();
                            -
                            2951  if (info.artificial_cell) {
                            -
                            2952  printer->add_text("net_event(pnt, ");
                            -
                            2953  print_vector_elements(arguments, ", ");
                            -
                            2954  } else {
                            -
                            2955  const auto& point_process = get_variable_name("point_process");
                            -
                            2956  printer->add_text("net_send_buffering(");
                            -
                            2957  printer->fmt_text("nt, ml->_net_send_buffer, 1, -1, -1, {}, ", point_process);
                            -
                            2958  print_vector_elements(arguments, ", ");
                            -
                            2959  printer->add_text(", 0.0");
                            +
                            2890  auto const& arguments = node.get_arguments();
                            +
                            2891  const auto& tqitem = get_variable_name("tqitem");
                            +
                            2892  std::string weight_index = "-1";
                            +
                            2893  std::string pnt = "pnt";
                            +
                            2894 
                            +
                            2895  // artificial cells don't use spike buffering
                            +
                            2896  // clang-format off
                            +
                            2897  if (info.artificial_cell) {
                            +
                            2898  printer->fmt_text("artcell_net_move(&{}, {}, ", tqitem, pnt);
                            +
                            2899  print_vector_elements(arguments, ", ");
                            +
                            2900  printer->add_text(")");
                            +
                            2901  } else {
                            +
                            2902  const auto& point_process = get_variable_name("point_process");
                            +
                            2903  printer->add_text("net_send_buffering(");
                            +
                            2904  printer->fmt_text("nt, ml->_net_send_buffer, 2, {}, {}, {}, ", tqitem, weight_index, point_process);
                            +
                            2905  print_vector_elements(arguments, ", ");
                            +
                            2906  printer->add_text(", 0.0");
                            +
                            2907  printer->add_text(")");
                            +
                            2908  }
                            +
                            2909 }
                            +
                            2910 
                            +
                            2911 
                            + +
                            2913  const auto& arguments = node.get_arguments();
                            +
                            2914  if (info.artificial_cell) {
                            +
                            2915  printer->add_text("net_event(pnt, ");
                            +
                            2916  print_vector_elements(arguments, ", ");
                            +
                            2917  } else {
                            +
                            2918  const auto& point_process = get_variable_name("point_process");
                            +
                            2919  printer->add_text("net_send_buffering(");
                            +
                            2920  printer->fmt_text("nt, ml->_net_send_buffer, 1, -1, -1, {}, ", point_process);
                            +
                            2921  print_vector_elements(arguments, ", ");
                            +
                            2922  printer->add_text(", 0.0");
                            +
                            2923  }
                            +
                            2924  printer->add_text(")");
                            +
                            2925 }
                            +
                            2926 
                            +
                            2927 /**
                            +
                            2928  * Rename arguments to NET_RECEIVE block with corresponding pointer variable
                            +
                            2929  *
                            +
                            2930  * Arguments to NET_RECEIVE block are packed and passed via weight vector. These
                            +
                            2931  * variables need to be replaced with corresponding pointer variable. For example,
                            +
                            2932  * if mod file is like
                            +
                            2933  *
                            +
                            2934  * \code{.mod}
                            +
                            2935  * NET_RECEIVE (weight, R){
                            +
                            2936  * INITIAL {
                            +
                            2937  * R=1
                            +
                            2938  * }
                            +
                            2939  * }
                            +
                            2940  * \endcode
                            +
                            2941  *
                            +
                            2942  * then generated code for initial block should be:
                            +
                            2943  *
                            +
                            2944  * \code{.cpp}
                            +
                            2945  * double* R = weights + weight_index + 0;
                            +
                            2946  * (*R) = 1.0;
                            +
                            2947  * \endcode
                            +
                            2948  *
                            +
                            2949  * So, the `R` in AST needs to be renamed with `(*R)`.
                            +
                            2950  */
                            +
                            2951 static void rename_net_receive_arguments(const ast::NetReceiveBlock& net_receive_node, const ast::Node& node) {
                            +
                            2952  const auto& parameters = net_receive_node.get_parameters();
                            +
                            2953  for (auto& parameter: parameters) {
                            +
                            2954  const auto& name = parameter->get_node_name();
                            +
                            2955  auto var_used = VarUsageVisitor().variable_used(node, name);
                            +
                            2956  if (var_used) {
                            +
                            2957  RenameVisitor vr(name, "(*" + name + ")");
                            +
                            2958  node.get_statement_block()->visit_children(vr);
                            +
                            2959  }
                            2960  }
                            -
                            2961  printer->add_text(")");
                            -
                            2962 }
                            -
                            2963 
                            -
                            2964 /**
                            -
                            2965  * Rename arguments to NET_RECEIVE block with corresponding pointer variable
                            -
                            2966  *
                            -
                            2967  * Arguments to NET_RECEIVE block are packed and passed via weight vector. These
                            -
                            2968  * variables need to be replaced with corresponding pointer variable. For example,
                            -
                            2969  * if mod file is like
                            -
                            2970  *
                            -
                            2971  * \code{.mod}
                            -
                            2972  * NET_RECEIVE (weight, R){
                            -
                            2973  * INITIAL {
                            -
                            2974  * R=1
                            -
                            2975  * }
                            -
                            2976  * }
                            -
                            2977  * \endcode
                            -
                            2978  *
                            -
                            2979  * then generated code for initial block should be:
                            -
                            2980  *
                            -
                            2981  * \code{.cpp}
                            -
                            2982  * double* R = weights + weight_index + 0;
                            -
                            2983  * (*R) = 1.0;
                            -
                            2984  * \endcode
                            -
                            2985  *
                            -
                            2986  * So, the `R` in AST needs to be renamed with `(*R)`.
                            -
                            2987  */
                            -
                            2988 static void rename_net_receive_arguments(const ast::NetReceiveBlock& net_receive_node, const ast::Node& node) {
                            -
                            2989  const auto& parameters = net_receive_node.get_parameters();
                            -
                            2990  for (auto& parameter: parameters) {
                            -
                            2991  const auto& name = parameter->get_node_name();
                            -
                            2992  auto var_used = VarUsageVisitor().variable_used(node, name);
                            -
                            2993  if (var_used) {
                            -
                            2994  RenameVisitor vr(name, "(*" + name + ")");
                            -
                            2995  node.get_statement_block()->visit_children(vr);
                            -
                            2996  }
                            -
                            2997  }
                            -
                            2998 }
                            -
                            2999 
                            -
                            3000 
                            - -
                            3002  const auto node = info.net_receive_initial_node;
                            -
                            3003  if (node == nullptr) {
                            -
                            3004  return;
                            -
                            3005  }
                            -
                            3006 
                            -
                            3007  // rename net_receive arguments used in the initial block of net_receive
                            -
                            3008  rename_net_receive_arguments(*info.net_receive_node, *node);
                            -
                            3009 
                            -
                            3010  codegen = true;
                            -
                            3011  printing_net_init = true;
                            -
                            3012  auto args = "Point_process* pnt, int weight_index, double flag";
                            -
                            3013  printer->add_newline(2);
                            -
                            3014  printer->add_line("/** initialize block for net receive */");
                            -
                            3015  printer->fmt_push_block("static void net_init({})", args);
                            -
                            3016  auto block = node->get_statement_block().get();
                            -
                            3017  if (block->get_statements().empty()) {
                            -
                            3018  printer->add_line("// do nothing");
                            -
                            3019  } else {
                            -
                            3020  print_net_receive_common_code(*node);
                            -
                            3021  print_statement_block(*block, false, false);
                            -
                            3022  if (node->is_initial_block()) {
                            -
                            3023  print_net_init_acc_serial_annotation_block_end();
                            -
                            3024  print_kernel_data_present_annotation_block_end();
                            -
                            3025  printer->add_line("auto& nsb = ml->_net_send_buffer;");
                            -
                            3026  print_net_send_buf_update_to_host();
                            -
                            3027  }
                            -
                            3028  }
                            -
                            3029  printer->pop_block();
                            -
                            3030  codegen = false;
                            -
                            3031  printing_net_init = false;
                            -
                            3032 }
                            -
                            3033 
                            -
                            3034 
                            - -
                            3036  printer->add_newline();
                            -
                            3037  printer->add_line("NetSendBuffer_t* nsb = ml->_net_send_buffer;");
                            -
                            3038  print_net_send_buf_update_to_host();
                            -
                            3039  printer->push_block("for (int i=0; i < nsb->_cnt; i++)");
                            -
                            3040  printer->add_multi_line(R"CODE(
                            -
                            3041  int type = nsb->_sendtype[i];
                            -
                            3042  int tid = nt->id;
                            -
                            3043  double t = nsb->_nsb_t[i];
                            -
                            3044  double flag = nsb->_nsb_flag[i];
                            -
                            3045  int vdata_index = nsb->_vdata_index[i];
                            -
                            3046  int weight_index = nsb->_weight_index[i];
                            -
                            3047  int point_index = nsb->_pnt_index[i];
                            -
                            3048  net_sem_from_gpu(type, vdata_index, weight_index, tid, point_index, t, flag);
                            -
                            3049  )CODE");
                            -
                            3050  printer->pop_block();
                            -
                            3051  printer->add_line("nsb->_cnt = 0;");
                            -
                            3052  print_net_send_buf_count_update_to_device();
                            -
                            3053 }
                            -
                            3054 
                            +
                            2961 }
                            +
                            2962 
                            +
                            2963 
                            + +
                            2965  const auto node = info.net_receive_initial_node;
                            +
                            2966  if (node == nullptr) {
                            +
                            2967  return;
                            +
                            2968  }
                            +
                            2969 
                            +
                            2970  // rename net_receive arguments used in the initial block of net_receive
                            +
                            2971  rename_net_receive_arguments(*info.net_receive_node, *node);
                            +
                            2972 
                            +
                            2973  codegen = true;
                            +
                            2974  printing_net_init = true;
                            +
                            2975  auto args = "Point_process* pnt, int weight_index, double flag";
                            +
                            2976  printer->add_newline(2);
                            +
                            2977  printer->add_line("/** initialize block for net receive */");
                            +
                            2978  printer->fmt_push_block("static void net_init({})", args);
                            +
                            2979  auto block = node->get_statement_block().get();
                            +
                            2980  if (block->get_statements().empty()) {
                            +
                            2981  printer->add_line("// do nothing");
                            +
                            2982  } else {
                            +
                            2983  print_net_receive_common_code(*node);
                            +
                            2984  print_statement_block(*block, false, false);
                            +
                            2985  if (node->is_initial_block()) {
                            +
                            2986  print_net_init_acc_serial_annotation_block_end();
                            +
                            2987  print_kernel_data_present_annotation_block_end();
                            +
                            2988  printer->add_line("auto& nsb = ml->_net_send_buffer;");
                            +
                            2989  print_net_send_buf_update_to_host();
                            +
                            2990  }
                            +
                            2991  }
                            +
                            2992  printer->pop_block();
                            +
                            2993  codegen = false;
                            +
                            2994  printing_net_init = false;
                            +
                            2995 }
                            +
                            2996 
                            +
                            2997 
                            + +
                            2999  printer->add_newline();
                            +
                            3000  printer->add_line("NetSendBuffer_t* nsb = ml->_net_send_buffer;");
                            +
                            3001  print_net_send_buf_update_to_host();
                            +
                            3002  printer->push_block("for (int i=0; i < nsb->_cnt; i++)");
                            +
                            3003  printer->add_multi_line(R"CODE(
                            +
                            3004  int type = nsb->_sendtype[i];
                            +
                            3005  int tid = nt->id;
                            +
                            3006  double t = nsb->_nsb_t[i];
                            +
                            3007  double flag = nsb->_nsb_flag[i];
                            +
                            3008  int vdata_index = nsb->_vdata_index[i];
                            +
                            3009  int weight_index = nsb->_weight_index[i];
                            +
                            3010  int point_index = nsb->_pnt_index[i];
                            +
                            3011  net_sem_from_gpu(type, vdata_index, weight_index, tid, point_index, t, flag);
                            +
                            3012  )CODE");
                            +
                            3013  printer->pop_block();
                            +
                            3014  printer->add_line("nsb->_cnt = 0;");
                            +
                            3015  print_net_send_buf_count_update_to_device();
                            +
                            3016 }
                            +
                            3017 
                            +
                            3018 
                            + +
                            3020  return fmt::format("void {}(NrnThread* nt)", method_name("net_buf_receive"));
                            +
                            3021 }
                            +
                            3022 
                            +
                            3023 
                            + +
                            3025  printer->add_line("Memb_list* ml = get_memb_list(nt);");
                            +
                            3026  printer->push_block("if (!ml)");
                            +
                            3027  printer->add_line("return;");
                            +
                            3028  printer->pop_block();
                            +
                            3029  printer->add_newline();
                            +
                            3030 }
                            +
                            3031 
                            +
                            3032 
                            + +
                            3034  printer->add_line("int count = nrb->_displ_cnt;");
                            +
                            3035  print_channel_iteration_block_parallel_hint(BlockType::NetReceive, info.net_receive_node);
                            +
                            3036  printer->push_block("for (int i = 0; i < count; i++)");
                            +
                            3037 }
                            +
                            3038 
                            +
                            3039 
                            + +
                            3041  printer->pop_block();
                            +
                            3042 }
                            +
                            3043 
                            +
                            3044 
                            + +
                            3046  if (!net_receive_required() || info.artificial_cell) {
                            +
                            3047  return;
                            +
                            3048  }
                            +
                            3049  printer->add_newline(2);
                            +
                            3050  printer->push_block(net_receive_buffering_declaration());
                            +
                            3051 
                            +
                            3052  print_get_memb_list();
                            +
                            3053 
                            +
                            3054  const auto& net_receive = method_name("net_receive_kernel");
                            3055 
                            - -
                            3057  return fmt::format("void {}(NrnThread* nt)", method_name("net_buf_receive"));
                            -
                            3058 }
                            -
                            3059 
                            -
                            3060 
                            - -
                            3062  printer->add_line("Memb_list* ml = get_memb_list(nt);");
                            -
                            3063  printer->push_block("if (!ml)");
                            -
                            3064  printer->add_line("return;");
                            -
                            3065  printer->pop_block();
                            -
                            3066  printer->add_newline();
                            -
                            3067 }
                            -
                            3068 
                            -
                            3069 
                            - -
                            3071  printer->add_line("int count = nrb->_displ_cnt;");
                            -
                            3072  print_channel_iteration_block_parallel_hint(BlockType::NetReceive, info.net_receive_node);
                            -
                            3073  printer->push_block("for (int i = 0; i < count; i++)");
                            -
                            3074 }
                            -
                            3075 
                            -
                            3076 
                            - -
                            3078  printer->pop_block();
                            -
                            3079 }
                            -
                            3080 
                            +
                            3056  print_kernel_data_present_annotation_block_begin();
                            +
                            3057 
                            +
                            3058  printer->add_line("NetReceiveBuffer_t* nrb = ml->_net_receive_buffer;");
                            +
                            3059  if (need_mech_inst) {
                            +
                            3060  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                            +
                            3061  }
                            +
                            3062  print_net_receive_loop_begin();
                            +
                            3063  printer->add_line("int start = nrb->_displ[i];");
                            +
                            3064  printer->add_line("int end = nrb->_displ[i+1];");
                            +
                            3065  printer->push_block("for (int j = start; j < end; j++)");
                            +
                            3066  printer->add_multi_line(R"CODE(
                            +
                            3067  int index = nrb->_nrb_index[j];
                            +
                            3068  int offset = nrb->_pnt_index[index];
                            +
                            3069  double t = nrb->_nrb_t[index];
                            +
                            3070  int weight_index = nrb->_weight_index[index];
                            +
                            3071  double flag = nrb->_nrb_flag[index];
                            +
                            3072  Point_process* point_process = nt->pntprocs + offset;
                            +
                            3073  )CODE");
                            +
                            3074  printer->add_line(net_receive, "(t, point_process, inst, nt, ml, weight_index, flag);");
                            +
                            3075  printer->pop_block();
                            +
                            3076  print_net_receive_loop_end();
                            +
                            3077 
                            +
                            3078  print_device_stream_wait();
                            +
                            3079  printer->add_line("nrb->_displ_cnt = 0;");
                            +
                            3080  printer->add_line("nrb->_cnt = 0;");
                            3081 
                            - -
                            3083  if (!net_receive_required() || info.artificial_cell) {
                            -
                            3084  return;
                            -
                            3085  }
                            -
                            3086  printer->add_newline(2);
                            -
                            3087  printer->push_block(net_receive_buffering_declaration());
                            -
                            3088 
                            -
                            3089  print_get_memb_list();
                            +
                            3082  if (info.net_send_used || info.net_event_used) {
                            +
                            3083  print_send_event_move();
                            +
                            3084  }
                            +
                            3085 
                            +
                            3086  print_kernel_data_present_annotation_block_end();
                            +
                            3087  printer->pop_block();
                            +
                            3088 }
                            +
                            3089 
                            3090 
                            -
                            3091  const auto& net_receive = method_name("net_receive_kernel");
                            -
                            3092 
                            -
                            3093  print_kernel_data_present_annotation_block_begin();
                            + +
                            3092  printer->add_line("i = nsb->_cnt++;");
                            +
                            3093 }
                            3094 
                            -
                            3095  printer->add_line("NetReceiveBuffer_t* nrb = ml->_net_receive_buffer;");
                            -
                            3096  if (need_mech_inst) {
                            -
                            3097  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                            -
                            3098  }
                            -
                            3099  print_net_receive_loop_begin();
                            -
                            3100  printer->add_line("int start = nrb->_displ[i];");
                            -
                            3101  printer->add_line("int end = nrb->_displ[i+1];");
                            -
                            3102  printer->push_block("for (int j = start; j < end; j++)");
                            -
                            3103  printer->add_multi_line(R"CODE(
                            -
                            3104  int index = nrb->_nrb_index[j];
                            -
                            3105  int offset = nrb->_pnt_index[index];
                            -
                            3106  double t = nrb->_nrb_t[index];
                            -
                            3107  int weight_index = nrb->_weight_index[index];
                            -
                            3108  double flag = nrb->_nrb_flag[index];
                            -
                            3109  Point_process* point_process = nt->pntprocs + offset;
                            -
                            3110  )CODE");
                            -
                            3111  printer->add_line(net_receive, "(t, point_process, inst, nt, ml, weight_index, flag);");
                            -
                            3112  printer->pop_block();
                            -
                            3113  print_net_receive_loop_end();
                            -
                            3114 
                            -
                            3115  print_device_stream_wait();
                            -
                            3116  printer->add_line("nrb->_displ_cnt = 0;");
                            -
                            3117  printer->add_line("nrb->_cnt = 0;");
                            -
                            3118 
                            -
                            3119  if (info.net_send_used || info.net_event_used) {
                            -
                            3120  print_send_event_move();
                            -
                            3121  }
                            -
                            3122 
                            -
                            3123  print_kernel_data_present_annotation_block_end();
                            -
                            3124  printer->pop_block();
                            -
                            3125 }
                            -
                            3126 
                            -
                            3127 
                            - -
                            3129  printer->add_line("i = nsb->_cnt++;");
                            -
                            3130 }
                            -
                            3131 
                            -
                            3132 
                            - -
                            3134  printer->push_block("if (i >= nsb->_size)");
                            -
                            3135  printer->add_line("nsb->grow();");
                            -
                            3136  printer->pop_block();
                            -
                            3137 }
                            +
                            3095 
                            + +
                            3097  printer->push_block("if (i >= nsb->_size)");
                            +
                            3098  printer->add_line("nsb->grow();");
                            +
                            3099  printer->pop_block();
                            +
                            3100 }
                            +
                            3101 
                            +
                            3102 
                            + +
                            3104  if (!net_send_buffer_required()) {
                            +
                            3105  return;
                            +
                            3106  }
                            +
                            3107 
                            +
                            3108  printer->add_newline(2);
                            +
                            3109  print_device_method_annotation();
                            +
                            3110  auto args =
                            +
                            3111  "const NrnThread* nt, NetSendBuffer_t* nsb, int type, int vdata_index, "
                            +
                            3112  "int weight_index, int point_index, double t, double flag";
                            +
                            3113  printer->fmt_push_block("static inline void net_send_buffering({})", args);
                            +
                            3114  printer->add_line("int i = 0;");
                            +
                            3115  print_net_send_buffering_cnt_update();
                            +
                            3116  print_net_send_buffering_grow();
                            +
                            3117  printer->push_block("if (i < nsb->_size)");
                            +
                            3118  printer->add_multi_line(R"CODE(
                            +
                            3119  nsb->_sendtype[i] = type;
                            +
                            3120  nsb->_vdata_index[i] = vdata_index;
                            +
                            3121  nsb->_weight_index[i] = weight_index;
                            +
                            3122  nsb->_pnt_index[i] = point_index;
                            +
                            3123  nsb->_nsb_t[i] = t;
                            +
                            3124  nsb->_nsb_flag[i] = flag;
                            +
                            3125  )CODE");
                            +
                            3126  printer->pop_block();
                            +
                            3127  printer->pop_block();
                            +
                            3128 }
                            +
                            3129 
                            +
                            3130 
                            + +
                            3132  if (!net_receive_required()) {
                            +
                            3133  return;
                            +
                            3134  }
                            +
                            3135  codegen = true;
                            +
                            3136  printing_net_receive = true;
                            +
                            3137  const auto node = info.net_receive_node;
                            3138 
                            -
                            3139 
                            - -
                            3141  if (!net_send_buffer_required()) {
                            -
                            3142  return;
                            -
                            3143  }
                            -
                            3144 
                            -
                            3145  printer->add_newline(2);
                            -
                            3146  print_device_method_annotation();
                            -
                            3147  auto args =
                            -
                            3148  "const NrnThread* nt, NetSendBuffer_t* nsb, int type, int vdata_index, "
                            -
                            3149  "int weight_index, int point_index, double t, double flag";
                            -
                            3150  printer->fmt_push_block("static inline void net_send_buffering({})", args);
                            -
                            3151  printer->add_line("int i = 0;");
                            -
                            3152  print_net_send_buffering_cnt_update();
                            -
                            3153  print_net_send_buffering_grow();
                            -
                            3154  printer->push_block("if (i < nsb->_size)");
                            -
                            3155  printer->add_multi_line(R"CODE(
                            -
                            3156  nsb->_sendtype[i] = type;
                            -
                            3157  nsb->_vdata_index[i] = vdata_index;
                            -
                            3158  nsb->_weight_index[i] = weight_index;
                            -
                            3159  nsb->_pnt_index[i] = point_index;
                            -
                            3160  nsb->_nsb_t[i] = t;
                            -
                            3161  nsb->_nsb_flag[i] = flag;
                            -
                            3162  )CODE");
                            -
                            3163  printer->pop_block();
                            -
                            3164  printer->pop_block();
                            -
                            3165 }
                            -
                            3166 
                            -
                            3167 
                            - -
                            3169  if (!net_receive_required()) {
                            -
                            3170  return;
                            -
                            3171  }
                            -
                            3172  codegen = true;
                            -
                            3173  printing_net_receive = true;
                            -
                            3174  const auto node = info.net_receive_node;
                            -
                            3175 
                            -
                            3176  // rename net_receive arguments used in the block itself
                            -
                            3177  rename_net_receive_arguments(*info.net_receive_node, *node);
                            -
                            3178 
                            -
                            3179  std::string name;
                            -
                            3180  ParamVector params;
                            -
                            3181  if (!info.artificial_cell) {
                            -
                            3182  name = method_name("net_receive_kernel");
                            -
                            3183  params.emplace_back("", "double", "", "t");
                            -
                            3184  params.emplace_back("", "Point_process*", "", "pnt");
                            -
                            3185  params.emplace_back("", fmt::format("{}*", instance_struct()),
                            -
                            3186  "", "inst");
                            -
                            3187  params.emplace_back("", "NrnThread*", "", "nt");
                            -
                            3188  params.emplace_back("", "Memb_list*", "", "ml");
                            -
                            3189  params.emplace_back("", "int", "", "weight_index");
                            -
                            3190  params.emplace_back("", "double", "", "flag");
                            -
                            3191  } else {
                            -
                            3192  name = method_name("net_receive");
                            -
                            3193  params.emplace_back("", "Point_process*", "", "pnt");
                            -
                            3194  params.emplace_back("", "int", "", "weight_index");
                            -
                            3195  params.emplace_back("", "double", "", "flag");
                            -
                            3196  }
                            -
                            3197 
                            -
                            3198  printer->add_newline(2);
                            -
                            3199  printer->fmt_push_block("static inline void {}({})", name, get_parameter_str(params));
                            -
                            3200  print_net_receive_common_code(*node, info.artificial_cell);
                            -
                            3201  if (info.artificial_cell) {
                            -
                            3202  printer->add_line("double t = nt->_t;");
                            -
                            3203  }
                            -
                            3204 
                            -
                            3205  // set voltage variable if it is used in the block (e.g. for WATCH statement)
                            -
                            3206  auto v_used = VarUsageVisitor().variable_used(*node->get_statement_block(), "v");
                            -
                            3207  if (v_used) {
                            -
                            3208  printer->add_line("int node_id = ml->nodeindices[id];");
                            -
                            3209  printer->add_line("v = nt->_actual_v[node_id];");
                            -
                            3210  }
                            -
                            3211 
                            -
                            3212  printer->fmt_line("{} = t;", get_variable_name("tsave"));
                            -
                            3213 
                            -
                            3214  if (info.is_watch_used()) {
                            -
                            3215  printer->add_line("bool watch_remove = false;");
                            -
                            3216  }
                            -
                            3217 
                            -
                            3218  printer->add_indent();
                            -
                            3219  node->get_statement_block()->accept(*this);
                            -
                            3220  printer->add_newline();
                            -
                            3221  printer->pop_block();
                            -
                            3222 
                            -
                            3223  printing_net_receive = false;
                            -
                            3224  codegen = false;
                            -
                            3225 }
                            -
                            3226 
                            -
                            3227 
                            - -
                            3229  if (!net_receive_required()) {
                            -
                            3230  return;
                            -
                            3231  }
                            -
                            3232  codegen = true;
                            -
                            3233  printing_net_receive = true;
                            -
                            3234  if (!info.artificial_cell) {
                            -
                            3235  const auto& name = method_name("net_receive");
                            -
                            3236  ParamVector params;
                            -
                            3237  params.emplace_back("", "Point_process*", "", "pnt");
                            -
                            3238  params.emplace_back("", "int", "", "weight_index");
                            -
                            3239  params.emplace_back("", "double", "", "flag");
                            -
                            3240  printer->add_newline(2);
                            -
                            3241  printer->fmt_push_block("static void {}({})", name, get_parameter_str(params));
                            -
                            3242  printer->add_line("NrnThread* nt = nrn_threads + pnt->_tid;");
                            -
                            3243  printer->add_line("Memb_list* ml = get_memb_list(nt);");
                            -
                            3244  printer->add_line("NetReceiveBuffer_t* nrb = ml->_net_receive_buffer;");
                            -
                            3245  printer->push_block("if (nrb->_cnt >= nrb->_size)");
                            -
                            3246  printer->add_line("realloc_net_receive_buffer(nt, ml);");
                            -
                            3247  printer->pop_block();
                            -
                            3248  printer->add_multi_line(R"CODE(
                            -
                            3249  int id = nrb->_cnt;
                            -
                            3250  nrb->_pnt_index[id] = pnt-nt->pntprocs;
                            -
                            3251  nrb->_weight_index[id] = weight_index;
                            -
                            3252  nrb->_nrb_t[id] = nt->_t;
                            -
                            3253  nrb->_nrb_flag[id] = flag;
                            -
                            3254  nrb->_cnt++;
                            -
                            3255  )CODE");
                            -
                            3256  printer->pop_block();
                            -
                            3257  }
                            -
                            3258  printing_net_receive = false;
                            -
                            3259  codegen = false;
                            -
                            3260 }
                            -
                            3261 
                            -
                            3262 
                            -
                            3263 /**
                            -
                            3264  * \todo Data is not derived. Need to add instance into instance struct?
                            -
                            3265  * data used here is wrong in AoS because as in original implementation,
                            -
                            3266  * data is not incremented every iteration for AoS. May be better to derive
                            -
                            3267  * actual variable names? [resolved now?]
                            -
                            3268  * slist needs to added as local variable
                            -
                            3269  */
                            - -
                            3271  auto ext_args = external_method_arguments();
                            -
                            3272  auto ext_params = external_method_parameters();
                            -
                            3273  auto suffix = info.mod_suffix;
                            -
                            3274  auto list_num = info.derivimplicit_list_num;
                            -
                            3275  auto block_name = block.get_node_name();
                            -
                            3276  auto primes_size = info.primes_size;
                            -
                            3277  auto stride = "*pnodecount+id";
                            -
                            3278 
                            -
                            3279  printer->add_newline(2);
                            -
                            3280 
                            -
                            3281  printer->push_block("namespace");
                            -
                            3282  printer->fmt_push_block("struct _newton_{}_{}", block_name, info.mod_suffix);
                            -
                            3283  printer->fmt_push_block("int operator()({}) const", external_method_parameters());
                            -
                            3284  auto const instance = fmt::format("auto* const inst = static_cast<{0}*>(ml->instance);",
                            -
                            3285  instance_struct());
                            -
                            3286  auto const slist1 = fmt::format("auto const& slist{} = {};",
                            -
                            3287  list_num,
                            -
                            3288  get_variable_name(fmt::format("slist{}", list_num)));
                            -
                            3289  auto const slist2 = fmt::format("auto& slist{} = {};",
                            -
                            3290  list_num + 1,
                            -
                            3291  get_variable_name(fmt::format("slist{}", list_num + 1)));
                            -
                            3292  auto const dlist1 = fmt::format("auto const& dlist{} = {};",
                            -
                            3293  list_num,
                            -
                            3294  get_variable_name(fmt::format("dlist{}", list_num)));
                            -
                            3295  auto const dlist2 = fmt::format(
                            -
                            3296  "double* dlist{} = static_cast<double*>(thread[dith{}()].pval) + ({}*pnodecount);",
                            -
                            3297  list_num + 1,
                            -
                            3298  list_num,
                            -
                            3299  info.primes_size);
                            -
                            3300  printer->add_line(instance);
                            -
                            3301  if (ion_variable_struct_required()) {
                            -
                            3302  print_ion_variable();
                            -
                            3303  }
                            -
                            3304  printer->fmt_line("double* savstate{} = static_cast<double*>(thread[dith{}()].pval);",
                            -
                            3305  list_num,
                            -
                            3306  list_num);
                            -
                            3307  printer->add_line(slist1);
                            -
                            3308  printer->add_line(dlist1);
                            -
                            3309  printer->add_line(dlist2);
                            -
                            3310  codegen = true;
                            -
                            3311  print_statement_block(*block.get_statement_block(), false, false);
                            -
                            3312  codegen = false;
                            -
                            3313  printer->add_line("int counter = -1;");
                            -
                            3314  printer->fmt_push_block("for (int i=0; i<{}; i++)", info.num_primes);
                            -
                            3315  printer->fmt_push_block("if (*deriv{}_advance(thread))", list_num);
                            -
                            3316  printer->fmt_line(
                            -
                            3317  "dlist{0}[(++counter){1}] = "
                            -
                            3318  "data[dlist{2}[i]{1}]-(data[slist{2}[i]{1}]-savstate{2}[i{1}])/nt->_dt;",
                            -
                            3319  list_num + 1,
                            -
                            3320  stride,
                            -
                            3321  list_num);
                            -
                            3322  printer->chain_block("else");
                            -
                            3323  printer->fmt_line("dlist{0}[(++counter){1}] = data[slist{2}[i]{1}]-savstate{2}[i{1}];",
                            -
                            3324  list_num + 1,
                            -
                            3325  stride,
                            -
                            3326  list_num);
                            -
                            3327  printer->pop_block();
                            -
                            3328  printer->pop_block();
                            -
                            3329  printer->add_line("return 0;");
                            -
                            3330  printer->pop_block(); // operator()
                            -
                            3331  printer->pop_block(";"); // struct
                            -
                            3332  printer->pop_block(); // namespace
                            -
                            3333  printer->add_newline();
                            -
                            3334  printer->fmt_push_block("int {}_{}({})", block_name, suffix, ext_params);
                            -
                            3335  printer->add_line(instance);
                            -
                            3336  printer->fmt_line("double* savstate{} = (double*) thread[dith{}()].pval;", list_num, list_num);
                            -
                            3337  printer->add_line(slist1);
                            -
                            3338  printer->add_line(slist2);
                            -
                            3339  printer->add_line(dlist2);
                            -
                            3340  printer->fmt_push_block("for (int i=0; i<{}; i++)", info.num_primes);
                            -
                            3341  printer->fmt_line("savstate{}[i{}] = data[slist{}[i]{}];", list_num, stride, list_num, stride);
                            -
                            3342  printer->pop_block();
                            -
                            3343  printer->fmt_line(
                            -
                            3344  "int reset = nrn_newton_thread(static_cast<NewtonSpace*>(*newtonspace{}(thread)), {}, "
                            -
                            3345  "slist{}, _newton_{}_{}{{}}, dlist{}, {});",
                            -
                            3346  list_num,
                            -
                            3347  primes_size,
                            -
                            3348  list_num + 1,
                            -
                            3349  block_name,
                            -
                            3350  suffix,
                            -
                            3351  list_num + 1,
                            -
                            3352  ext_args);
                            -
                            3353  printer->add_line("return reset;");
                            -
                            3354  printer->pop_block();
                            -
                            3355  printer->add_newline(2);
                            -
                            3356 }
                            -
                            3357 
                            -
                            3358 
                            - -
                            3360  // nothing to do on cpu
                            -
                            3361 }
                            -
                            3362 
                            -
                            3363 
                            -
                            3364 /****************************************************************************************/
                            -
                            3365 /* Print nrn_state routine */
                            -
                            3366 /****************************************************************************************/
                            -
                            3367 
                            -
                            3368 
                            - -
                            3370  if (!nrn_state_required()) {
                            -
                            3371  return;
                            -
                            3372  }
                            -
                            3373  codegen = true;
                            -
                            3374 
                            -
                            3375  printer->add_newline(2);
                            -
                            3376  printer->add_line("/** update state */");
                            -
                            3377  print_global_function_common_code(BlockType::State);
                            -
                            3378  print_channel_iteration_block_parallel_hint(BlockType::State, info.nrn_state_block);
                            -
                            3379  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            -
                            3380 
                            -
                            3381  printer->add_line("int node_id = node_index[id];");
                            -
                            3382  printer->add_line("double v = voltage[node_id];");
                            -
                            3383  print_v_unused();
                            -
                            3384 
                            -
                            3385  /**
                            -
                            3386  * \todo Eigen solver node also emits IonCurVar variable in the functor
                            -
                            3387  * but that shouldn't update ions in derivative block
                            -
                            3388  */
                            -
                            3389  if (ion_variable_struct_required()) {
                            -
                            3390  print_ion_variable();
                            -
                            3391  }
                            -
                            3392 
                            -
                            3393  auto read_statements = ion_read_statements(BlockType::State);
                            -
                            3394  for (auto& statement: read_statements) {
                            -
                            3395  printer->add_line(statement);
                            -
                            3396  }
                            -
                            3397 
                            -
                            3398  if (info.nrn_state_block) {
                            -
                            3399  info.nrn_state_block->visit_children(*this);
                            -
                            3400  }
                            -
                            3401 
                            -
                            3402  if (info.currents.empty() && info.breakpoint_node != nullptr) {
                            -
                            3403  auto block = info.breakpoint_node->get_statement_block();
                            -
                            3404  print_statement_block(*block, false, false);
                            -
                            3405  }
                            +
                            3139  // rename net_receive arguments used in the block itself
                            +
                            3140  rename_net_receive_arguments(*info.net_receive_node, *node);
                            +
                            3141 
                            +
                            3142  std::string name;
                            +
                            3143  ParamVector params;
                            +
                            3144  if (!info.artificial_cell) {
                            +
                            3145  name = method_name("net_receive_kernel");
                            +
                            3146  params.emplace_back("", "double", "", "t");
                            +
                            3147  params.emplace_back("", "Point_process*", "", "pnt");
                            +
                            3148  params.emplace_back("", fmt::format("{}*", instance_struct()),
                            +
                            3149  "", "inst");
                            +
                            3150  params.emplace_back("", "NrnThread*", "", "nt");
                            +
                            3151  params.emplace_back("", "Memb_list*", "", "ml");
                            +
                            3152  params.emplace_back("", "int", "", "weight_index");
                            +
                            3153  params.emplace_back("", "double", "", "flag");
                            +
                            3154  } else {
                            +
                            3155  name = method_name("net_receive");
                            +
                            3156  params.emplace_back("", "Point_process*", "", "pnt");
                            +
                            3157  params.emplace_back("", "int", "", "weight_index");
                            +
                            3158  params.emplace_back("", "double", "", "flag");
                            +
                            3159  }
                            +
                            3160 
                            +
                            3161  printer->add_newline(2);
                            +
                            3162  printer->fmt_push_block("static inline void {}({})", name, get_parameter_str(params));
                            +
                            3163  print_net_receive_common_code(*node, info.artificial_cell);
                            +
                            3164  if (info.artificial_cell) {
                            +
                            3165  printer->add_line("double t = nt->_t;");
                            +
                            3166  }
                            +
                            3167 
                            +
                            3168  // set voltage variable if it is used in the block (e.g. for WATCH statement)
                            +
                            3169  auto v_used = VarUsageVisitor().variable_used(*node->get_statement_block(), "v");
                            +
                            3170  if (v_used) {
                            +
                            3171  printer->add_line("int node_id = ml->nodeindices[id];");
                            +
                            3172  printer->add_line("v = nt->_actual_v[node_id];");
                            +
                            3173  }
                            +
                            3174 
                            +
                            3175  printer->fmt_line("{} = t;", get_variable_name("tsave"));
                            +
                            3176 
                            +
                            3177  if (info.is_watch_used()) {
                            +
                            3178  printer->add_line("bool watch_remove = false;");
                            +
                            3179  }
                            +
                            3180 
                            +
                            3181  printer->add_indent();
                            +
                            3182  node->get_statement_block()->accept(*this);
                            +
                            3183  printer->add_newline();
                            +
                            3184  printer->pop_block();
                            +
                            3185 
                            +
                            3186  printing_net_receive = false;
                            +
                            3187  codegen = false;
                            +
                            3188 }
                            +
                            3189 
                            +
                            3190 
                            + +
                            3192  if (!net_receive_required()) {
                            +
                            3193  return;
                            +
                            3194  }
                            +
                            3195  codegen = true;
                            +
                            3196  printing_net_receive = true;
                            +
                            3197  if (!info.artificial_cell) {
                            +
                            3198  const auto& name = method_name("net_receive");
                            +
                            3199  ParamVector params;
                            +
                            3200  params.emplace_back("", "Point_process*", "", "pnt");
                            +
                            3201  params.emplace_back("", "int", "", "weight_index");
                            +
                            3202  params.emplace_back("", "double", "", "flag");
                            +
                            3203  printer->add_newline(2);
                            +
                            3204  printer->fmt_push_block("static void {}({})", name, get_parameter_str(params));
                            +
                            3205  printer->add_line("NrnThread* nt = nrn_threads + pnt->_tid;");
                            +
                            3206  printer->add_line("Memb_list* ml = get_memb_list(nt);");
                            +
                            3207  printer->add_line("NetReceiveBuffer_t* nrb = ml->_net_receive_buffer;");
                            +
                            3208  printer->push_block("if (nrb->_cnt >= nrb->_size)");
                            +
                            3209  printer->add_line("realloc_net_receive_buffer(nt, ml);");
                            +
                            3210  printer->pop_block();
                            +
                            3211  printer->add_multi_line(R"CODE(
                            +
                            3212  int id = nrb->_cnt;
                            +
                            3213  nrb->_pnt_index[id] = pnt-nt->pntprocs;
                            +
                            3214  nrb->_weight_index[id] = weight_index;
                            +
                            3215  nrb->_nrb_t[id] = nt->_t;
                            +
                            3216  nrb->_nrb_flag[id] = flag;
                            +
                            3217  nrb->_cnt++;
                            +
                            3218  )CODE");
                            +
                            3219  printer->pop_block();
                            +
                            3220  }
                            +
                            3221  printing_net_receive = false;
                            +
                            3222  codegen = false;
                            +
                            3223 }
                            +
                            3224 
                            +
                            3225 
                            +
                            3226 /**
                            +
                            3227  * \todo Data is not derived. Need to add instance into instance struct?
                            +
                            3228  * data used here is wrong in AoS because as in original implementation,
                            +
                            3229  * data is not incremented every iteration for AoS. May be better to derive
                            +
                            3230  * actual variable names? [resolved now?]
                            +
                            3231  * slist needs to added as local variable
                            +
                            3232  */
                            + +
                            3234  auto ext_args = external_method_arguments();
                            +
                            3235  auto ext_params = external_method_parameters();
                            +
                            3236  auto suffix = info.mod_suffix;
                            +
                            3237  auto list_num = info.derivimplicit_list_num;
                            +
                            3238  auto block_name = block.get_node_name();
                            +
                            3239  auto primes_size = info.primes_size;
                            +
                            3240  auto stride = "*pnodecount+id";
                            +
                            3241 
                            +
                            3242  printer->add_newline(2);
                            +
                            3243 
                            +
                            3244  printer->push_block("namespace");
                            +
                            3245  printer->fmt_push_block("struct _newton_{}_{}", block_name, info.mod_suffix);
                            +
                            3246  printer->fmt_push_block("int operator()({}) const", external_method_parameters());
                            +
                            3247  auto const instance = fmt::format("auto* const inst = static_cast<{0}*>(ml->instance);",
                            +
                            3248  instance_struct());
                            +
                            3249  auto const slist1 = fmt::format("auto const& slist{} = {};",
                            +
                            3250  list_num,
                            +
                            3251  get_variable_name(fmt::format("slist{}", list_num)));
                            +
                            3252  auto const slist2 = fmt::format("auto& slist{} = {};",
                            +
                            3253  list_num + 1,
                            +
                            3254  get_variable_name(fmt::format("slist{}", list_num + 1)));
                            +
                            3255  auto const dlist1 = fmt::format("auto const& dlist{} = {};",
                            +
                            3256  list_num,
                            +
                            3257  get_variable_name(fmt::format("dlist{}", list_num)));
                            +
                            3258  auto const dlist2 = fmt::format(
                            +
                            3259  "double* dlist{} = static_cast<double*>(thread[dith{}()].pval) + ({}*pnodecount);",
                            +
                            3260  list_num + 1,
                            +
                            3261  list_num,
                            +
                            3262  info.primes_size);
                            +
                            3263  printer->add_line(instance);
                            +
                            3264  if (ion_variable_struct_required()) {
                            +
                            3265  print_ion_variable();
                            +
                            3266  }
                            +
                            3267  printer->fmt_line("double* savstate{} = static_cast<double*>(thread[dith{}()].pval);",
                            +
                            3268  list_num,
                            +
                            3269  list_num);
                            +
                            3270  printer->add_line(slist1);
                            +
                            3271  printer->add_line(dlist1);
                            +
                            3272  printer->add_line(dlist2);
                            +
                            3273  codegen = true;
                            +
                            3274  print_statement_block(*block.get_statement_block(), false, false);
                            +
                            3275  codegen = false;
                            +
                            3276  printer->add_line("int counter = -1;");
                            +
                            3277  printer->fmt_push_block("for (int i=0; i<{}; i++)", info.num_primes);
                            +
                            3278  printer->fmt_push_block("if (*deriv{}_advance(thread))", list_num);
                            +
                            3279  printer->fmt_line(
                            +
                            3280  "dlist{0}[(++counter){1}] = "
                            +
                            3281  "data[dlist{2}[i]{1}]-(data[slist{2}[i]{1}]-savstate{2}[i{1}])/nt->_dt;",
                            +
                            3282  list_num + 1,
                            +
                            3283  stride,
                            +
                            3284  list_num);
                            +
                            3285  printer->chain_block("else");
                            +
                            3286  printer->fmt_line("dlist{0}[(++counter){1}] = data[slist{2}[i]{1}]-savstate{2}[i{1}];",
                            +
                            3287  list_num + 1,
                            +
                            3288  stride,
                            +
                            3289  list_num);
                            +
                            3290  printer->pop_block();
                            +
                            3291  printer->pop_block();
                            +
                            3292  printer->add_line("return 0;");
                            +
                            3293  printer->pop_block(); // operator()
                            +
                            3294  printer->pop_block(";"); // struct
                            +
                            3295  printer->pop_block(); // namespace
                            +
                            3296  printer->add_newline();
                            +
                            3297  printer->fmt_push_block("int {}_{}({})", block_name, suffix, ext_params);
                            +
                            3298  printer->add_line(instance);
                            +
                            3299  printer->fmt_line("double* savstate{} = (double*) thread[dith{}()].pval;", list_num, list_num);
                            +
                            3300  printer->add_line(slist1);
                            +
                            3301  printer->add_line(slist2);
                            +
                            3302  printer->add_line(dlist2);
                            +
                            3303  printer->fmt_push_block("for (int i=0; i<{}; i++)", info.num_primes);
                            +
                            3304  printer->fmt_line("savstate{}[i{}] = data[slist{}[i]{}];", list_num, stride, list_num, stride);
                            +
                            3305  printer->pop_block();
                            +
                            3306  printer->fmt_line(
                            +
                            3307  "int reset = nrn_newton_thread(static_cast<NewtonSpace*>(*newtonspace{}(thread)), {}, "
                            +
                            3308  "slist{}, _newton_{}_{}{{}}, dlist{}, {});",
                            +
                            3309  list_num,
                            +
                            3310  primes_size,
                            +
                            3311  list_num + 1,
                            +
                            3312  block_name,
                            +
                            3313  suffix,
                            +
                            3314  list_num + 1,
                            +
                            3315  ext_args);
                            +
                            3316  printer->add_line("return reset;");
                            +
                            3317  printer->pop_block();
                            +
                            3318  printer->add_newline(2);
                            +
                            3319 }
                            +
                            3320 
                            +
                            3321 
                            + +
                            3323  // nothing to do on cpu
                            +
                            3324 }
                            +
                            3325 
                            +
                            3326 
                            +
                            3327 /****************************************************************************************/
                            +
                            3328 /* Print nrn_state routine */
                            +
                            3329 /****************************************************************************************/
                            +
                            3330 
                            +
                            3331 
                            + +
                            3333  if (!nrn_state_required()) {
                            +
                            3334  return;
                            +
                            3335  }
                            +
                            3336  codegen = true;
                            +
                            3337 
                            +
                            3338  printer->add_newline(2);
                            +
                            3339  printer->add_line("/** update state */");
                            +
                            3340  print_global_function_common_code(BlockType::State);
                            +
                            3341  print_channel_iteration_block_parallel_hint(BlockType::State, info.nrn_state_block);
                            +
                            3342  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            +
                            3343 
                            +
                            3344  printer->add_line("int node_id = node_index[id];");
                            +
                            3345  printer->add_line("double v = voltage[node_id];");
                            +
                            3346  print_v_unused();
                            +
                            3347 
                            +
                            3348  /**
                            +
                            3349  * \todo Eigen solver node also emits IonCurVar variable in the functor
                            +
                            3350  * but that shouldn't update ions in derivative block
                            +
                            3351  */
                            +
                            3352  if (ion_variable_struct_required()) {
                            +
                            3353  print_ion_variable();
                            +
                            3354  }
                            +
                            3355 
                            +
                            3356  auto read_statements = ion_read_statements(BlockType::State);
                            +
                            3357  for (auto& statement: read_statements) {
                            +
                            3358  printer->add_line(statement);
                            +
                            3359  }
                            +
                            3360 
                            +
                            3361  if (info.nrn_state_block) {
                            +
                            3362  info.nrn_state_block->visit_children(*this);
                            +
                            3363  }
                            +
                            3364 
                            +
                            3365  if (info.currents.empty() && info.breakpoint_node != nullptr) {
                            +
                            3366  auto block = info.breakpoint_node->get_statement_block();
                            +
                            3367  print_statement_block(*block, false, false);
                            +
                            3368  }
                            +
                            3369 
                            +
                            3370  const auto& write_statements = ion_write_statements(BlockType::State);
                            +
                            3371  for (auto& statement: write_statements) {
                            +
                            3372  const auto& text = process_shadow_update_statement(statement, BlockType::State);
                            +
                            3373  printer->add_line(text);
                            +
                            3374  }
                            +
                            3375  printer->pop_block();
                            +
                            3376 
                            +
                            3377  print_kernel_data_present_annotation_block_end();
                            +
                            3378 
                            +
                            3379  printer->pop_block();
                            +
                            3380  codegen = false;
                            +
                            3381 }
                            +
                            3382 
                            +
                            3383 
                            +
                            3384 /****************************************************************************************/
                            +
                            3385 /* Print nrn_cur related routines */
                            +
                            3386 /****************************************************************************************/
                            +
                            3387 
                            +
                            3388 
                            + +
                            3390  const auto& args = internal_method_parameters();
                            +
                            3391  const auto& block = node.get_statement_block();
                            +
                            3392  printer->add_newline(2);
                            +
                            3393  print_device_method_annotation();
                            +
                            3394  printer->fmt_push_block("inline double nrn_current_{}({})",
                            +
                            3395  info.mod_suffix,
                            +
                            3396  get_parameter_str(args));
                            +
                            3397  printer->add_line("double current = 0.0;");
                            +
                            3398  print_statement_block(*block, false, false);
                            +
                            3399  for (auto& current: info.currents) {
                            +
                            3400  const auto& name = get_variable_name(current);
                            +
                            3401  printer->fmt_line("current += {};", name);
                            +
                            3402  }
                            +
                            3403  printer->add_line("return current;");
                            +
                            3404  printer->pop_block();
                            +
                            3405 }
                            3406 
                            -
                            3407  const auto& write_statements = ion_write_statements(BlockType::State);
                            -
                            3408  for (auto& statement: write_statements) {
                            -
                            3409  const auto& text = process_shadow_update_statement(statement, BlockType::State);
                            -
                            3410  printer->add_line(text);
                            -
                            3411  }
                            -
                            3412  printer->pop_block();
                            -
                            3413 
                            -
                            3414  print_kernel_data_present_annotation_block_end();
                            -
                            3415 
                            -
                            3416  printer->pop_block();
                            -
                            3417  codegen = false;
                            -
                            3418 }
                            -
                            3419 
                            -
                            3420 
                            -
                            3421 /****************************************************************************************/
                            -
                            3422 /* Print nrn_cur related routines */
                            -
                            3423 /****************************************************************************************/
                            -
                            3424 
                            -
                            3425 
                            - -
                            3427  const auto& args = internal_method_parameters();
                            -
                            3428  const auto& block = node.get_statement_block();
                            -
                            3429  printer->add_newline(2);
                            -
                            3430  print_device_method_annotation();
                            -
                            3431  printer->fmt_push_block("inline double nrn_current_{}({})",
                            -
                            3432  info.mod_suffix,
                            -
                            3433  get_parameter_str(args));
                            -
                            3434  printer->add_line("double current = 0.0;");
                            -
                            3435  print_statement_block(*block, false, false);
                            -
                            3436  for (auto& current: info.currents) {
                            -
                            3437  const auto& name = get_variable_name(current);
                            -
                            3438  printer->fmt_line("current += {};", name);
                            -
                            3439  }
                            -
                            3440  printer->add_line("return current;");
                            -
                            3441  printer->pop_block();
                            +
                            3407 
                            + +
                            3409  const auto& block = node.get_statement_block();
                            +
                            3410  print_statement_block(*block, false, false);
                            +
                            3411  if (!info.currents.empty()) {
                            +
                            3412  std::string sum;
                            +
                            3413  for (const auto& current: info.currents) {
                            +
                            3414  auto var = breakpoint_current(current);
                            +
                            3415  sum += get_variable_name(var);
                            +
                            3416  if (&current != &info.currents.back()) {
                            +
                            3417  sum += "+";
                            +
                            3418  }
                            +
                            3419  }
                            +
                            3420  printer->fmt_line("double rhs = {};", sum);
                            +
                            3421  }
                            +
                            3422 
                            +
                            3423  std::string sum;
                            +
                            3424  for (const auto& conductance: info.conductances) {
                            +
                            3425  auto var = breakpoint_current(conductance.variable);
                            +
                            3426  sum += get_variable_name(var);
                            +
                            3427  if (&conductance != &info.conductances.back()) {
                            +
                            3428  sum += "+";
                            +
                            3429  }
                            +
                            3430  }
                            +
                            3431  printer->fmt_line("double g = {};", sum);
                            +
                            3432 
                            +
                            3433  for (const auto& conductance: info.conductances) {
                            +
                            3434  if (!conductance.ion.empty()) {
                            +
                            3435  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + conductance.ion + "dv";
                            +
                            3436  const auto& rhs = get_variable_name(conductance.variable);
                            +
                            3437  const ShadowUseStatement statement{lhs, "+=", rhs};
                            +
                            3438  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
                            +
                            3439  printer->add_line(text);
                            +
                            3440  }
                            +
                            3441  }
                            3442 }
                            3443 
                            3444 
                            - -
                            3446  const auto& block = node.get_statement_block();
                            -
                            3447  print_statement_block(*block, false, false);
                            -
                            3448  if (!info.currents.empty()) {
                            -
                            3449  std::string sum;
                            -
                            3450  for (const auto& current: info.currents) {
                            -
                            3451  auto var = breakpoint_current(current);
                            -
                            3452  sum += get_variable_name(var);
                            -
                            3453  if (&current != &info.currents.back()) {
                            -
                            3454  sum += "+";
                            -
                            3455  }
                            -
                            3456  }
                            -
                            3457  printer->fmt_line("double rhs = {};", sum);
                            -
                            3458  }
                            -
                            3459 
                            -
                            3460  std::string sum;
                            -
                            3461  for (const auto& conductance: info.conductances) {
                            -
                            3462  auto var = breakpoint_current(conductance.variable);
                            -
                            3463  sum += get_variable_name(var);
                            -
                            3464  if (&conductance != &info.conductances.back()) {
                            -
                            3465  sum += "+";
                            -
                            3466  }
                            -
                            3467  }
                            -
                            3468  printer->fmt_line("double g = {};", sum);
                            -
                            3469 
                            -
                            3470  for (const auto& conductance: info.conductances) {
                            -
                            3471  if (!conductance.ion.empty()) {
                            -
                            3472  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + conductance.ion + "dv";
                            -
                            3473  const auto& rhs = get_variable_name(conductance.variable);
                            -
                            3474  const ShadowUseStatement statement{lhs, "+=", rhs};
                            -
                            3475  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
                            -
                            3476  printer->add_line(text);
                            -
                            3477  }
                            -
                            3478  }
                            -
                            3479 }
                            -
                            3480 
                            -
                            3481 
                            - -
                            3483  printer->fmt_line("double g = nrn_current_{}({}+0.001);",
                            -
                            3484  info.mod_suffix,
                            -
                            3485  internal_method_arguments());
                            -
                            3486  for (auto& ion: info.ions) {
                            -
                            3487  for (auto& var: ion.writes) {
                            -
                            3488  if (ion.is_ionic_current(var)) {
                            -
                            3489  const auto& name = get_variable_name(var);
                            -
                            3490  printer->fmt_line("double di{} = {};", ion.name, name);
                            -
                            3491  }
                            -
                            3492  }
                            -
                            3493  }
                            -
                            3494  printer->fmt_line("double rhs = nrn_current_{}({});",
                            -
                            3495  info.mod_suffix,
                            -
                            3496  internal_method_arguments());
                            -
                            3497  printer->add_line("g = (g-rhs)/0.001;");
                            -
                            3498  for (auto& ion: info.ions) {
                            -
                            3499  for (auto& var: ion.writes) {
                            -
                            3500  if (ion.is_ionic_current(var)) {
                            -
                            3501  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + ion.name + "dv";
                            -
                            3502  auto rhs = fmt::format("(di{}-{})/0.001", ion.name, get_variable_name(var));
                            -
                            3503  if (info.point_process) {
                            -
                            3504  auto area = get_variable_name(naming::NODE_AREA_VARIABLE);
                            -
                            3505  rhs += fmt::format("*1.e2/{}", area);
                            -
                            3506  }
                            -
                            3507  const ShadowUseStatement statement{lhs, "+=", rhs};
                            -
                            3508  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
                            -
                            3509  printer->add_line(text);
                            -
                            3510  }
                            -
                            3511  }
                            -
                            3512  }
                            -
                            3513 }
                            + +
                            3446  printer->fmt_line("double g = nrn_current_{}({}+0.001);",
                            +
                            3447  info.mod_suffix,
                            +
                            3448  internal_method_arguments());
                            +
                            3449  for (auto& ion: info.ions) {
                            +
                            3450  for (auto& var: ion.writes) {
                            +
                            3451  if (ion.is_ionic_current(var)) {
                            +
                            3452  const auto& name = get_variable_name(var);
                            +
                            3453  printer->fmt_line("double di{} = {};", ion.name, name);
                            +
                            3454  }
                            +
                            3455  }
                            +
                            3456  }
                            +
                            3457  printer->fmt_line("double rhs = nrn_current_{}({});",
                            +
                            3458  info.mod_suffix,
                            +
                            3459  internal_method_arguments());
                            +
                            3460  printer->add_line("g = (g-rhs)/0.001;");
                            +
                            3461  for (auto& ion: info.ions) {
                            +
                            3462  for (auto& var: ion.writes) {
                            +
                            3463  if (ion.is_ionic_current(var)) {
                            +
                            3464  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + ion.name + "dv";
                            +
                            3465  auto rhs = fmt::format("(di{}-{})/0.001", ion.name, get_variable_name(var));
                            +
                            3466  if (info.point_process) {
                            +
                            3467  auto area = get_variable_name(naming::NODE_AREA_VARIABLE);
                            +
                            3468  rhs += fmt::format("*1.e2/{}", area);
                            +
                            3469  }
                            +
                            3470  const ShadowUseStatement statement{lhs, "+=", rhs};
                            +
                            3471  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
                            +
                            3472  printer->add_line(text);
                            +
                            3473  }
                            +
                            3474  }
                            +
                            3475  }
                            +
                            3476 }
                            +
                            3477 
                            +
                            3478 
                            + +
                            3480  printer->add_line("int node_id = node_index[id];");
                            +
                            3481  printer->add_line("double v = voltage[node_id];");
                            +
                            3482  print_v_unused();
                            +
                            3483  if (ion_variable_struct_required()) {
                            +
                            3484  print_ion_variable();
                            +
                            3485  }
                            +
                            3486 
                            +
                            3487  const auto& read_statements = ion_read_statements(BlockType::Equation);
                            +
                            3488  for (auto& statement: read_statements) {
                            +
                            3489  printer->add_line(statement);
                            +
                            3490  }
                            +
                            3491 
                            +
                            3492  if (info.conductances.empty()) {
                            +
                            3493  print_nrn_cur_non_conductance_kernel();
                            +
                            3494  } else {
                            +
                            3495  print_nrn_cur_conductance_kernel(node);
                            +
                            3496  }
                            +
                            3497 
                            +
                            3498  const auto& write_statements = ion_write_statements(BlockType::Equation);
                            +
                            3499  for (auto& statement: write_statements) {
                            +
                            3500  auto text = process_shadow_update_statement(statement, BlockType::Equation);
                            +
                            3501  printer->add_line(text);
                            +
                            3502  }
                            +
                            3503 
                            +
                            3504  if (info.point_process) {
                            +
                            3505  const auto& area = get_variable_name(naming::NODE_AREA_VARIABLE);
                            +
                            3506  printer->fmt_line("double mfactor = 1.e2/{};", area);
                            +
                            3507  printer->add_line("g = g*mfactor;");
                            +
                            3508  printer->add_line("rhs = rhs*mfactor;");
                            +
                            3509  }
                            +
                            3510 
                            +
                            3511  print_g_unused();
                            +
                            3512 }
                            +
                            3513 
                            3514 
                            -
                            3515 
                            - -
                            3517  printer->add_line("int node_id = node_index[id];");
                            -
                            3518  printer->add_line("double v = voltage[node_id];");
                            -
                            3519  print_v_unused();
                            -
                            3520  if (ion_variable_struct_required()) {
                            -
                            3521  print_ion_variable();
                            -
                            3522  }
                            -
                            3523 
                            -
                            3524  const auto& read_statements = ion_read_statements(BlockType::Equation);
                            -
                            3525  for (auto& statement: read_statements) {
                            -
                            3526  printer->add_line(statement);
                            -
                            3527  }
                            -
                            3528 
                            -
                            3529  if (info.conductances.empty()) {
                            -
                            3530  print_nrn_cur_non_conductance_kernel();
                            -
                            3531  } else {
                            -
                            3532  print_nrn_cur_conductance_kernel(node);
                            -
                            3533  }
                            -
                            3534 
                            -
                            3535  const auto& write_statements = ion_write_statements(BlockType::Equation);
                            -
                            3536  for (auto& statement: write_statements) {
                            -
                            3537  auto text = process_shadow_update_statement(statement, BlockType::Equation);
                            -
                            3538  printer->add_line(text);
                            + +
                            3516  if (!info.electrode_current) {
                            +
                            3517  return;
                            +
                            3518  }
                            +
                            3519  std::string rhs, d;
                            +
                            3520  auto rhs_op = operator_for_rhs();
                            +
                            3521  auto d_op = operator_for_d();
                            +
                            3522  if (info.point_process) {
                            +
                            3523  rhs = "shadow_rhs[id]";
                            +
                            3524  d = "shadow_d[id]";
                            +
                            3525  } else {
                            +
                            3526  rhs = "rhs";
                            +
                            3527  d = "g";
                            +
                            3528  }
                            +
                            3529 
                            +
                            3530  printer->push_block("if (nt->nrn_fast_imem)");
                            +
                            3531  if (nrn_cur_reduction_loop_required()) {
                            +
                            3532  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            +
                            3533  printer->add_line("int node_id = node_index[id];");
                            +
                            3534  }
                            +
                            3535  printer->fmt_line("nt->nrn_fast_imem->nrn_sav_rhs[node_id] {} {};", rhs_op, rhs);
                            +
                            3536  printer->fmt_line("nt->nrn_fast_imem->nrn_sav_d[node_id] {} {};", d_op, d);
                            +
                            3537  if (nrn_cur_reduction_loop_required()) {
                            +
                            3538  printer->pop_block();
                            3539  }
                            -
                            3540 
                            -
                            3541  if (info.point_process) {
                            -
                            3542  const auto& area = get_variable_name(naming::NODE_AREA_VARIABLE);
                            -
                            3543  printer->fmt_line("double mfactor = 1.e2/{};", area);
                            -
                            3544  printer->add_line("g = g*mfactor;");
                            -
                            3545  printer->add_line("rhs = rhs*mfactor;");
                            -
                            3546  }
                            -
                            3547 
                            -
                            3548  print_g_unused();
                            -
                            3549 }
                            -
                            3550 
                            -
                            3551 
                            - -
                            3553  if (!info.electrode_current) {
                            -
                            3554  return;
                            -
                            3555  }
                            -
                            3556  std::string rhs, d;
                            -
                            3557  auto rhs_op = operator_for_rhs();
                            -
                            3558  auto d_op = operator_for_d();
                            -
                            3559  if (info.point_process) {
                            -
                            3560  rhs = "shadow_rhs[id]";
                            -
                            3561  d = "shadow_d[id]";
                            -
                            3562  } else {
                            -
                            3563  rhs = "rhs";
                            -
                            3564  d = "g";
                            -
                            3565  }
                            -
                            3566 
                            -
                            3567  printer->push_block("if (nt->nrn_fast_imem)");
                            -
                            3568  if (nrn_cur_reduction_loop_required()) {
                            -
                            3569  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            -
                            3570  printer->add_line("int node_id = node_index[id];");
                            +
                            3540  printer->pop_block();
                            +
                            3541 }
                            +
                            3542 
                            +
                            3543 
                            + +
                            3545  if (!nrn_cur_required()) {
                            +
                            3546  return;
                            +
                            3547  }
                            +
                            3548 
                            +
                            3549  codegen = true;
                            +
                            3550  if (info.conductances.empty()) {
                            +
                            3551  print_nrn_current(*info.breakpoint_node);
                            +
                            3552  }
                            +
                            3553 
                            +
                            3554  printer->add_newline(2);
                            +
                            3555  printer->add_line("/** update current */");
                            +
                            3556  print_global_function_common_code(BlockType::Equation);
                            +
                            3557  print_channel_iteration_block_parallel_hint(BlockType::Equation, info.breakpoint_node);
                            +
                            3558  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            +
                            3559  print_nrn_cur_kernel(*info.breakpoint_node);
                            +
                            3560  print_nrn_cur_matrix_shadow_update();
                            +
                            3561  if (!nrn_cur_reduction_loop_required()) {
                            +
                            3562  print_fast_imem_calculation();
                            +
                            3563  }
                            +
                            3564  printer->pop_block();
                            +
                            3565 
                            +
                            3566  if (nrn_cur_reduction_loop_required()) {
                            +
                            3567  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            +
                            3568  print_nrn_cur_matrix_shadow_reduction();
                            +
                            3569  printer->pop_block();
                            +
                            3570  print_fast_imem_calculation();
                            3571  }
                            -
                            3572  printer->fmt_line("nt->nrn_fast_imem->nrn_sav_rhs[node_id] {} {};", rhs_op, rhs);
                            -
                            3573  printer->fmt_line("nt->nrn_fast_imem->nrn_sav_d[node_id] {} {};", d_op, d);
                            -
                            3574  if (nrn_cur_reduction_loop_required()) {
                            -
                            3575  printer->pop_block();
                            -
                            3576  }
                            -
                            3577  printer->pop_block();
                            -
                            3578 }
                            -
                            3579 
                            -
                            3580 
                            - -
                            3582  if (!nrn_cur_required()) {
                            -
                            3583  return;
                            -
                            3584  }
                            -
                            3585 
                            -
                            3586  codegen = true;
                            -
                            3587  if (info.conductances.empty()) {
                            -
                            3588  print_nrn_current(*info.breakpoint_node);
                            -
                            3589  }
                            -
                            3590 
                            -
                            3591  printer->add_newline(2);
                            -
                            3592  printer->add_line("/** update current */");
                            -
                            3593  print_global_function_common_code(BlockType::Equation);
                            -
                            3594  print_channel_iteration_block_parallel_hint(BlockType::Equation, info.breakpoint_node);
                            -
                            3595  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            -
                            3596  print_nrn_cur_kernel(*info.breakpoint_node);
                            -
                            3597  print_nrn_cur_matrix_shadow_update();
                            -
                            3598  if (!nrn_cur_reduction_loop_required()) {
                            -
                            3599  print_fast_imem_calculation();
                            -
                            3600  }
                            -
                            3601  printer->pop_block();
                            -
                            3602 
                            -
                            3603  if (nrn_cur_reduction_loop_required()) {
                            -
                            3604  printer->push_block("for (int id = 0; id < nodecount; id++)");
                            -
                            3605  print_nrn_cur_matrix_shadow_reduction();
                            -
                            3606  printer->pop_block();
                            -
                            3607  print_fast_imem_calculation();
                            -
                            3608  }
                            -
                            3609 
                            -
                            3610  print_kernel_data_present_annotation_block_end();
                            -
                            3611  printer->pop_block();
                            -
                            3612  codegen = false;
                            -
                            3613 }
                            -
                            3614 
                            -
                            3615 
                            -
                            3616 /****************************************************************************************/
                            -
                            3617 /* Main code printing entry points */
                            -
                            3618 /****************************************************************************************/
                            -
                            3619 
                            - -
                            3621  print_standard_includes();
                            -
                            3622  print_backend_includes();
                            -
                            3623  print_coreneuron_includes();
                            -
                            3624 }
                            -
                            3625 
                            -
                            3626 
                            - -
                            3628  print_namespace_start();
                            -
                            3629  print_backend_namespace_start();
                            -
                            3630 }
                            -
                            3631 
                            -
                            3632 
                            - -
                            3634  print_backend_namespace_stop();
                            -
                            3635  print_namespace_stop();
                            -
                            3636 }
                            -
                            3637 
                            -
                            3638 
                            - -
                            3640  print_first_pointer_var_index_getter();
                            -
                            3641  print_net_receive_arg_size_getter();
                            -
                            3642  print_thread_getters();
                            -
                            3643  print_num_variable_getter();
                            -
                            3644  print_mech_type_getter();
                            -
                            3645  print_memb_list_getter();
                            -
                            3646 }
                            -
                            3647 
                            -
                            3648 
                            - -
                            3650  print_mechanism_global_var_structure(print_initializers);
                            -
                            3651  print_mechanism_range_var_structure(print_initializers);
                            -
                            3652  print_ion_var_structure();
                            -
                            3653 }
                            -
                            3654 
                            -
                            3655 
                            - -
                            3657  if (!info.vectorize) {
                            -
                            3658  return;
                            -
                            3659  }
                            -
                            3660  printer->add_multi_line(R"CODE(
                            -
                            3661  #if NRN_PRCELLSTATE
                            -
                            3662  inst->v_unused[id] = v;
                            -
                            3663  #endif
                            -
                            3664  )CODE");
                            -
                            3665 }
                            -
                            3666 
                            -
                            3667 
                            - -
                            3669  printer->add_multi_line(R"CODE(
                            -
                            3670  #if NRN_PRCELLSTATE
                            -
                            3671  inst->g_unused[id] = g;
                            -
                            3672  #endif
                            -
                            3673  )CODE");
                            -
                            3674 }
                            -
                            3675 
                            -
                            3676 
                            - -
                            3678  print_top_verbatim_blocks();
                            -
                            3679  for (const auto& procedure: info.procedures) {
                            -
                            3680  print_procedure(*procedure);
                            -
                            3681  }
                            -
                            3682  for (const auto& function: info.functions) {
                            -
                            3683  print_function(*function);
                            -
                            3684  }
                            -
                            3685  for (const auto& function: info.function_tables) {
                            -
                            3686  print_function_tables(*function);
                            -
                            3687  }
                            -
                            3688  for (size_t i = 0; i < info.before_after_blocks.size(); i++) {
                            -
                            3689  print_before_after_block(info.before_after_blocks[i], i);
                            -
                            3690  }
                            -
                            3691  for (const auto& callback: info.derivimplicit_callbacks) {
                            -
                            3692  const auto& block = *callback->get_node_to_solve();
                            -
                            3693  print_derivimplicit_kernel(block);
                            -
                            3694  }
                            -
                            3695  print_net_send_buffering();
                            -
                            3696  print_net_init();
                            -
                            3697  print_watch_activate();
                            -
                            3698  print_watch_check();
                            -
                            3699  print_net_receive_kernel();
                            -
                            3700  print_net_receive();
                            -
                            3701  print_net_receive_buffering();
                            -
                            3702  print_nrn_init();
                            -
                            3703  print_nrn_cur();
                            -
                            3704  print_nrn_state();
                            -
                            3705 }
                            -
                            3706 
                            -
                            3707 
                            - -
                            3709  codegen = true;
                            -
                            3710  print_backend_info();
                            -
                            3711  print_headers_include();
                            -
                            3712  print_namespace_begin();
                            -
                            3713  print_nmodl_constants();
                            -
                            3714  print_prcellstate_macros();
                            -
                            3715  print_mechanism_info();
                            -
                            3716  print_data_structures(true);
                            -
                            3717  print_global_variables_for_hoc();
                            -
                            3718  print_common_getters();
                            -
                            3719  print_memory_allocation_routine();
                            -
                            3720  print_abort_routine();
                            -
                            3721  print_thread_memory_callbacks();
                            -
                            3722  print_instance_variable_setup();
                            -
                            3723  print_nrn_alloc();
                            -
                            3724  print_nrn_constructor();
                            -
                            3725  print_nrn_destructor();
                            -
                            3726  print_function_prototypes();
                            -
                            3727  print_functors_definitions();
                            -
                            3728  print_compute_functions();
                            -
                            3729  print_check_table_thread_function();
                            -
                            3730  print_mechanism_register();
                            -
                            3731  print_namespace_end();
                            -
                            3732  codegen = false;
                            -
                            3733 }
                            -
                            3734 
                            -
                            3735 
                            -
                            3736 /****************************************************************************************/
                            -
                            3737 /* Overloaded visitor routines */
                            -
                            3738 /****************************************************************************************/
                            -
                            3739 
                            -
                            3740 
                            - -
                            3742  if (!codegen) {
                            -
                            3743  return;
                            -
                            3744  }
                            -
                            3745  printer->fmt_line("{}_{}({});",
                            -
                            3746  node.get_node_to_solve()->get_node_name(),
                            -
                            3747  info.mod_suffix,
                            -
                            3748  external_method_arguments());
                            -
                            3749 }
                            -
                            3750 
                            -
                            3751 
                            - -
                            3753  const ast::EigenNewtonSolverBlock& node) {
                            -
                            3754  // solution vector to store copy of state vars for Newton solver
                            -
                            3755  printer->add_newline();
                            -
                            3756 
                            -
                            3757  auto float_type = default_float_data_type();
                            -
                            3758  int N = node.get_n_state_vars()->get_value();
                            -
                            3759  printer->fmt_line("Eigen::Matrix<{}, {}, 1> nmodl_eigen_xm;", float_type, N);
                            -
                            3760  printer->fmt_line("{}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                            -
                            3761 
                            -
                            3762  print_statement_block(*node.get_setup_x_block(), false, false);
                            +
                            3572 
                            +
                            3573  print_kernel_data_present_annotation_block_end();
                            +
                            3574  printer->pop_block();
                            +
                            3575  codegen = false;
                            +
                            3576 }
                            +
                            3577 
                            +
                            3578 
                            +
                            3579 /****************************************************************************************/
                            +
                            3580 /* Main code printing entry points */
                            +
                            3581 /****************************************************************************************/
                            +
                            3582 
                            + +
                            3584  print_standard_includes();
                            +
                            3585  print_backend_includes();
                            +
                            3586  print_coreneuron_includes();
                            +
                            3587 }
                            +
                            3588 
                            +
                            3589 
                            + +
                            3591  print_namespace_start();
                            +
                            3592  print_backend_namespace_start();
                            +
                            3593 }
                            +
                            3594 
                            +
                            3595 
                            + +
                            3597  print_backend_namespace_stop();
                            +
                            3598  print_namespace_stop();
                            +
                            3599 }
                            +
                            3600 
                            +
                            3601 
                            + +
                            3603  print_first_pointer_var_index_getter();
                            +
                            3604  print_net_receive_arg_size_getter();
                            +
                            3605  print_thread_getters();
                            +
                            3606  print_num_variable_getter();
                            +
                            3607  print_mech_type_getter();
                            +
                            3608  print_memb_list_getter();
                            +
                            3609 }
                            +
                            3610 
                            +
                            3611 
                            + +
                            3613  print_mechanism_global_var_structure(print_initializers);
                            +
                            3614  print_mechanism_range_var_structure(print_initializers);
                            +
                            3615  print_ion_var_structure();
                            +
                            3616 }
                            +
                            3617 
                            +
                            3618 
                            + +
                            3620  if (!info.vectorize) {
                            +
                            3621  return;
                            +
                            3622  }
                            +
                            3623  printer->add_multi_line(R"CODE(
                            +
                            3624  #if NRN_PRCELLSTATE
                            +
                            3625  inst->v_unused[id] = v;
                            +
                            3626  #endif
                            +
                            3627  )CODE");
                            +
                            3628 }
                            +
                            3629 
                            +
                            3630 
                            + +
                            3632  printer->add_multi_line(R"CODE(
                            +
                            3633  #if NRN_PRCELLSTATE
                            +
                            3634  inst->g_unused[id] = g;
                            +
                            3635  #endif
                            +
                            3636  )CODE");
                            +
                            3637 }
                            +
                            3638 
                            +
                            3639 
                            + +
                            3641  print_top_verbatim_blocks();
                            +
                            3642  for (const auto& procedure: info.procedures) {
                            +
                            3643  print_procedure(*procedure);
                            +
                            3644  }
                            +
                            3645  for (const auto& function: info.functions) {
                            +
                            3646  print_function(*function);
                            +
                            3647  }
                            +
                            3648  for (const auto& function: info.function_tables) {
                            +
                            3649  print_function_tables(*function);
                            +
                            3650  }
                            +
                            3651  for (size_t i = 0; i < info.before_after_blocks.size(); i++) {
                            +
                            3652  print_before_after_block(info.before_after_blocks[i], i);
                            +
                            3653  }
                            +
                            3654  for (const auto& callback: info.derivimplicit_callbacks) {
                            +
                            3655  const auto& block = *callback->get_node_to_solve();
                            +
                            3656  print_derivimplicit_kernel(block);
                            +
                            3657  }
                            +
                            3658  print_net_send_buffering();
                            +
                            3659  print_net_init();
                            +
                            3660  print_watch_activate();
                            +
                            3661  print_watch_check();
                            +
                            3662  print_net_receive_kernel();
                            +
                            3663  print_net_receive();
                            +
                            3664  print_net_receive_buffering();
                            +
                            3665  print_nrn_init();
                            +
                            3666  print_nrn_cur();
                            +
                            3667  print_nrn_state();
                            +
                            3668 }
                            +
                            3669 
                            +
                            3670 
                            + +
                            3672  codegen = true;
                            +
                            3673  print_backend_info();
                            +
                            3674  print_headers_include();
                            +
                            3675  print_namespace_begin();
                            +
                            3676  print_nmodl_constants();
                            +
                            3677  print_prcellstate_macros();
                            +
                            3678  print_mechanism_info();
                            +
                            3679  print_data_structures(true);
                            +
                            3680  print_global_variables_for_hoc();
                            +
                            3681  print_common_getters();
                            +
                            3682  print_memory_allocation_routine();
                            +
                            3683  print_abort_routine();
                            +
                            3684  print_thread_memory_callbacks();
                            +
                            3685  print_instance_variable_setup();
                            +
                            3686  print_nrn_alloc();
                            +
                            3687  print_nrn_constructor();
                            +
                            3688  print_nrn_destructor();
                            +
                            3689  print_function_prototypes();
                            +
                            3690  print_functors_definitions();
                            +
                            3691  print_compute_functions();
                            +
                            3692  print_check_table_thread_function();
                            +
                            3693  print_mechanism_register();
                            +
                            3694  print_namespace_end();
                            +
                            3695  codegen = false;
                            +
                            3696 }
                            +
                            3697 
                            +
                            3698 
                            +
                            3699 /****************************************************************************************/
                            +
                            3700 /* Overloaded visitor routines */
                            +
                            3701 /****************************************************************************************/
                            +
                            3702 
                            +
                            3703 
                            + +
                            3705  if (!codegen) {
                            +
                            3706  return;
                            +
                            3707  }
                            +
                            3708  printer->fmt_line("{}_{}({});",
                            +
                            3709  node.get_node_to_solve()->get_node_name(),
                            +
                            3710  info.mod_suffix,
                            +
                            3711  external_method_arguments());
                            +
                            3712 }
                            +
                            3713 
                            +
                            3714 
                            + +
                            3716  const ast::EigenNewtonSolverBlock& node) {
                            +
                            3717  // solution vector to store copy of state vars for Newton solver
                            +
                            3718  printer->add_newline();
                            +
                            3719 
                            +
                            3720  auto float_type = default_float_data_type();
                            +
                            3721  int N = node.get_n_state_vars()->get_value();
                            +
                            3722  printer->fmt_line("Eigen::Matrix<{}, {}, 1> nmodl_eigen_xm;", float_type, N);
                            +
                            3723  printer->fmt_line("{}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                            +
                            3724 
                            +
                            3725  print_statement_block(*node.get_setup_x_block(), false, false);
                            +
                            3726 
                            +
                            3727  // call newton solver with functor and X matrix that contains state vars
                            +
                            3728  printer->add_line("// call newton solver");
                            +
                            3729  printer->fmt_line("{} newton_functor(nt, inst, id, pnodecount, v, indexes, data, thread);",
                            +
                            3730  info.functor_names[&node]);
                            +
                            3731  printer->add_line("newton_functor.initialize();");
                            +
                            3732  printer->add_line(
                            +
                            3733  "int newton_iterations = nmodl::newton::newton_solver(nmodl_eigen_xm, newton_functor);");
                            +
                            3734  printer->add_line(
                            +
                            3735  "if (newton_iterations < 0) assert(false && \"Newton solver did not converge!\");");
                            +
                            3736 
                            +
                            3737  // assign newton solver results in matrix X to state vars
                            +
                            3738  print_statement_block(*node.get_update_states_block(), false, false);
                            +
                            3739  printer->add_line("newton_functor.finalize();");
                            +
                            3740 }
                            +
                            3741 
                            +
                            3742 
                            + +
                            3744  const ast::EigenLinearSolverBlock& node) {
                            +
                            3745  printer->add_newline();
                            +
                            3746 
                            +
                            3747  const std::string float_type = default_float_data_type();
                            +
                            3748  int N = node.get_n_state_vars()->get_value();
                            +
                            3749  printer->fmt_line("Eigen::Matrix<{0}, {1}, 1> nmodl_eigen_xm, nmodl_eigen_fm;", float_type, N);
                            +
                            3750  printer->fmt_line("Eigen::Matrix<{0}, {1}, {1}> nmodl_eigen_jm;", float_type, N);
                            +
                            3751  if (N <= 4)
                            +
                            3752  printer->fmt_line("Eigen::Matrix<{0}, {1}, {1}> nmodl_eigen_jm_inv;", float_type, N);
                            +
                            3753  printer->fmt_line("{}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                            +
                            3754  printer->fmt_line("{}* nmodl_eigen_j = nmodl_eigen_jm.data();", float_type);
                            +
                            3755  printer->fmt_line("{}* nmodl_eigen_f = nmodl_eigen_fm.data();", float_type);
                            +
                            3756  print_statement_block(*node.get_variable_block(), false, false);
                            +
                            3757  print_statement_block(*node.get_initialize_block(), false, false);
                            +
                            3758  print_statement_block(*node.get_setup_x_block(), false, false);
                            +
                            3759 
                            +
                            3760  printer->add_newline();
                            +
                            3761  print_eigen_linear_solver(float_type, N);
                            +
                            3762  printer->add_newline();
                            3763 
                            -
                            3764  // call newton solver with functor and X matrix that contains state vars
                            -
                            3765  printer->add_line("// call newton solver");
                            -
                            3766  printer->fmt_line("{} newton_functor(nt, inst, id, pnodecount, v, indexes, data, thread);",
                            -
                            3767  info.functor_names[&node]);
                            -
                            3768  printer->add_line("newton_functor.initialize();");
                            -
                            3769  printer->add_line(
                            -
                            3770  "int newton_iterations = nmodl::newton::newton_solver(nmodl_eigen_xm, newton_functor);");
                            -
                            3771  printer->add_line(
                            -
                            3772  "if (newton_iterations < 0) assert(false && \"Newton solver did not converge!\");");
                            -
                            3773 
                            -
                            3774  // assign newton solver results in matrix X to state vars
                            -
                            3775  print_statement_block(*node.get_update_states_block(), false, false);
                            -
                            3776  printer->add_line("newton_functor.finalize();");
                            -
                            3777 }
                            -
                            3778 
                            -
                            3779 
                            - -
                            3781  const ast::EigenLinearSolverBlock& node) {
                            -
                            3782  printer->add_newline();
                            -
                            3783 
                            -
                            3784  const std::string float_type = default_float_data_type();
                            -
                            3785  int N = node.get_n_state_vars()->get_value();
                            -
                            3786  printer->fmt_line("Eigen::Matrix<{0}, {1}, 1> nmodl_eigen_xm, nmodl_eigen_fm;", float_type, N);
                            -
                            3787  printer->fmt_line("Eigen::Matrix<{0}, {1}, {1}> nmodl_eigen_jm;", float_type, N);
                            -
                            3788  if (N <= 4)
                            -
                            3789  printer->fmt_line("Eigen::Matrix<{0}, {1}, {1}> nmodl_eigen_jm_inv;", float_type, N);
                            -
                            3790  printer->fmt_line("{}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                            -
                            3791  printer->fmt_line("{}* nmodl_eigen_j = nmodl_eigen_jm.data();", float_type);
                            -
                            3792  printer->fmt_line("{}* nmodl_eigen_f = nmodl_eigen_fm.data();", float_type);
                            -
                            3793  print_statement_block(*node.get_variable_block(), false, false);
                            -
                            3794  print_statement_block(*node.get_initialize_block(), false, false);
                            -
                            3795  print_statement_block(*node.get_setup_x_block(), false, false);
                            -
                            3796 
                            -
                            3797  printer->add_newline();
                            -
                            3798  print_eigen_linear_solver(float_type, N);
                            -
                            3799  printer->add_newline();
                            -
                            3800 
                            -
                            3801  print_statement_block(*node.get_update_states_block(), false, false);
                            -
                            3802  print_statement_block(*node.get_finalize_block(), false, false);
                            -
                            3803 }
                            -
                            3804 
                            +
                            3764  print_statement_block(*node.get_update_states_block(), false, false);
                            +
                            3765  print_statement_block(*node.get_finalize_block(), false, false);
                            +
                            3766 }
                            +
                            3767 
                            +
                            3768 
                            + +
                            3770  // For_netcon should take the same arguments as net_receive and apply the operations
                            +
                            3771  // in the block to the weights of the netcons. Since all the weights are on the same vector,
                            +
                            3772  // weights, we have a mask of operations that we apply iteratively, advancing the offset
                            +
                            3773  // to the next netcon.
                            +
                            3774  const auto& args = node.get_parameters();
                            +
                            3775  RenameVisitor v;
                            +
                            3776  const auto& statement_block = node.get_statement_block();
                            +
                            3777  for (size_t i_arg = 0; i_arg < args.size(); ++i_arg) {
                            +
                            3778  // sanitize node_name since we want to substitute names like (*w) as they are
                            +
                            3779  auto old_name =
                            +
                            3780  std::regex_replace(args[i_arg]->get_node_name(), regex_special_chars, R"(\$&)");
                            +
                            3781  const auto& new_name = fmt::format("weights[{} + nt->_fornetcon_weight_perm[i]]", i_arg);
                            +
                            3782  v.set(old_name, new_name);
                            +
                            3783  statement_block->accept(v);
                            +
                            3784  }
                            +
                            3785 
                            +
                            3786  const auto index =
                            +
                            3787  std::find_if(info.semantics.begin(), info.semantics.end(), [](const IndexSemantics& a) {
                            +
                            3788  return a.name == naming::FOR_NETCON_SEMANTIC;
                            +
                            3789  })->index;
                            +
                            3790 
                            +
                            3791  printer->fmt_text("const size_t offset = {}*pnodecount + id;", index);
                            +
                            3792  printer->add_newline();
                            +
                            3793  printer->add_line(
                            +
                            3794  "const size_t for_netcon_start = nt->_fornetcon_perm_indices[indexes[offset]];");
                            +
                            3795  printer->add_line(
                            +
                            3796  "const size_t for_netcon_end = nt->_fornetcon_perm_indices[indexes[offset] + 1];");
                            +
                            3797 
                            +
                            3798  printer->add_line("for (auto i = for_netcon_start; i < for_netcon_end; ++i) {");
                            +
                            3799  printer->increase_indent();
                            +
                            3800  print_statement_block(*statement_block, false, false);
                            +
                            3801  printer->decrease_indent();
                            +
                            3802 
                            +
                            3803  printer->add_line("}");
                            +
                            3804 }
                            3805 
                            - -
                            3807  // For_netcon should take the same arguments as net_receive and apply the operations
                            -
                            3808  // in the block to the weights of the netcons. Since all the weights are on the same vector,
                            -
                            3809  // weights, we have a mask of operations that we apply iteratively, advancing the offset
                            -
                            3810  // to the next netcon.
                            -
                            3811  const auto& args = node.get_parameters();
                            -
                            3812  RenameVisitor v;
                            -
                            3813  const auto& statement_block = node.get_statement_block();
                            -
                            3814  for (size_t i_arg = 0; i_arg < args.size(); ++i_arg) {
                            -
                            3815  // sanitize node_name since we want to substitute names like (*w) as they are
                            -
                            3816  auto old_name =
                            -
                            3817  std::regex_replace(args[i_arg]->get_node_name(), regex_special_chars, R"(\$&)");
                            -
                            3818  const auto& new_name = fmt::format("weights[{} + nt->_fornetcon_weight_perm[i]]", i_arg);
                            -
                            3819  v.set(old_name, new_name);
                            -
                            3820  statement_block->accept(v);
                            -
                            3821  }
                            +
                            3806 
                            + +
                            3808  auto block = node.get_node_to_solve().get();
                            +
                            3809  if (block->is_statement_block()) {
                            +
                            3810  auto statement_block = dynamic_cast<ast::StatementBlock*>(block);
                            +
                            3811  print_statement_block(*statement_block, false, false);
                            +
                            3812  } else {
                            +
                            3813  block->accept(*this);
                            +
                            3814  }
                            +
                            3815 }
                            +
                            3816 
                            +
                            3817 
                            + +
                            3819  printer->add_text(fmt::format("nrn_watch_activate(inst, id, pnodecount, {}, v, watch_remove)",
                            +
                            3820  current_watch_statement++));
                            +
                            3821 }
                            3822 
                            -
                            3823  const auto index =
                            -
                            3824  std::find_if(info.semantics.begin(), info.semantics.end(), [](const IndexSemantics& a) {
                            -
                            3825  return a.name == naming::FOR_NETCON_SEMANTIC;
                            -
                            3826  })->index;
                            -
                            3827 
                            -
                            3828  printer->fmt_text("const size_t offset = {}*pnodecount + id;", index);
                            -
                            3829  printer->add_newline();
                            -
                            3830  printer->add_line(
                            -
                            3831  "const size_t for_netcon_start = nt->_fornetcon_perm_indices[indexes[offset]];");
                            -
                            3832  printer->add_line(
                            -
                            3833  "const size_t for_netcon_end = nt->_fornetcon_perm_indices[indexes[offset] + 1];");
                            -
                            3834 
                            -
                            3835  printer->add_line("for (auto i = for_netcon_start; i < for_netcon_end; ++i) {");
                            -
                            3836  printer->increase_indent();
                            -
                            3837  print_statement_block(*statement_block, false, false);
                            -
                            3838  printer->decrease_indent();
                            -
                            3839 
                            -
                            3840  printer->add_line("}");
                            -
                            3841 }
                            -
                            3842 
                            -
                            3843 
                            - -
                            3845  auto block = node.get_node_to_solve().get();
                            -
                            3846  if (block->is_statement_block()) {
                            -
                            3847  auto statement_block = dynamic_cast<ast::StatementBlock*>(block);
                            -
                            3848  print_statement_block(*statement_block, false, false);
                            -
                            3849  } else {
                            -
                            3850  block->accept(*this);
                            -
                            3851  }
                            -
                            3852 }
                            -
                            3853 
                            -
                            3854 
                            - -
                            3856  printer->add_text(fmt::format("nrn_watch_activate(inst, id, pnodecount, {}, v, watch_remove)",
                            -
                            3857  current_watch_statement++));
                            -
                            3858 }
                            -
                            3859 
                            -
                            3860 } // namespace codegen
                            -
                            3861 } // namespace nmodl
                            +
                            3823 } // namespace codegen
                            +
                            3824 } // namespace nmodl
                            -
                            std::string get_node_name() const override
                            Return name of the node.
                            Definition: ast.cpp:6971
                            -
                            static const TableStatement * get_table_statement(const ast::Block &node)
                            -
                            virtual void print_procedure(const ast::ProcedureBlock &node) override
                            Print NMODL procedure in target backend code.
                            +
                            static const TableStatement * get_table_statement(const ast::Block &node)
                            +
                            virtual void print_procedure(const ast::ProcedureBlock &node) override
                            Print NMODL procedure in target backend code.
                            virtual void print_device_method_annotation()
                            Print the backend specific device method annotation.
                            Represents a BEFORE block in NMODL.
                            -
                            void print_coreneuron_includes()
                            Print includes from coreneuron.
                            -
                            virtual std::string net_receive_buffering_declaration()
                            Generate the target backend code for the net_receive_buffering function delcaration.
                            +
                            void print_coreneuron_includes()
                            Print includes from coreneuron.
                            +
                            virtual std::string net_receive_buffering_declaration()
                            Generate the target backend code for the net_receive_buffering function delcaration.
                            std::shared_ptr< Block > get_node_to_solve() const noexcept
                            Getter for member variable DerivimplicitCallback::node_to_solve.
                            virtual bool nrn_cur_reduction_loop_required()
                            Check if reduction block in nrn_cur required.
                            virtual void print_backend_namespace_start()
                            Prints the start of namespace for the backend-specific code.
                            -
                            virtual void visit_solution_expression(const ast::SolutionExpression &node) override
                            visit node of type ast::SolutionExpression
                            +
                            void print_net_move_call(const ast::FunctionCall &node) override
                            Print call to net_move.
                            +
                            virtual void visit_solution_expression(const ast::SolutionExpression &node) override
                            visit node of type ast::SolutionExpression
                            Base class for all AST node.
                            Definition: node.hpp:40
                            -
                            void print_mechanism_range_var_structure(bool print_initializers) override
                            Print the structure that wraps all range and int variables required for the NMODL.
                            +
                            void print_mechanism_range_var_structure(bool print_initializers) override
                            Print the structure that wraps all range and int variables required for the NMODL.
                            bool is_index
                            if this is pure index (e.g.
                            static constexpr char CELSIUS_VARIABLE[]
                            global temperature variable
                            virtual void print_net_send_buf_count_update_to_host() const
                            Print the code to update NetSendBuffer_t count from device to host.
                            -
                            void print_function_prototypes() override
                            Print function and procedures prototype declaration.
                            -
                            void print_functors_definitions()
                            Go through the map of EigenNewtonSolverBlock s and their corresponding functor names and print the fu...
                            -
                            void print_namespace_stop() override
                            Prints the end of the coreneuron namespace.
                            +
                            void print_function_prototypes() override
                            Print function and procedures prototype declaration.
                            +
                            void print_functors_definitions()
                            Go through the map of EigenNewtonSolverBlock s and their corresponding functor names and print the fu...
                            +
                            void print_namespace_stop() override
                            Prints the end of the coreneuron namespace.
                            Helper to represent information about index/int variables.
                            -
                            void print_v_unused() const override
                            Set v_unused (voltage) for NRN_PRCELLSTATE feature.
                            +
                            void print_v_unused() const override
                            Set v_unused (voltage) for NRN_PRCELLSTATE feature.
                            DUState
                            Represent a state in Def-Use chain.
                            -
                            virtual void print_ion_variable()
                            Print the ion variable struct.
                            -
                            void print_derivimplicit_kernel(const ast::Block &block)
                            Print derivative kernel when derivimplicit method is used.
                            +
                            virtual void print_ion_variable()
                            Print the ion variable struct.
                            +
                            void print_derivimplicit_kernel(const ast::Block &block)
                            Print derivative kernel when derivimplicit method is used.
                            virtual void print_device_stream_wait() const
                            Print the code to synchronise/wait on stream specific to NrnThread.
                            -
                            static std::pair< std::string, std::string > read_ion_variable_name(const std::string &name)
                            Return ion variable name and corresponding ion read variable name.
                            +
                            static std::pair< std::string, std::string > read_ion_variable_name(const std::string &name)
                            Return ion variable name and corresponding ion read variable name.
                            @ Destructor
                            destructor block
                            @ MUTEX_UNLOCK
                            type of ast::MutexUnlock
                            const std::map< std::string, std::string > VERBATIM_VARIABLES_MAPPING
                            commonly used variables in verbatim block and how they should be mapped to new code generation backen...
                            virtual void print_net_send_buf_count_update_to_device() const
                            Print the code to update NetSendBuffer_t count from host to device.
                            BAType
                            enum type to distinguish BEFORE or AFTER blocks
                            Definition: ast_common.hpp:80
                            -
                            void print_functor_definition(const ast::EigenNewtonSolverBlock &node)
                            Based on the EigenNewtonSolverBlock passed print the definition needed for its functor.
                            -
                            std::string global_variable_name(const SymbolType &symbol, bool use_instance=true) const override
                            Determine the variable name for a global variable given its symbol.
                            +
                            void print_functor_definition(const ast::EigenNewtonSolverBlock &node)
                            Based on the EigenNewtonSolverBlock passed print the definition needed for its functor.
                            +
                            std::string global_variable_name(const SymbolType &symbol, bool use_instance=true) const override
                            Determine the variable name for a global variable given its symbol.
                            -
                            void visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) override
                            visit node of type ast::EigenLinearSolverBlock
                            -
                            virtual void print_newtonspace_transfer_to_device() const
                            Print code block to transfer newtonspace structure to device.
                            +
                            void visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) override
                            visit node of type ast::EigenLinearSolverBlock
                            +
                            virtual void print_newtonspace_transfer_to_device() const
                            Print code block to transfer newtonspace structure to device.
                            constexpr char NRN_PRIVATE_DESTRUCTOR_METHOD[]
                            nrn_private_destructor method in generated code
                            -
                            void print_namespace_end() override
                            Print end of namespaces.
                            -
                            virtual void print_net_receive_loop_begin()
                            Print the code for the main net_receive loop.
                            +
                            void print_namespace_end() override
                            Print end of namespaces.
                            +
                            void print_net_send_call(const ast::FunctionCall &node) override
                            Print call to net_send.
                            +
                            virtual void print_net_receive_loop_begin()
                            Print the code for the main net_receive loop.
                            const ArgumentVector & get_parameters() const noexcept override
                            Getter for member variable FunctionTableBlock::parameters.
                            static constexpr char NTHREAD_D_SHADOW[]
                            shadow d variable in neuron thread structure
                            std::shared_ptr< symtab::Symbol > SymbolType
                            virtual void print_kernel_data_present_annotation_block_begin()
                            Print accelerator annotations indicating data presence on device.
                            -
                            void print_backend_info() override
                            Print top file header printed in generated code.
                            -
                            void print_g_unused() const override
                            Set g_unused (conductance) for NRN_PRCELLSTATE feature.
                            +
                            void print_backend_info() override
                            Print top file header printed in generated code.
                            +
                            void print_g_unused() const override
                            Set g_unused (conductance) for NRN_PRCELLSTATE feature.
                            const ArgumentVector & get_parameters() const noexcept override
                            Getter for member variable NetReceiveBlock::parameters.
                            @ MUTEX_LOCK
                            type of ast::MutexLock
                            -
                            std::string update_if_ion_variable_name(const std::string &name) const
                            Determine the updated name if the ion variable has been optimized.
                            - -
                            std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const override
                            Determine the name of an int variable given its symbol.
                            -
                            std::tuple< bool, int > check_if_var_is_array(const std::string &name)
                            Check if the given name exist in the symbol.
                            -
                            void print_initial_block(const ast::InitialBlock *node)
                            Print initial block statements.
                            +
                            std::string update_if_ion_variable_name(const std::string &name) const
                            Determine the updated name if the ion variable has been optimized.
                            + +
                            std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const override
                            Determine the name of an int variable given its symbol.
                            +
                            std::tuple< bool, int > check_if_var_is_array(const std::string &name)
                            Check if the given name exist in the symbol.
                            +
                            void print_initial_block(const ast::InitialBlock *node)
                            Print initial block statements.
                            std::shared_ptr< StatementBlock > get_initialize_block() const noexcept
                            Getter for member variable EigenNewtonSolverBlock::initialize_block.
                            -
                            void print_net_receive_kernel()
                            Print net_receive kernel function definition.
                            +
                            void print_net_receive_kernel()
                            Print net_receive kernel function definition.
                            -
                            void print_thread_getters()
                            Print the getter method for thread variables and ids.
                            +
                            void print_thread_getters()
                            Print the getter method for thread variables and ids.
                            std::string simulator_name() override
                            Name of the simulator the code was generated for.
                            -
                            void print_net_send_buffering()
                            Print kernel for buffering net_send events.
                            -
                            static std::string get_register_type_for_ba_block(const ast::Block *block)
                            Return registration type for a given BEFORE/AFTER block /param block A BEFORE/AFTER block being regis...
                            +
                            void print_net_send_buffering()
                            Print kernel for buffering net_send events.
                            +
                            static std::string get_register_type_for_ba_block(const ast::Block *block)
                            Return registration type for a given BEFORE/AFTER block /param block A BEFORE/AFTER block being regis...
                            encapsulates code generation backend implementations
                            Definition: ast_common.hpp:26
                            std::shared_ptr< StatementBlock > get_statement_block() const noexcept override
                            Getter for member variable InitialBlock::statement_block.
                            @ index
                            index / int variables
                            void visit_statement_block(ast::StatementBlock &node) override
                            visit node of type ast::StatementBlock
                            -
                            virtual void print_fast_imem_calculation() override
                            Print fast membrane current calculation code.
                            +
                            virtual void print_fast_imem_calculation() override
                            Print fast membrane current calculation code.
                            virtual void print_dt_update_to_device() const
                            Print the code to update dt from host to device.
                            virtual void print_net_init_acc_serial_annotation_block_end()
                            Print accelerator kernels end annotation for net_init kernel.
                            std::shared_ptr< StatementBlock > get_setup_x_block() const noexcept
                            Getter for member variable EigenLinearSolverBlock::setup_x_block.
                            static constexpr char NRN_CONSTRUCTOR_METHOD[]
                            nrn_constructor method in generated code
                            -
                            void print_net_init()
                            Print initial block in the net receive block.
                            -
                            void print_nrn_destructor() override
                            Print nrn_destructor function definition.
                            -
                            void print_sdlists_init(bool print_initializers) override
                            +
                            void print_net_init()
                            Print initial block in the net receive block.
                            +
                            void print_net_event_call(const ast::FunctionCall &node) override
                            Print call to net_event.
                            +
                            void print_nrn_destructor() override
                            Print nrn_destructor function definition.
                            +
                            void print_sdlists_init(bool print_initializers) override
                            std::shared_ptr< StatementBlock > get_variable_block() const noexcept
                            Getter for member variable EigenLinearSolverBlock::variable_block.
                            std::vector< std::string > ion_read_statements(BlockType type) const
                            For a given output block type, return statements for all read ion variables.
                            - -
                            void print_send_event_move()
                            Print send event move block used in net receive as well as watch.
                            + +
                            void print_send_event_move()
                            Print send event move block used in net receive as well as watch.
                            StatementVector::const_iterator insert_statement(StatementVector::const_iterator position, const std::shared_ptr< Statement > &n)
                            Insert member to statements.
                            Definition: ast.cpp:3040
                            -
                            void print_table_replacement_function(const ast::Block &node)
                            Print replacement function for function or procedure using table.
                            +
                            void print_table_replacement_function(const ast::Block &node)
                            Print replacement function for function or procedure using table.
                            static constexpr char NTHREAD_DT_VARIABLE[]
                            dt variable in neuron thread structure
                            virtual bool is_procedure_block() const noexcept
                            Check if the ast node is an instance of ast::ProcedureBlock.
                            Definition: ast.cpp:142
                            Map different tokens from lexer to token types.
                            Represents TABLE statement in NMODL.
                            -
                            std::string conc_write_statement(const std::string &ion_name, const std::string &concentration, int index)
                            Generate Function call statement for nrn_wrote_conc.
                            +
                            std::string conc_write_statement(const std::string &ion_name, const std::string &concentration, int index)
                            Generate Function call statement for nrn_wrote_conc.
                            virtual void print_atomic_reduction_pragma() override
                            Print atomic update pragma for reduction statements.
                            Check if variable is used in given block.
                            Implement string manipulation functions.
                            -
                            void print_global_variables_for_hoc() override
                            Print byte arrays that register scalar and vector variables for hoc interface.
                            +
                            void print_global_variables_for_hoc() override
                            Print byte arrays that register scalar and vector variables for hoc interface.
                            static constexpr char NODE_AREA_VARIABLE[]
                            inbuilt neuron variable for area of the compartment
                            -
                            void print_function_or_procedure(const ast::Block &node, const std::string &name) override
                            Print nmodl function or procedure (common code)
                            -
                            void print_net_receive_common_code(const ast::Block &node, bool need_mech_inst=true)
                            Print the common code section for net receive related methods.
                            -
                            void print_nrn_current(const ast::BreakpointBlock &node) override
                            Print the nrn_current kernel.
                            +
                            void print_function_or_procedure(const ast::Block &node, const std::string &name) override
                            Print nmodl function or procedure (common code)
                            +
                            void print_net_receive_common_code(const ast::Block &node, bool need_mech_inst=true)
                            Print the common code section for net receive related methods.
                            +
                            void print_nrn_current(const ast::BreakpointBlock &node) override
                            Print the nrn_current kernel.
                            Concrete visitor for constructing symbol table from AST.
                            virtual bool is_function_block() const noexcept
                            Check if the ast node is an instance of ast::FunctionBlock.
                            Definition: ast.cpp:140
                            std::shared_ptr< Integer > get_n_state_vars() const noexcept
                            Getter for member variable EigenNewtonSolverBlock::n_state_vars.
                            @@ -4059,33 +4024,32 @@
                            static const std::string GIT_REVISION
                            git revision id
                            Definition: config.h:33
                            bool is_integer
                            if this is an integer (e.g.
                            -
                            void print_first_pointer_var_index_getter()
                            Print the getter method for index position of first pointer variable.
                            -
                            void print_setup_range_variable()
                            Print the function that initialize range variable with different data type.
                            -
                            std::string internal_method_arguments() override
                            Arguments for functions that are defined and used internally.
                            +
                            void print_first_pointer_var_index_getter()
                            Print the getter method for index position of first pointer variable.
                            +
                            void print_setup_range_variable()
                            Print the function that initialize range variable with different data type.
                            +
                            std::string internal_method_arguments() override
                            Arguments for functions that are defined and used internally.
                            Class that binds all pieces together for parsing C verbatim blocks.
                            Definition: c11_driver.hpp:37
                            Visitor to return Def-Use chain for a given variable in the block/node
                            std::shared_ptr< StatementBlock > get_statement_block() const noexcept override
                            Getter for member variable BreakpointBlock::statement_block.
                            -
                            void print_net_move_call(const ast::FunctionCall &node)
                            Print call to net_move.
                            -
                            std::string nrn_thread_arguments() const override
                            Arguments for "_threadargs_" macro in neuron implementation.
                            +
                            std::string nrn_thread_arguments() const override
                            Arguments for "_threadargs_" macro in neuron implementation.
                            Represent newton solver solution block based on Eigen.
                            -
                            void print_net_receive_arg_size_getter()
                            Print the getter method for getting number of arguments for net_receive.
                            +
                            void print_net_receive_arg_size_getter()
                            Print the getter method for getting number of arguments for net_receive.
                            Helper visitor to gather AST information to help code generation.
                            std::shared_ptr< StatementBlock > get_initialize_block() const noexcept
                            Getter for member variable EigenLinearSolverBlock::initialize_block.
                            DUChain analyze(const ast::Ast &node, const std::string &name)
                            compute def-use chain for a variable within the node
                            std::string get_node_name() const override
                            Return name of the node.
                            Definition: ast.cpp:3710
                            std::shared_ptr< StatementBlock > get_update_states_block() const noexcept
                            Getter for member variable EigenLinearSolverBlock::update_states_block.
                            -
                            bool is_functor_const(const ast::StatementBlock &variable_block, const ast::StatementBlock &functor_block)
                            Checks whether the functor_block generated by sympy solver modifies any variable outside its scope.
                            +
                            bool is_functor_const(const ast::StatementBlock &variable_block, const ast::StatementBlock &functor_block)
                            Checks whether the functor_block generated by sympy solver modifies any variable outside its scope.
                            const StatementVector & get_statements() const noexcept
                            Getter for member variable StatementBlock::statements.
                            Check if variable is used in given block.
                            Base class for all block scoped nodes.
                            Definition: block.hpp:41
                            Represents a INITIAL block in the NMODL.
                            virtual void print_nrn_cur_matrix_shadow_update()
                            Print the update to matrix elements with/without shadow vectors.
                            -
                            std::string register_mechanism_arguments() const override
                            Arguments for register_mech or point_register_mech function.
                            +
                            std::string register_mechanism_arguments() const override
                            Arguments for register_mech or point_register_mech function.
                            virtual void print_net_init_acc_serial_annotation_block_begin()
                            Print accelerator kernels begin annotation for net_init kernel.
                            std::shared_ptr< StatementBlock > get_setup_x_block() const noexcept
                            Getter for member variable EigenNewtonSolverBlock::setup_x_block.
                            virtual void print_deriv_advance_flag_transfer_to_device() const
                            Print the code to copy derivative advance flag to device.
                            -
                            std::string process_shadow_update_statement(const ShadowUseStatement &statement, BlockType type)
                            Process shadow update statement.
                            +
                            std::string process_shadow_update_statement(const ShadowUseStatement &statement, BlockType type)
                            Process shadow update statement.
                            static std::string trim(std::string text)
                            static constexpr char NTHREAD_RHS_SHADOW[]
                            shadow rhs variable in neuron thread structure
                            Utility functions for visitors implementation.
                            @@ -4093,47 +4057,47 @@
                            static constexpr char USE_TABLE_VARIABLE[]
                            global variable to indicate if table is used
                            Represent WATCH statement in NMODL.
                            std::shared_ptr< StatementBlock > get_finalize_block() const noexcept
                            Getter for member variable EigenLinearSolverBlock::finalize_block.
                            -
                            virtual void print_eigen_linear_solver(const std::string &float_type, int N)
                            -
                            virtual void print_before_after_block(const ast::Block *node, size_t block_id)
                            Print NMODL before / after block in target backend code.
                            +
                            virtual void print_eigen_linear_solver(const std::string &float_type, int N)
                            +
                            virtual void print_before_after_block(const ast::Block *node, size_t block_id)
                            Print NMODL before / after block in target backend code.
                            Represents a BREAKPOINT block in NMODL.
                            nmodl::parser::UnitDriver driver
                            Definition: parser.cpp:28
                            -
                            const std::regex regex_special_chars
                            +
                            const std::regex regex_special_chars
                            -
                            static std::pair< std::string, std::string > write_ion_variable_name(const std::string &name)
                            Return ion variable name and corresponding ion write variable name.
                            +
                            static std::pair< std::string, std::string > write_ion_variable_name(const std::string &name)
                            Return ion variable name and corresponding ion write variable name.
                            Visitor for printing C++ code compatible with legacy api of CoreNEURON
                            @ Constructor
                            constructor block
                            symtab::SymbolTable * get_symbol_table() const override
                            Return associated symbol table for the current ast node.
                            -
                            void print_ion_var_structure()
                            Print structure of ion variables used for local copies.
                            +
                            void print_ion_var_structure()
                            Print structure of ion variables used for local copies.
                            -
                            ParamVector internal_method_parameters() override
                            Parameters for internally defined functions.
                            +
                            ParamVector internal_method_parameters() override
                            Parameters for internally defined functions.
                            int position_of_int_var(const std::string &name) const override
                            Determine the position in the data array for a given int variable.
                            virtual void print_channel_iteration_block_parallel_hint(BlockType type, const ast::Block *block)
                            Print pragma annotations for channel iterations.
                            virtual bool is_constant_variable(const std::string &name) const
                            Check if variable is qualified as constant.
                            -
                            void print_function_procedure_helper(const ast::Block &node) override
                            Common helper function to help printing function or procedure blocks.
                            -
                            const char * external_method_parameters(bool table=false) noexcept override
                            Parameters for functions in generated code that are called back from external code.
                            +
                            void print_function_procedure_helper(const ast::Block &node) override
                            Common helper function to help printing function or procedure blocks.
                            +
                            const char * external_method_parameters(bool table=false) noexcept override
                            Parameters for functions in generated code that are called back from external code.
                            std::shared_ptr< StatementBlock > get_statement_block() const noexcept override
                            Getter for member variable ForNetcon::statement_block.
                            Definition: for_netcon.hpp:185
                            -
                            void visit_for_netcon(const ast::ForNetcon &node) override
                            visit node of type ast::ForNetcon
                            -
                            virtual void print_compute_functions() override
                            Print all compute functions for every backend.
                            -
                            void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
                            Print the nrn_cur kernel with NMODL conductance keyword provisions.
                            +
                            void visit_for_netcon(const ast::ForNetcon &node) override
                            visit node of type ast::ForNetcon
                            +
                            virtual void print_compute_functions() override
                            Print all compute functions for every backend.
                            +
                            void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
                            Print the nrn_cur kernel with NMODL conductance keyword provisions.
                            Represent semantic information for index variable.
                            virtual void print_memory_allocation_routine() const
                            Print memory allocation routine.
                            std::string to_string(const T &obj)
                            -
                            void print_check_table_thread_function()
                            Print check_table functions.
                            +
                            void print_check_table_thread_function()
                            Print check_table functions.
                            virtual bool is_initial_block() const noexcept
                            Check if the ast node is an instance of ast::InitialBlock.
                            Definition: ast.cpp:122
                            @ NetReceive
                            net_receive block
                            -
                            void print_namespace_begin() override
                            Print start of namespaces.
                            +
                            void print_namespace_begin() override
                            Print start of namespaces.
                            virtual std::string backend_name() const override
                            Name of the code generation backend.
                            static constexpr char NRN_INIT_METHOD[]
                            nrn_init method in generated code
                            virtual void print_rhs_d_shadow_variables()
                            Print the setup method for setting matrix shadow vectors.
                            const ExpressionVector & get_arguments() const noexcept
                            Getter for member variable FunctionCall::arguments.
                            -
                            std::string process_verbatim_text(std::string const &text) override
                            Process a verbatim block for possible variable renaming.
                            +
                            std::string process_verbatim_text(std::string const &text) override
                            Process a verbatim block for possible variable renaming.
                            static constexpr char THREAD_ARGS[]
                            verbatim name of the variable for nrn thread arguments
                            -
                            void print_net_receive()
                            Print net_receive function definition.
                            -
                            static void rename_net_receive_arguments(const ast::NetReceiveBlock &net_receive_node, const ast::Node &node)
                            Rename arguments to NET_RECEIVE block with corresponding pointer variable.
                            +
                            void print_net_receive()
                            Print net_receive function definition.
                            +
                            static void rename_net_receive_arguments(const ast::NetReceiveBlock &net_receive_node, const ast::Node &node)
                            Rename arguments to NET_RECEIVE block with corresponding pointer variable.
                            std::string breakpoint_current(std::string current) const
                            Determine the variable name for the "current" used in breakpoint block taking into account intermedia...
                            -
                            void print_function(const ast::FunctionBlock &node) override
                            Print NMODL function in target backend code.
                            -
                            void print_top_verbatim_blocks()
                            Print top level (global scope) verbatim blocks.
                            +
                            void print_function(const ast::FunctionBlock &node) override
                            Print NMODL function in target backend code.
                            +
                            void print_top_verbatim_blocks()
                            Print top level (global scope) verbatim blocks.
                            std::shared_ptr< Integer > get_n_state_vars() const noexcept
                            Getter for member variable EigenLinearSolverBlock::n_state_vars.
                            Blindly rename given variable to new name
                            static constexpr char NRN_CUR_METHOD[]
                            nrn_cur method in generated code
                            @@ -4144,45 +4108,44 @@
                            @ LOCAL_VAR
                            type of ast::LocalVar
                            Represent linear solver solution block based on Eigen.
                            std::vector< std::shared_ptr< const ast::Ast > > collect_nodes(const ast::Ast &node, const std::vector< ast::AstNodeType > &types)
                            traverse node recursively and collect nodes of given types
                            -
                            void print_mechanism_global_var_structure(bool print_initializers) override
                            Print the structure that wraps all global variables used in the NMODL.
                            +
                            void print_mechanism_global_var_structure(bool print_initializers) override
                            Print the structure that wraps all global variables used in the NMODL.
                            Visitor to return Def-Use chain for a given variable in the block/node
                            -
                            void print_net_send_call(const ast::FunctionCall &node)
                            Print call to net_send.
                            std::string get_node_name() const override
                            Return name of the node.
                            Definition: ast.cpp:3873
                            std::shared_ptr< StatementBlock > get_functor_block() const noexcept
                            Getter for member variable EigenNewtonSolverBlock::functor_block.
                            -
                            void visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) override
                            visit node of type ast::EigenNewtonSolverBlock
                            -
                            void print_nrn_constructor() override
                            Print nrn_constructor function definition.
                            +
                            void visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) override
                            visit node of type ast::EigenNewtonSolverBlock
                            +
                            void print_nrn_constructor() override
                            Print nrn_constructor function definition.
                            virtual void print_kernel_data_present_annotation_block_end()
                            Print matching block end of accelerator annotations for data presence on device.
                            -
                            void print_nrn_alloc() override
                            Print nrn_alloc function definition.
                            +
                            void print_nrn_alloc() override
                            Print nrn_alloc function definition.
                            virtual void print_nrn_cur_matrix_shadow_reduction()
                            Print the reduction to matrix elements from shadow vectors.
                            -
                            void print_memb_list_getter()
                            Print the getter method for returning membrane list from NrnThread.
                            +
                            void print_memb_list_getter()
                            Print the getter method for returning membrane list from NrnThread.
                            std::shared_ptr< Expression > get_node_to_solve() const noexcept
                            Getter for member variable SolutionExpression::node_to_solve.
                            - +
                            static constexpr char INST_GLOBAL_MEMBER[]
                            instance struct member pointing to the global variable structure
                            -
                            const char * external_method_arguments() noexcept override
                            Arguments for external functions called from generated code.
                            +
                            const char * external_method_arguments() noexcept override
                            Arguments for external functions called from generated code.
                            @ PROTECT_STATEMENT
                            type of ast::ProtectStatement
                            -
                            void print_instance_variable_setup()
                            Print the function that initialize instance structure.
                            -
                            void print_nrn_init(bool skip_init_check=true)
                            Print the nrn_init function definition.
                            +
                            void print_instance_variable_setup()
                            Print the function that initialize instance structure.
                            +
                            void print_nrn_init(bool skip_init_check=true)
                            Print the nrn_init function definition.
                            Represents block encapsulating list of statements.
                            -
                            std::string get_variable_name(const std::string &name, bool use_instance=true) const override
                            Determine variable name in the structure of mechanism properties.
                            +
                            std::string get_variable_name(const std::string &name, bool use_instance=true) const override
                            Determine variable name in the structure of mechanism properties.
                            NmodlType
                            NMODL variable properties.
                            -
                            void print_namespace_start() override
                            Prints the start of the coreneuron namespace.
                            +
                            void print_namespace_start() override
                            Prints the start of the coreneuron namespace.
                            @ BATYPE_BREAKPOINT
                            Definition: ast_common.hpp:80
                            virtual void print_abort_routine() const
                            Print backend specific abort routine.
                            -
                            void print_table_check_function(const ast::Block &node)
                            Print check_function() for functions or procedure using table.
                            +
                            void print_table_check_function(const ast::Block &node)
                            Print check_function() for functions or procedure using table.
                            const ArgumentVector & get_parameters() const noexcept override
                            Getter for member variable ForNetcon::parameters.
                            Definition: for_netcon.hpp:176
                            -
                            void print_nrn_cur() override
                            Print nrn_cur / current update function definition.
                            -
                            std::string get_range_var_float_type(const SymbolType &symbol)
                            Returns floating point type for given range variable symbol.
                            +
                            void print_nrn_cur() override
                            Print nrn_cur / current update function definition.
                            +
                            std::string get_range_var_float_type(const SymbolType &symbol)
                            Returns floating point type for given range variable symbol.
                            bool ion_variable_struct_required() const
                            Check if a structure for ion variables is required.
                            -
                            virtual void print_net_send_buffering_cnt_update() const
                            Print the code related to the update of NetSendBuffer_t cnt.
                            +
                            virtual void print_net_send_buffering_cnt_update() const
                            Print the code related to the update of NetSendBuffer_t cnt.
                            std::shared_ptr< StatementBlock > get_variable_block() const noexcept
                            Getter for member variable EigenNewtonSolverBlock::variable_block.
                            -
                            void print_thread_memory_callbacks()
                            Print thread related memory allocation and deallocation callbacks.
                            +
                            void print_thread_memory_callbacks()
                            Print thread related memory allocation and deallocation callbacks.
                            Represent a callback to NEURON's derivimplicit solver.
                            Represents ion write statement during code generation.
                            -
                            void print_net_receive_buffering(bool need_mech_inst=true)
                            Print kernel for buffering net_receive events.
                            -
                            virtual void print_global_function_common_code(BlockType type, const std::string &function_name="") override
                            Print common code for global functions like nrn_init, nrn_cur and nrn_state.
                            +
                            void print_net_receive_buffering(bool need_mech_inst=true)
                            Print kernel for buffering net_receive events.
                            +
                            virtual void print_global_function_common_code(BlockType type, const std::string &function_name="") override
                            Print common code for global functions like nrn_init, nrn_cur and nrn_state.
                            Implement logger based on spdlog library.
                            static const std::string NMODL_VERSION
                            project tagged version in the cmake
                            Definition: config.h:36
                            virtual void print_global_var_struct_decl()
                            Instantiate global var instance.
                            @@ -4190,59 +4153,57 @@
                            Represent solution of a block in the AST.
                            std::shared_ptr< StatementBlock > get_statement_block() const noexcept override
                            Getter for member variable FunctionBlock::statement_block.
                            BlockType
                            Helper to represent various block types.
                            -
                            void print_mechanism_register() override
                            Print the mechanism registration function.
                            +
                            void print_mechanism_register() override
                            Print the mechanism registration function.
                            virtual void print_global_method_annotation()
                            Print backend specific global method annotation.
                            static constexpr char NRN_STATE_METHOD[]
                            nrn_state method in generated code
                            -
                            void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
                            Print main body of nrn_cur function.
                            +
                            void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
                            Print main body of nrn_cur function.
                            Version information and units file path.
                            -
                            std::string nrn_thread_internal_arguments() override
                            Arguments for "_threadargs_" macro in neuron implementation.
                            +
                            std::string nrn_thread_internal_arguments() override
                            Arguments for "_threadargs_" macro in neuron implementation.
                            bool optimize_ion_variable_copies() const
                            Check if ion variable copies should be avoided.
                            virtual void print_device_atomic_capture_annotation() const
                            Print pragma annotation for increase and capture of variable in automatic way.
                            -
                            void visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) override
                            visit node of type ast::DerivimplicitCallback
                            +
                            void visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) override
                            visit node of type ast::DerivimplicitCallback
                            std::vector< ShadowUseStatement > ion_write_statements(BlockType type)
                            For a given output block type, return statements for writing back ion variables.
                            -
                            virtual void print_get_memb_list()
                            Print the target backend code for defining and checking a local Memb_list variable.
                            -
                            void print_num_variable_getter()
                            Print the getter methods for float and integer variables count.
                            +
                            virtual void print_get_memb_list()
                            Print the target backend code for defining and checking a local Memb_list variable.
                            +
                            void print_num_variable_getter()
                            Print the getter methods for float and integer variables count.
                            virtual std::shared_ptr< StatementBlock > get_statement_block() const
                            Return associated statement block for the AST node.
                            Definition: ast.cpp:32
                            -
                            void print_standard_includes() override
                            Print standard C/C++ includes.
                            -
                            virtual void print_net_receive_loop_end()
                            Print the code for closing the main net_receive loop.
                            +
                            void print_standard_includes() override
                            Print standard C/C++ includes.
                            +
                            virtual void print_net_receive_loop_end()
                            Print the code for closing the main net_receive loop.
                            virtual void visit_children(visitor::Visitor &v) override
                            visit children i.e.
                            Definition: ast.cpp:384
                            -
                            void print_mech_type_getter()
                            Print the getter method for returning mechtype.
                            +
                            void print_mech_type_getter()
                            Print the getter method for returning mechtype.
                            Represents a AFTER block in NMODL.
                            Definition: after_block.hpp:51
                            virtual bool is_before_block() const noexcept
                            Check if the ast node is an instance of ast::BeforeBlock.
                            Definition: ast.cpp:150
                            std::shared_ptr< StatementBlock > get_update_states_block() const noexcept
                            Getter for member variable EigenNewtonSolverBlock::update_states_block.
                            static constexpr char NTHREAD_T_VARIABLE[]
                            t variable in neuron thread structure
                            -
                            std::string float_variable_name(const SymbolType &symbol, bool use_instance) const override
                            Determine the name of a float variable given its symbol.
                            -
                            virtual void print_global_variable_device_update_annotation()
                            Print the pragma annotation to update global variables from host to the device.
                            +
                            std::string float_variable_name(const SymbolType &symbol, bool use_instance) const override
                            Determine the name of a float variable given its symbol.
                            +
                            virtual void print_global_variable_device_update_annotation()
                            Print the pragma annotation to update global variables from host to the device.
                            Blindly rename given variable to new name
                            @ State
                            derivative block
                            -
                            void print_function_tables(const ast::FunctionTableBlock &node)
                            Print NMODL function_table in target backend code.
                            +
                            void print_function_tables(const ast::FunctionTableBlock &node)
                            Print NMODL function_table in target backend code.
                            THIS FILE IS GENERATED AT BUILD TIME AND SHALL NOT BE EDITED.
                            -
                            virtual void visit_watch_statement(const ast::WatchStatement &node) override
                            visit node of type ast::WatchStatement
                            +
                            virtual void visit_watch_statement(const ast::WatchStatement &node) override
                            visit node of type ast::WatchStatement
                            virtual const ArgumentVector & get_parameters() const
                            Definition: block.hpp:50
                            -
                            void print_nrn_cur_non_conductance_kernel() override
                            Print the nrn_cur kernel without NMODL conductance keyword provisions.
                            +
                            void print_nrn_cur_non_conductance_kernel() override
                            Print the nrn_cur kernel without NMODL conductance keyword provisions.
                            bool variable_used(const ast::Node &node, std::string name)
                            virtual void print_backend_includes()
                            Print backend specific includes (none needed for C++ backend)
                            -
                            virtual void print_global_var_struct_assertions() const
                            Print static assertions about the global variable struct.
                            +
                            virtual void print_global_var_struct_assertions() const
                            Print static assertions about the global variable struct.
                            std::string process_verbatim_token(const std::string &token)
                            Process a token in a verbatim block for possible variable renaming.
                            -
                            void print_nrn_state() override
                            Print nrn_state / state update function definition.
                            +
                            void print_nrn_state() override
                            Print nrn_state / state update function definition.
                            static constexpr char NRN_DESTRUCTOR_METHOD[]
                            nrn_destructor method in generated code
                            -
                            void print_function_call(const ast::FunctionCall &node) override
                            Print call to internal or external function.
                            -
                            virtual void print_codegen_routines() override
                            Print entry point to code generation.
                            +
                            virtual void print_codegen_routines() override
                            Print entry point to code generation.
                            - +
                            static constexpr char THREAD_ARGS_PROTO[]
                            verbatim name of the variable for nrn thread arguments in prototype
                            @ BeforeAfter
                            before / after block
                            std::shared_ptr< StatementBlock > get_finalize_block() const noexcept
                            Getter for member variable EigenNewtonSolverBlock::finalize_block.
                            -
                            virtual void print_net_send_buffering_grow()
                            Print statement that grows NetSendBuffering_t structure if needed.
                            +
                            virtual void print_net_send_buffering_grow()
                            Print statement that grows NetSendBuffering_t structure if needed.
                            constexpr char NRN_PRIVATE_CONSTRUCTOR_METHOD[]
                            nrn_private_constructor method in generated code
                            virtual void print_backend_namespace_stop()
                            Prints the end of namespace for the backend-specific code.
                            -
                            void print_net_event_call(const ast::FunctionCall &node)
                            Print call to net_event.
                            virtual std::string get_node_name() const
                            Return name of of the node.
                            Definition: ast.cpp:28
                            virtual void print_net_send_buf_update_to_host() const
                            Print the code to update NetSendBuffer_t from device to host.
                            Auto generated AST classes declaration.
                            -
                            void print_data_structures(bool print_initializers) override
                            Print all classes.
                            -
                            std::string replace_if_verbatim_variable(std::string name)
                            Replace commonly used verbatim variables.
                            -
                            virtual void print_ion_var_constructor(const std::vector< std::string > &members)
                            Print constructor of ion variables.
                            +
                            void print_data_structures(bool print_initializers) override
                            Print all classes.
                            +
                            std::string replace_if_verbatim_variable(std::string name)
                            Replace commonly used verbatim variables.
                            +
                            virtual void print_ion_var_constructor(const std::vector< std::string > &members)
                            Print constructor of ion variables.
                            int position_of_float_var(const std::string &name) const override
                            Determine the position in the data array for a given float variable.
                            std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
                            A vector of parameters represented by a 4-tuple of strings:
                            static constexpr char ION_VARNAME_PREFIX[]
                            prefix for ion variable
                            diff --git a/html/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html b/html/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html index b5fe7da974..b04227dda4 100644 --- a/html/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html +++ b/html/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html @@ -186,758 +186,766 @@
                            90 
                            91 
                            92 /// TODO: Edit for NEURON
                            - -
                            94  return;
                            -
                            95 }
                            -
                            96 
                            -
                            97 
                            -
                            98 /// TODO: Edit for NEURON
                            - -
                            100  if (info.functions.empty() && info.procedures.empty()) {
                            -
                            101  return;
                            -
                            102  }
                            -
                            103 }
                            -
                            104 
                            -
                            105 
                            -
                            106 /// TODO: Edit for NEURON
                            - -
                            108  const std::string& name) {
                            + +
                            94  if (info.functions.empty() && info.procedures.empty()) {
                            +
                            95  return;
                            +
                            96  }
                            +
                            97 }
                            +
                            98 
                            +
                            99 
                            +
                            100 /// TODO: Edit for NEURON
                            + +
                            102  const std::string& name) {
                            +
                            103  return;
                            +
                            104 }
                            +
                            105 
                            +
                            106 
                            +
                            107 /// TODO: Edit for NEURON
                            +
                            109  return;
                            110 }
                            111 
                            112 
                            113 /// TODO: Edit for NEURON
                            - +
                            115  return;
                            116 }
                            117 
                            118 
                            119 /// TODO: Edit for NEURON
                            - +
                            121  return;
                            122 }
                            123 
                            -
                            124 
                            -
                            125 /// TODO: Edit for NEURON
                            - -
                            127  return;
                            -
                            128 }
                            -
                            129 
                            -
                            130 
                            -
                            131 /****************************************************************************************/
                            -
                            132 /* Code-specific helper routines */
                            -
                            133 /****************************************************************************************/
                            +
                            124 
                            +
                            125 /****************************************************************************************/
                            +
                            126 /* Code-specific helper routines */
                            +
                            127 /****************************************************************************************/
                            +
                            128 
                            +
                            129 
                            +
                            130 /// TODO: Edit for NEURON
                            + +
                            132  return {};
                            +
                            133 }
                            134 
                            135 
                            136 /// TODO: Edit for NEURON
                            - +
                            138  return {};
                            139 }
                            140 
                            141 
                            142 /// TODO: Edit for NEURON
                            - +
                            144  return {};
                            145 }
                            146 
                            147 
                            148 /// TODO: Edit for NEURON
                            - +
                            149 const char* CodegenNeuronCppVisitor::external_method_parameters(bool table) noexcept {
                            150  return {};
                            151 }
                            152 
                            153 
                            154 /// TODO: Edit for NEURON
                            -
                            155 const char* CodegenNeuronCppVisitor::external_method_parameters(bool table) noexcept {
                            +
                            156  return {};
                            157 }
                            158 
                            159 
                            160 /// TODO: Edit for NEURON
                            - +
                            162  return {};
                            163 }
                            164 
                            165 
                            -
                            166 /// TODO: Edit for NEURON
                            - +
                            166 /// TODO: Write for NEURON
                            +
                            167 std::string CodegenNeuronCppVisitor::process_verbatim_text(std::string const& text) {
                            168  return {};
                            169 }
                            170 
                            171 
                            172 /// TODO: Write for NEURON
                            -
                            173 std::string CodegenNeuronCppVisitor::process_verbatim_text(std::string const& text) {
                            +
                            174  return {};
                            -
                            175 }
                            +
                            175 };
                            176 
                            -
                            177 
                            -
                            178 /// TODO: Write for NEURON
                            - -
                            180  return {};
                            -
                            181 };
                            +
                            177 
                            +
                            178 /****************************************************************************************/
                            +
                            179 /* Code-specific printing routines for code generation */
                            +
                            180 /****************************************************************************************/
                            +
                            181 
                            182 
                            -
                            183 
                            -
                            184 /****************************************************************************************/
                            -
                            185 /* Code-specific printing routines for code generation */
                            -
                            186 /****************************************************************************************/
                            + +
                            184  printer->add_newline(2);
                            +
                            185  printer->push_block("namespace neuron");
                            +
                            186 }
                            187 
                            188 
                            - -
                            190  printer->add_newline(2);
                            -
                            191  printer->push_block("namespace neuron");
                            -
                            192 }
                            + +
                            190  printer->pop_block();
                            +
                            191 }
                            +
                            192 
                            193 
                            -
                            194 
                            - -
                            196  printer->pop_block();
                            -
                            197 }
                            -
                            198 
                            -
                            199 
                            -
                            200 /****************************************************************************************/
                            -
                            201 /* Routines for returning variable name */
                            -
                            202 /****************************************************************************************/
                            -
                            203 
                            -
                            204 
                            -
                            205 /// TODO: Edit for NEURON
                            - -
                            207  bool use_instance) const {
                            -
                            208  return symbol->get_name();
                            -
                            209 }
                            -
                            210 
                            -
                            211 
                            -
                            212 /// TODO: Edit for NEURON
                            - -
                            214  const std::string& name,
                            -
                            215  bool use_instance) const {
                            -
                            216  return name;
                            -
                            217 }
                            -
                            218 
                            -
                            219 
                            -
                            220 /// TODO: Edit for NEURON
                            - -
                            222  bool use_instance) const {
                            -
                            223  return symbol->get_name();
                            -
                            224 }
                            -
                            225 
                            -
                            226 
                            -
                            227 /// TODO: Edit for NEURON
                            -
                            228 std::string CodegenNeuronCppVisitor::get_variable_name(const std::string& name,
                            -
                            229  bool use_instance) const {
                            -
                            230  return name;
                            -
                            231 }
                            +
                            194 /****************************************************************************************/
                            +
                            195 /* Routines for returning variable name */
                            +
                            196 /****************************************************************************************/
                            +
                            197 
                            +
                            198 
                            +
                            199 /// TODO: Edit for NEURON
                            + +
                            201  bool use_instance) const {
                            +
                            202  return symbol->get_name();
                            +
                            203 }
                            +
                            204 
                            +
                            205 
                            +
                            206 /// TODO: Edit for NEURON
                            + +
                            208  const std::string& name,
                            +
                            209  bool use_instance) const {
                            +
                            210  return name;
                            +
                            211 }
                            +
                            212 
                            +
                            213 
                            +
                            214 /// TODO: Edit for NEURON
                            + +
                            216  bool use_instance) const {
                            +
                            217  return symbol->get_name();
                            +
                            218 }
                            +
                            219 
                            +
                            220 
                            +
                            221 /// TODO: Edit for NEURON
                            +
                            222 std::string CodegenNeuronCppVisitor::get_variable_name(const std::string& name,
                            +
                            223  bool use_instance) const {
                            +
                            224  return name;
                            +
                            225 }
                            +
                            226 
                            +
                            227 
                            +
                            228 /****************************************************************************************/
                            +
                            229 /* Main printing routines for code generation */
                            +
                            230 /****************************************************************************************/
                            +
                            231 
                            232 
                            -
                            233 
                            -
                            234 /****************************************************************************************/
                            -
                            235 /* Main printing routines for code generation */
                            -
                            236 /****************************************************************************************/
                            -
                            237 
                            + +
                            234  time_t current_time{};
                            +
                            235  time(&current_time);
                            +
                            236  std::string data_time_str{std::ctime(&current_time)};
                            +
                            237  auto version = nmodl::Version::NMODL_VERSION + " [" + nmodl::Version::GIT_REVISION + "]";
                            238 
                            - -
                            240  time_t current_time{};
                            -
                            241  time(&current_time);
                            -
                            242  std::string data_time_str{std::ctime(&current_time)};
                            -
                            243  auto version = nmodl::Version::NMODL_VERSION + " [" + nmodl::Version::GIT_REVISION + "]";
                            -
                            244 
                            -
                            245  printer->add_line("/*********************************************************");
                            -
                            246  printer->add_line("Model Name : ", info.mod_suffix);
                            -
                            247  printer->add_line("Filename : ", info.mod_file, ".mod");
                            -
                            248  printer->add_line("NMODL Version : ", nmodl_version());
                            -
                            249  printer->fmt_line("Vectorized : {}", info.vectorize);
                            -
                            250  printer->fmt_line("Threadsafe : {}", info.thread_safe);
                            -
                            251  printer->add_line("Created : ", stringutils::trim(data_time_str));
                            -
                            252  printer->add_line("Simulator : ", simulator_name());
                            -
                            253  printer->add_line("Backend : ", backend_name());
                            -
                            254  printer->add_line("NMODL Compiler : ", version);
                            -
                            255  printer->add_line("*********************************************************/");
                            -
                            256 }
                            -
                            257 
                            -
                            258 
                            - -
                            260  printer->add_newline();
                            -
                            261  printer->add_multi_line(R"CODE(
                            -
                            262  #include <math.h>
                            -
                            263  #include <stdio.h>
                            -
                            264  #include <stdlib.h>
                            -
                            265  )CODE");
                            -
                            266  if (!info.vectorize) {
                            -
                            267  printer->add_line("#include <vector>");
                            -
                            268  }
                            -
                            269 }
                            -
                            270 
                            -
                            271 
                            - -
                            273  printer->add_newline();
                            -
                            274  printer->add_multi_line(R"CODE(
                            -
                            275  #include "mech_api.h"
                            -
                            276  #include "neuron/cache/mechanism_range.hpp"
                            -
                            277  #include "nrniv_mf.h"
                            -
                            278  #include "section_fwd.hpp"
                            -
                            279  )CODE");
                            -
                            280 }
                            -
                            281 
                            -
                            282 
                            -
                            283 void CodegenNeuronCppVisitor::print_sdlists_init([[maybe_unused]] bool print_initializers) {
                            -
                            284  /// _initlists() should only be called once by the mechanism registration function
                            -
                            285  /// (_<mod_file>_reg())
                            -
                            286  printer->add_newline(2);
                            -
                            287  printer->push_block("static void _initlists()");
                            -
                            288  for (auto i = 0; i < info.prime_variables_by_order.size(); ++i) {
                            -
                            289  const auto& prime_var = info.prime_variables_by_order[i];
                            -
                            290  /// TODO: Something similar needs to happen for slist/dlist2 but I don't know their usage at
                            -
                            291  // the moment
                            -
                            292  /// TODO: We have to do checks and add errors similar to nocmodl in the
                            -
                            293  // SemanticAnalysisVisitor
                            -
                            294  if (prime_var->is_array()) {
                            -
                            295  /// TODO: Needs a for loop here. Look at
                            -
                            296  // https://github.com/neuronsimulator/nrn/blob/df001a436bcb4e23d698afe66c2a513819a6bfe8/src/nmodl/deriv.cpp#L524
                            -
                            297  /// TODO: Also needs a test
                            -
                            298  printer->fmt_push_block("for (int _i = 0; _i < {}; ++_i)", prime_var->get_length());
                            -
                            299  printer->fmt_line("/* {}[{}] */", prime_var->get_name(), prime_var->get_length());
                            -
                            300  printer->fmt_line("_slist1[{}+_i] = {{{}, _i}};",
                            -
                            301  i,
                            -
                            302  position_of_float_var(prime_var->get_name()));
                            -
                            303  const auto prime_var_deriv_name = "D" + prime_var->get_name();
                            -
                            304  printer->fmt_line("/* {}[{}] */", prime_var_deriv_name, prime_var->get_length());
                            -
                            305  printer->fmt_line("_dlist1[{}+_i] = {{{}, _i}};",
                            +
                            239  printer->add_line("/*********************************************************");
                            +
                            240  printer->add_line("Model Name : ", info.mod_suffix);
                            +
                            241  printer->add_line("Filename : ", info.mod_file, ".mod");
                            +
                            242  printer->add_line("NMODL Version : ", nmodl_version());
                            +
                            243  printer->fmt_line("Vectorized : {}", info.vectorize);
                            +
                            244  printer->fmt_line("Threadsafe : {}", info.thread_safe);
                            +
                            245  printer->add_line("Created : ", stringutils::trim(data_time_str));
                            +
                            246  printer->add_line("Simulator : ", simulator_name());
                            +
                            247  printer->add_line("Backend : ", backend_name());
                            +
                            248  printer->add_line("NMODL Compiler : ", version);
                            +
                            249  printer->add_line("*********************************************************/");
                            +
                            250 }
                            +
                            251 
                            +
                            252 
                            + +
                            254  printer->add_newline();
                            +
                            255  printer->add_multi_line(R"CODE(
                            +
                            256  #include <math.h>
                            +
                            257  #include <stdio.h>
                            +
                            258  #include <stdlib.h>
                            +
                            259  )CODE");
                            +
                            260  if (!info.vectorize) {
                            +
                            261  printer->add_line("#include <vector>");
                            +
                            262  }
                            +
                            263 }
                            +
                            264 
                            +
                            265 
                            + +
                            267  printer->add_newline();
                            +
                            268  printer->add_multi_line(R"CODE(
                            +
                            269  #include "mech_api.h"
                            +
                            270  #include "neuron/cache/mechanism_range.hpp"
                            +
                            271  #include "nrniv_mf.h"
                            +
                            272  #include "section_fwd.hpp"
                            +
                            273  )CODE");
                            +
                            274 }
                            +
                            275 
                            +
                            276 
                            +
                            277 void CodegenNeuronCppVisitor::print_sdlists_init([[maybe_unused]] bool print_initializers) {
                            +
                            278  /// _initlists() should only be called once by the mechanism registration function
                            +
                            279  /// (_<mod_file>_reg())
                            +
                            280  printer->add_newline(2);
                            +
                            281  printer->push_block("static void _initlists()");
                            +
                            282  for (auto i = 0; i < info.prime_variables_by_order.size(); ++i) {
                            +
                            283  const auto& prime_var = info.prime_variables_by_order[i];
                            +
                            284  /// TODO: Something similar needs to happen for slist/dlist2 but I don't know their usage at
                            +
                            285  // the moment
                            +
                            286  /// TODO: We have to do checks and add errors similar to nocmodl in the
                            +
                            287  // SemanticAnalysisVisitor
                            +
                            288  if (prime_var->is_array()) {
                            +
                            289  /// TODO: Needs a for loop here. Look at
                            +
                            290  // https://github.com/neuronsimulator/nrn/blob/df001a436bcb4e23d698afe66c2a513819a6bfe8/src/nmodl/deriv.cpp#L524
                            +
                            291  /// TODO: Also needs a test
                            +
                            292  printer->fmt_push_block("for (int _i = 0; _i < {}; ++_i)", prime_var->get_length());
                            +
                            293  printer->fmt_line("/* {}[{}] */", prime_var->get_name(), prime_var->get_length());
                            +
                            294  printer->fmt_line("_slist1[{}+_i] = {{{}, _i}};",
                            +
                            295  i,
                            +
                            296  position_of_float_var(prime_var->get_name()));
                            +
                            297  const auto prime_var_deriv_name = "D" + prime_var->get_name();
                            +
                            298  printer->fmt_line("/* {}[{}] */", prime_var_deriv_name, prime_var->get_length());
                            +
                            299  printer->fmt_line("_dlist1[{}+_i] = {{{}, _i}};",
                            +
                            300  i,
                            +
                            301  position_of_float_var(prime_var_deriv_name));
                            +
                            302  printer->pop_block();
                            +
                            303  } else {
                            +
                            304  printer->fmt_line("/* {} */", prime_var->get_name());
                            +
                            305  printer->fmt_line("_slist1[{}] = {{{}, 0}};",
                            306  i,
                            -
                            307  position_of_float_var(prime_var_deriv_name));
                            -
                            308  printer->pop_block();
                            -
                            309  } else {
                            -
                            310  printer->fmt_line("/* {} */", prime_var->get_name());
                            -
                            311  printer->fmt_line("_slist1[{}] = {{{}, 0}};",
                            -
                            312  i,
                            -
                            313  position_of_float_var(prime_var->get_name()));
                            -
                            314  const auto prime_var_deriv_name = "D" + prime_var->get_name();
                            -
                            315  printer->fmt_line("/* {} */", prime_var_deriv_name);
                            -
                            316  printer->fmt_line("_dlist1[{}] = {{{}, 0}};",
                            -
                            317  i,
                            -
                            318  position_of_float_var(prime_var_deriv_name));
                            -
                            319  }
                            -
                            320  }
                            -
                            321  printer->pop_block();
                            -
                            322 }
                            -
                            323 
                            -
                            324 
                            - -
                            326  /// TODO: Print only global variables printed in NEURON
                            -
                            327  printer->add_newline(2);
                            -
                            328  printer->add_line("/* NEURON global variables */");
                            -
                            329  if (info.primes_size != 0) {
                            -
                            330  printer->fmt_line("static neuron::container::field_index _slist1[{0}], _dlist1[{0}];",
                            -
                            331  info.primes_size);
                            -
                            332  }
                            -
                            333  printer->add_line("static int mech_type;");
                            -
                            334 
                            -
                            335  printer->fmt_line("static int {} = {};",
                            - -
                            337  info.pointer_variables.size() > 0
                            -
                            338  ? static_cast<int>(info.pointer_variables.size())
                            -
                            339  : -1);
                            -
                            340 }
                            -
                            341 
                            -
                            342 
                            -
                            343 /// TODO: Same as CoreNEURON?
                            - -
                            345  /// TODO: Write HocParmLimits and other HOC global variables (delta_t)
                            -
                            346  // Probably needs more changes
                            -
                            347  auto variable_printer =
                            -
                            348  [&](const std::vector<SymbolType>& variables, bool if_array, bool if_vector) {
                            -
                            349  for (const auto& variable: variables) {
                            -
                            350  if (variable->is_array() == if_array) {
                            -
                            351  // false => do not use the instance struct, which is not
                            -
                            352  // defined in the global declaration that we are printing
                            -
                            353  auto name = get_variable_name(variable->get_name(), false);
                            -
                            354  auto ename = add_escape_quote(variable->get_name() + "_" + info.mod_suffix);
                            -
                            355  auto length = variable->get_length();
                            -
                            356  if (if_vector) {
                            -
                            357  printer->fmt_line("{{{}, {}, {}}},", ename, name, length);
                            -
                            358  } else {
                            -
                            359  printer->fmt_line("{{{}, &{}}},", ename, name);
                            -
                            360  }
                            -
                            361  }
                            -
                            362  }
                            -
                            363  };
                            -
                            364 
                            -
                            365  auto globals = info.global_variables;
                            -
                            366  auto thread_vars = info.thread_variables;
                            -
                            367 
                            -
                            368  if (info.table_count > 0) {
                            -
                            369  globals.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
                            -
                            370  }
                            -
                            371 
                            -
                            372  printer->add_newline(2);
                            -
                            373  printer->add_line("/** connect global (scalar) variables to hoc -- */");
                            -
                            374  printer->add_line("static DoubScal hoc_scalar_double[] = {");
                            -
                            375  printer->increase_indent();
                            -
                            376  variable_printer(globals, false, false);
                            -
                            377  variable_printer(thread_vars, false, false);
                            -
                            378  printer->add_line("{nullptr, nullptr}");
                            -
                            379  printer->decrease_indent();
                            -
                            380  printer->add_line("};");
                            -
                            381 
                            -
                            382  printer->add_newline(2);
                            -
                            383  printer->add_line("/** connect global (array) variables to hoc -- */");
                            -
                            384  printer->add_line("static DoubVec hoc_vector_double[] = {");
                            -
                            385  printer->increase_indent();
                            -
                            386  variable_printer(globals, true, true);
                            -
                            387  variable_printer(thread_vars, true, true);
                            -
                            388  printer->add_line("{nullptr, nullptr, 0}");
                            -
                            389  printer->decrease_indent();
                            -
                            390  printer->add_line("};");
                            -
                            391 }
                            -
                            392 
                            -
                            393 
                            - -
                            395  /// TODO: Write this according to NEURON
                            -
                            396  printer->add_newline(2);
                            -
                            397  printer->add_line("/** register channel with the simulator */");
                            -
                            398  printer->fmt_push_block("extern \"C\" void _{}_reg()", info.mod_file);
                            -
                            399  printer->add_line("_initlists();");
                            -
                            400  printer->add_newline();
                            -
                            401 
                            -
                            402  const auto compute_functions_parameters =
                            -
                            403  breakpoint_exist()
                            -
                            404  ? fmt::format("{}, {}, {}",
                            -
                            405  nrn_cur_required() ? method_name(naming::NRN_CUR_METHOD) : "nullptr",
                            -
                            406  method_name(naming::NRN_JACOB_METHOD),
                            -
                            407  nrn_state_required() ? method_name(naming::NRN_STATE_METHOD) : "nullptr")
                            -
                            408  : "nullptr, nullptr, nullptr";
                            -
                            409  const auto register_mech_args = fmt::format("{}, {}, {}, {}, {}, {}",
                            -
                            410  get_channel_info_var_name(),
                            -
                            411  method_name(naming::NRN_ALLOC_METHOD),
                            -
                            412  compute_functions_parameters,
                            -
                            413  method_name(naming::NRN_INIT_METHOD),
                            - -
                            415  1 + info.thread_data_index);
                            -
                            416  printer->fmt_line("register_mech({});", register_mech_args);
                            -
                            417 
                            -
                            418  // type related information
                            -
                            419  printer->add_newline();
                            -
                            420  printer->fmt_line("mech_type = nrn_get_mechtype({}[1]);", get_channel_info_var_name());
                            -
                            421 
                            -
                            422  // More things to add here
                            -
                            423  printer->add_line("_nrn_mechanism_register_data_fields(mech_type,");
                            -
                            424  printer->increase_indent();
                            -
                            425  const auto codegen_float_variables_size = codegen_float_variables.size();
                            -
                            426  for (int i = 0; i < codegen_float_variables_size; ++i) {
                            -
                            427  const auto& float_var = codegen_float_variables[i];
                            -
                            428  const auto print_comma = i < codegen_float_variables_size - 1 || info.emit_cvode;
                            -
                            429  if (float_var->is_array()) {
                            -
                            430  printer->fmt_line("_nrn_mechanism_field<double>{{\"{}\", {}}} /* {} */{}",
                            +
                            307  position_of_float_var(prime_var->get_name()));
                            +
                            308  const auto prime_var_deriv_name = "D" + prime_var->get_name();
                            +
                            309  printer->fmt_line("/* {} */", prime_var_deriv_name);
                            +
                            310  printer->fmt_line("_dlist1[{}] = {{{}, 0}};",
                            +
                            311  i,
                            +
                            312  position_of_float_var(prime_var_deriv_name));
                            +
                            313  }
                            +
                            314  }
                            +
                            315  printer->pop_block();
                            +
                            316 }
                            +
                            317 
                            +
                            318 
                            + +
                            320  /// TODO: Print only global variables printed in NEURON
                            +
                            321  printer->add_newline(2);
                            +
                            322  printer->add_line("/* NEURON global variables */");
                            +
                            323  if (info.primes_size != 0) {
                            +
                            324  printer->fmt_line("static neuron::container::field_index _slist1[{0}], _dlist1[{0}];",
                            +
                            325  info.primes_size);
                            +
                            326  }
                            +
                            327  printer->add_line("static int mech_type;");
                            +
                            328 
                            +
                            329  printer->fmt_line("static int {} = {};",
                            + +
                            331  info.pointer_variables.size() > 0
                            +
                            332  ? static_cast<int>(info.pointer_variables.size())
                            +
                            333  : -1);
                            +
                            334 }
                            +
                            335 
                            +
                            336 
                            +
                            337 /// TODO: Same as CoreNEURON?
                            + +
                            339  /// TODO: Write HocParmLimits and other HOC global variables (delta_t)
                            +
                            340  // Probably needs more changes
                            +
                            341  auto variable_printer =
                            +
                            342  [&](const std::vector<SymbolType>& variables, bool if_array, bool if_vector) {
                            +
                            343  for (const auto& variable: variables) {
                            +
                            344  if (variable->is_array() == if_array) {
                            +
                            345  // false => do not use the instance struct, which is not
                            +
                            346  // defined in the global declaration that we are printing
                            +
                            347  auto name = get_variable_name(variable->get_name(), false);
                            +
                            348  auto ename = add_escape_quote(variable->get_name() + "_" + info.mod_suffix);
                            +
                            349  auto length = variable->get_length();
                            +
                            350  if (if_vector) {
                            +
                            351  printer->fmt_line("{{{}, {}, {}}},", ename, name, length);
                            +
                            352  } else {
                            +
                            353  printer->fmt_line("{{{}, &{}}},", ename, name);
                            +
                            354  }
                            +
                            355  }
                            +
                            356  }
                            +
                            357  };
                            +
                            358 
                            +
                            359  auto globals = info.global_variables;
                            +
                            360  auto thread_vars = info.thread_variables;
                            +
                            361 
                            +
                            362  if (info.table_count > 0) {
                            +
                            363  globals.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
                            +
                            364  }
                            +
                            365 
                            +
                            366  printer->add_newline(2);
                            +
                            367  printer->add_line("/** connect global (scalar) variables to hoc -- */");
                            +
                            368  printer->add_line("static DoubScal hoc_scalar_double[] = {");
                            +
                            369  printer->increase_indent();
                            +
                            370  variable_printer(globals, false, false);
                            +
                            371  variable_printer(thread_vars, false, false);
                            +
                            372  printer->add_line("{nullptr, nullptr}");
                            +
                            373  printer->decrease_indent();
                            +
                            374  printer->add_line("};");
                            +
                            375 
                            +
                            376  printer->add_newline(2);
                            +
                            377  printer->add_line("/** connect global (array) variables to hoc -- */");
                            +
                            378  printer->add_line("static DoubVec hoc_vector_double[] = {");
                            +
                            379  printer->increase_indent();
                            +
                            380  variable_printer(globals, true, true);
                            +
                            381  variable_printer(thread_vars, true, true);
                            +
                            382  printer->add_line("{nullptr, nullptr, 0}");
                            +
                            383  printer->decrease_indent();
                            +
                            384  printer->add_line("};");
                            +
                            385 }
                            +
                            386 
                            +
                            387 
                            + +
                            389  /// TODO: Write this according to NEURON
                            +
                            390  printer->add_newline(2);
                            +
                            391  printer->add_line("/** register channel with the simulator */");
                            +
                            392  printer->fmt_push_block("extern \"C\" void _{}_reg()", info.mod_file);
                            +
                            393  printer->add_line("_initlists();");
                            +
                            394  printer->add_newline();
                            +
                            395 
                            +
                            396  const auto compute_functions_parameters =
                            +
                            397  breakpoint_exist()
                            +
                            398  ? fmt::format("{}, {}, {}",
                            +
                            399  nrn_cur_required() ? method_name(naming::NRN_CUR_METHOD) : "nullptr",
                            +
                            400  method_name(naming::NRN_JACOB_METHOD),
                            +
                            401  nrn_state_required() ? method_name(naming::NRN_STATE_METHOD) : "nullptr")
                            +
                            402  : "nullptr, nullptr, nullptr";
                            +
                            403  const auto register_mech_args = fmt::format("{}, {}, {}, {}, {}, {}",
                            +
                            404  get_channel_info_var_name(),
                            +
                            405  method_name(naming::NRN_ALLOC_METHOD),
                            +
                            406  compute_functions_parameters,
                            +
                            407  method_name(naming::NRN_INIT_METHOD),
                            + +
                            409  1 + info.thread_data_index);
                            +
                            410  printer->fmt_line("register_mech({});", register_mech_args);
                            +
                            411 
                            +
                            412  // type related information
                            +
                            413  printer->add_newline();
                            +
                            414  printer->fmt_line("mech_type = nrn_get_mechtype({}[1]);", get_channel_info_var_name());
                            +
                            415 
                            +
                            416  // More things to add here
                            +
                            417  printer->add_line("_nrn_mechanism_register_data_fields(mech_type,");
                            +
                            418  printer->increase_indent();
                            +
                            419  const auto codegen_float_variables_size = codegen_float_variables.size();
                            +
                            420  for (int i = 0; i < codegen_float_variables_size; ++i) {
                            +
                            421  const auto& float_var = codegen_float_variables[i];
                            +
                            422  const auto print_comma = i < codegen_float_variables_size - 1 || info.emit_cvode;
                            +
                            423  if (float_var->is_array()) {
                            +
                            424  printer->fmt_line("_nrn_mechanism_field<double>{{\"{}\", {}}} /* {} */{}",
                            +
                            425  float_var->get_name(),
                            +
                            426  float_var->get_length(),
                            +
                            427  i,
                            +
                            428  print_comma ? "," : "");
                            +
                            429  } else {
                            +
                            430  printer->fmt_line("_nrn_mechanism_field<double>{{\"{}\"}} /* {} */{}",
                            431  float_var->get_name(),
                            -
                            432  float_var->get_length(),
                            -
                            433  i,
                            -
                            434  print_comma ? "," : "");
                            -
                            435  } else {
                            -
                            436  printer->fmt_line("_nrn_mechanism_field<double>{{\"{}\"}} /* {} */{}",
                            -
                            437  float_var->get_name(),
                            -
                            438  i,
                            -
                            439  print_comma ? "," : "");
                            -
                            440  }
                            -
                            441  }
                            -
                            442  if (info.emit_cvode) {
                            -
                            443  printer->add_line("_nrn_mechanism_field<int>{\"_cvode_ieq\", \"cvodeieq\"} /* 0 */");
                            -
                            444  }
                            -
                            445  printer->decrease_indent();
                            -
                            446  printer->add_line(");");
                            -
                            447  printer->add_newline();
                            -
                            448  printer->pop_block();
                            -
                            449 }
                            -
                            450 
                            -
                            451 
                            - -
                            453  [[maybe_unused]] bool print_initializers) {
                            -
                            454  printer->add_newline(2);
                            -
                            455  printer->add_line("/* NEURON RANGE variables macro definitions */");
                            -
                            456  for (auto i = 0; i < codegen_float_variables.size(); ++i) {
                            -
                            457  const auto float_var = codegen_float_variables[i];
                            -
                            458  if (float_var->is_array()) {
                            -
                            459  printer->add_line("#define ",
                            -
                            460  float_var->get_name(),
                            -
                            461  "(id) _ml->template data_array<",
                            -
                            462  std::to_string(i),
                            -
                            463  ", ",
                            -
                            464  std::to_string(float_var->get_length()),
                            +
                            432  i,
                            +
                            433  print_comma ? "," : "");
                            +
                            434  }
                            +
                            435  }
                            +
                            436  if (info.emit_cvode) {
                            +
                            437  printer->add_line("_nrn_mechanism_field<int>{\"_cvode_ieq\", \"cvodeieq\"} /* 0 */");
                            +
                            438  }
                            +
                            439  printer->decrease_indent();
                            +
                            440  printer->add_line(");");
                            +
                            441  printer->add_newline();
                            +
                            442  printer->pop_block();
                            +
                            443 }
                            +
                            444 
                            +
                            445 
                            + +
                            447  [[maybe_unused]] bool print_initializers) {
                            +
                            448  printer->add_newline(2);
                            +
                            449  printer->add_line("/* NEURON RANGE variables macro definitions */");
                            +
                            450  for (auto i = 0; i < codegen_float_variables.size(); ++i) {
                            +
                            451  const auto float_var = codegen_float_variables[i];
                            +
                            452  if (float_var->is_array()) {
                            +
                            453  printer->add_line("#define ",
                            +
                            454  float_var->get_name(),
                            +
                            455  "(id) _ml->template data_array<",
                            +
                            456  std::to_string(i),
                            +
                            457  ", ",
                            +
                            458  std::to_string(float_var->get_length()),
                            +
                            459  ">(id)");
                            +
                            460  } else {
                            +
                            461  printer->add_line("#define ",
                            +
                            462  float_var->get_name(),
                            +
                            463  "(id) _ml->template fpfield<",
                            +
                            464  std::to_string(i),
                            465  ">(id)");
                            -
                            466  } else {
                            -
                            467  printer->add_line("#define ",
                            -
                            468  float_var->get_name(),
                            -
                            469  "(id) _ml->template fpfield<",
                            -
                            470  std::to_string(i),
                            -
                            471  ">(id)");
                            -
                            472  }
                            -
                            473  }
                            -
                            474 }
                            -
                            475 
                            -
                            476 
                            -
                            477 /// TODO: Edit for NEURON
                            - -
                            479  const std::string& function_name) {
                            -
                            480  return;
                            -
                            481 }
                            +
                            466  }
                            +
                            467  }
                            +
                            468 }
                            +
                            469 
                            +
                            470 
                            +
                            471 /// TODO: Edit for NEURON
                            + +
                            473  const std::string& function_name) {
                            +
                            474  return;
                            +
                            475 }
                            +
                            476 
                            +
                            477 
                            +
                            478 void CodegenNeuronCppVisitor::print_nrn_init(bool skip_init_check) {
                            +
                            479  codegen = true;
                            +
                            480  printer->add_newline(2);
                            +
                            481  printer->add_line("/** initialize channel */");
                            482 
                            -
                            483 
                            -
                            484 void CodegenNeuronCppVisitor::print_nrn_init(bool skip_init_check) {
                            -
                            485  codegen = true;
                            -
                            486  printer->add_newline(2);
                            -
                            487  printer->add_line("/** initialize channel */");
                            -
                            488 
                            -
                            489  printer->fmt_line(
                            -
                            490  "static void {}(_nrn_model_sorted_token const& _sorted_token, NrnThread* _nt, Memb_list* "
                            -
                            491  "_ml_arg, int _type) {{}}",
                            -
                            492  method_name(naming::NRN_INIT_METHOD));
                            -
                            493 
                            -
                            494  codegen = false;
                            -
                            495 }
                            -
                            496 
                            -
                            497 
                            - -
                            499  printer->add_newline(2);
                            -
                            500  printer->add_line("/** nrn_jacob function */");
                            +
                            483  printer->fmt_line(
                            +
                            484  "static void {}(_nrn_model_sorted_token const& _sorted_token, NrnThread* _nt, Memb_list* "
                            +
                            485  "_ml_arg, int _type) {{}}",
                            +
                            486  method_name(naming::NRN_INIT_METHOD));
                            +
                            487 
                            +
                            488  codegen = false;
                            +
                            489 }
                            +
                            490 
                            +
                            491 
                            + +
                            493  printer->add_newline(2);
                            +
                            494  printer->add_line("/** nrn_jacob function */");
                            +
                            495 
                            +
                            496  printer->fmt_line(
                            +
                            497  "static void {}(_nrn_model_sorted_token const& _sorted_token, NrnThread* "
                            +
                            498  "_nt, Memb_list* _ml_arg, int _type) {{}}",
                            +
                            499  method_name(naming::NRN_JACOB_METHOD));
                            +
                            500 }
                            501 
                            -
                            502  printer->fmt_line(
                            -
                            503  "static void {}(_nrn_model_sorted_token const& _sorted_token, NrnThread* "
                            -
                            504  "_nt, Memb_list* _ml_arg, int _type) {{}}",
                            -
                            505  method_name(naming::NRN_JACOB_METHOD));
                            +
                            502 
                            +
                            503 /// TODO: Edit for NEURON
                            + +
                            505  return;
                            506 }
                            507 
                            508 
                            509 /// TODO: Edit for NEURON
                            - +
                            511  return;
                            512 }
                            513 
                            514 
                            -
                            515 /// TODO: Edit for NEURON
                            - -
                            517  return;
                            -
                            518 }
                            -
                            519 
                            -
                            520 
                            -
                            521 /// TODO: Print the equivalent of `nrn_alloc_<mech_name>`
                            - -
                            523  printer->add_newline(2);
                            -
                            524  auto method = method_name(naming::NRN_ALLOC_METHOD);
                            -
                            525  printer->fmt_push_block("static void {}(Prop* _prop)", method);
                            -
                            526  printer->add_line("// do nothing");
                            -
                            527  printer->pop_block();
                            -
                            528 }
                            -
                            529 
                            -
                            530 
                            -
                            531 /****************************************************************************************/
                            -
                            532 /* Print nrn_state routine */
                            -
                            533 /****************************************************************************************/
                            -
                            534 
                            -
                            535 
                            -
                            536 /// TODO: Edit for NEURON
                            - -
                            538  if (!nrn_state_required()) {
                            -
                            539  return;
                            -
                            540  }
                            -
                            541  codegen = true;
                            -
                            542  printer->add_newline(2);
                            -
                            543 
                            -
                            544  printer->fmt_line(
                            -
                            545  "void {}(_nrn_model_sorted_token const& _sorted_token, NrnThread* _nt, Memb_list* "
                            -
                            546  "_ml_arg, int _type) {{}}",
                            -
                            547  method_name(naming::NRN_STATE_METHOD));
                            -
                            548 
                            -
                            549  /// TODO: Fill in
                            -
                            550 
                            -
                            551  codegen = false;
                            -
                            552 }
                            -
                            553 
                            -
                            554 
                            -
                            555 /****************************************************************************************/
                            -
                            556 /* Print nrn_cur related routines */
                            -
                            557 /****************************************************************************************/
                            +
                            515 /// TODO: Print the equivalent of `nrn_alloc_<mech_name>`
                            + +
                            517  printer->add_newline(2);
                            +
                            518  auto method = method_name(naming::NRN_ALLOC_METHOD);
                            +
                            519  printer->fmt_push_block("static void {}(Prop* _prop)", method);
                            +
                            520  printer->add_line("// do nothing");
                            +
                            521  printer->pop_block();
                            +
                            522 }
                            +
                            523 
                            +
                            524 
                            +
                            525 /****************************************************************************************/
                            +
                            526 /* Print nrn_state routine */
                            +
                            527 /****************************************************************************************/
                            +
                            528 
                            +
                            529 
                            +
                            530 /// TODO: Edit for NEURON
                            + +
                            532  if (!nrn_state_required()) {
                            +
                            533  return;
                            +
                            534  }
                            +
                            535  codegen = true;
                            +
                            536  printer->add_newline(2);
                            +
                            537 
                            +
                            538  printer->fmt_line(
                            +
                            539  "void {}(_nrn_model_sorted_token const& _sorted_token, NrnThread* _nt, Memb_list* "
                            +
                            540  "_ml_arg, int _type) {{}}",
                            +
                            541  method_name(naming::NRN_STATE_METHOD));
                            +
                            542 
                            +
                            543  /// TODO: Fill in
                            +
                            544 
                            +
                            545  codegen = false;
                            +
                            546 }
                            +
                            547 
                            +
                            548 
                            +
                            549 /****************************************************************************************/
                            +
                            550 /* Print nrn_cur related routines */
                            +
                            551 /****************************************************************************************/
                            +
                            552 
                            +
                            553 
                            +
                            554 /// TODO: Edit for NEURON
                            + +
                            556  return;
                            +
                            557 }
                            558 
                            559 
                            560 /// TODO: Edit for NEURON
                            - +
                            562  return;
                            563 }
                            564 
                            565 
                            566 /// TODO: Edit for NEURON
                            - +
                            568  return;
                            569 }
                            570 
                            571 
                            572 /// TODO: Edit for NEURON
                            - +
                            574  return;
                            575 }
                            576 
                            577 
                            578 /// TODO: Edit for NEURON
                            - +
                            580  return;
                            581 }
                            582 
                            583 
                            584 /// TODO: Edit for NEURON
                            - -
                            586  return;
                            -
                            587 }
                            -
                            588 
                            -
                            589 
                            -
                            590 /// TODO: Edit for NEURON
                            - -
                            592  if (!nrn_cur_required()) {
                            -
                            593  return;
                            -
                            594  }
                            -
                            595 
                            -
                            596  printer->add_newline(2);
                            -
                            597 
                            -
                            598  printer->fmt_line(
                            -
                            599  "void {}(_nrn_model_sorted_token const& _sorted_token, NrnThread* _nt, Memb_list* _ml_arg, "
                            -
                            600  "int _type) {{}}",
                            -
                            601  method_name(naming::NRN_CUR_METHOD));
                            -
                            602 
                            -
                            603  /// TODO: Fill in
                            -
                            604 }
                            -
                            605 
                            -
                            606 
                            -
                            607 /****************************************************************************************/
                            -
                            608 /* Main code printing entry points */
                            -
                            609 /****************************************************************************************/
                            + +
                            586  if (!nrn_cur_required()) {
                            +
                            587  return;
                            +
                            588  }
                            +
                            589 
                            +
                            590  printer->add_newline(2);
                            +
                            591 
                            +
                            592  printer->fmt_line(
                            +
                            593  "void {}(_nrn_model_sorted_token const& _sorted_token, NrnThread* _nt, Memb_list* _ml_arg, "
                            +
                            594  "int _type) {{}}",
                            +
                            595  method_name(naming::NRN_CUR_METHOD));
                            +
                            596 
                            +
                            597  /// TODO: Fill in
                            +
                            598 }
                            +
                            599 
                            +
                            600 
                            +
                            601 /****************************************************************************************/
                            +
                            602 /* Main code printing entry points */
                            +
                            603 /****************************************************************************************/
                            +
                            604 
                            + +
                            606  print_standard_includes();
                            +
                            607  print_neuron_includes();
                            +
                            608 }
                            +
                            609 
                            610 
                            - -
                            612  print_standard_includes();
                            -
                            613  print_neuron_includes();
                            + +
                            612  print_global_macros();
                            +
                            613  print_mechanism_variables_macros();
                            614 }
                            615 
                            616 
                            - -
                            618  print_global_macros();
                            -
                            619  print_mechanism_variables_macros();
                            -
                            620 }
                            -
                            621 
                            -
                            622 
                            - -
                            624  printer->add_newline();
                            -
                            625  printer->add_line("/* NEURON global macro definitions */");
                            -
                            626  if (info.vectorize) {
                            -
                            627  printer->add_multi_line(R"CODE(
                            -
                            628  /* VECTORIZED */
                            -
                            629  #define NRN_VECTORIZED 1
                            -
                            630  )CODE");
                            -
                            631  } else {
                            -
                            632  printer->add_multi_line(R"CODE(
                            -
                            633  /* NOT VECTORIZED */
                            -
                            634  #define NRN_VECTORIZED 0
                            -
                            635  )CODE");
                            -
                            636  }
                            -
                            637 }
                            -
                            638 
                            -
                            639 
                            - -
                            641  printer->add_newline();
                            -
                            642  printer->add_line("static constexpr auto number_of_datum_variables = ",
                            -
                            643  std::to_string(int_variables_size()),
                            -
                            644  ";");
                            -
                            645  printer->add_line("static constexpr auto number_of_floating_point_variables = ",
                            -
                            646  std::to_string(float_variables_size()),
                            -
                            647  ";");
                            -
                            648  printer->add_newline();
                            -
                            649  printer->add_multi_line(R"CODE(
                            -
                            650  namespace {
                            + +
                            618  printer->add_newline();
                            +
                            619  printer->add_line("/* NEURON global macro definitions */");
                            +
                            620  if (info.vectorize) {
                            +
                            621  printer->add_multi_line(R"CODE(
                            +
                            622  /* VECTORIZED */
                            +
                            623  #define NRN_VECTORIZED 1
                            +
                            624  )CODE");
                            +
                            625  } else {
                            +
                            626  printer->add_multi_line(R"CODE(
                            +
                            627  /* NOT VECTORIZED */
                            +
                            628  #define NRN_VECTORIZED 0
                            +
                            629  )CODE");
                            +
                            630  }
                            +
                            631 }
                            +
                            632 
                            +
                            633 
                            + +
                            635  printer->add_newline();
                            +
                            636  printer->add_line("static constexpr auto number_of_datum_variables = ",
                            +
                            637  std::to_string(int_variables_size()),
                            +
                            638  ";");
                            +
                            639  printer->add_line("static constexpr auto number_of_floating_point_variables = ",
                            +
                            640  std::to_string(float_variables_size()),
                            +
                            641  ";");
                            +
                            642  printer->add_newline();
                            +
                            643  printer->add_multi_line(R"CODE(
                            +
                            644  namespace {
                            +
                            645  template <typename T>
                            +
                            646  using _nrn_mechanism_std_vector = std::vector<T>;
                            +
                            647  using _nrn_model_sorted_token = neuron::model_sorted_token;
                            +
                            648  using _nrn_mechanism_cache_range = neuron::cache::MechanismRange<number_of_floating_point_variables, number_of_datum_variables>;
                            +
                            649  using _nrn_mechanism_cache_instance = neuron::cache::MechanismInstance<number_of_floating_point_variables, number_of_datum_variables>;
                            +
                            650  using _nrn_non_owning_id_without_container = neuron::container::non_owning_identifier_without_container;
                            651  template <typename T>
                            -
                            652  using _nrn_mechanism_std_vector = std::vector<T>;
                            -
                            653  using _nrn_model_sorted_token = neuron::model_sorted_token;
                            -
                            654  using _nrn_mechanism_cache_range = neuron::cache::MechanismRange<number_of_floating_point_variables, number_of_datum_variables>;
                            -
                            655  using _nrn_mechanism_cache_instance = neuron::cache::MechanismInstance<number_of_floating_point_variables, number_of_datum_variables>;
                            -
                            656  using _nrn_non_owning_id_without_container = neuron::container::non_owning_identifier_without_container;
                            -
                            657  template <typename T>
                            -
                            658  using _nrn_mechanism_field = neuron::mechanism::field<T>;
                            -
                            659  template <typename... Args>
                            -
                            660  void _nrn_mechanism_register_data_fields(Args&&... args) {
                            -
                            661  neuron::mechanism::register_data_fields(std::forward<Args>(args)...);
                            -
                            662  }
                            -
                            663  } // namespace
                            -
                            664  )CODE");
                            -
                            665  /// TODO: More prints here?
                            -
                            666 }
                            +
                            652  using _nrn_mechanism_field = neuron::mechanism::field<T>;
                            +
                            653  template <typename... Args>
                            +
                            654  void _nrn_mechanism_register_data_fields(Args&&... args) {
                            +
                            655  neuron::mechanism::register_data_fields(std::forward<Args>(args)...);
                            +
                            656  }
                            +
                            657  } // namespace
                            +
                            658  )CODE");
                            +
                            659  /// TODO: More prints here?
                            +
                            660 }
                            +
                            661 
                            +
                            662 
                            + +
                            664  print_namespace_start();
                            +
                            665 }
                            +
                            666 
                            667 
                            -
                            668 
                            - -
                            670  print_namespace_start();
                            -
                            671 }
                            + +
                            669  print_namespace_stop();
                            +
                            670 }
                            +
                            671 
                            672 
                            -
                            673 
                            - -
                            675  print_namespace_stop();
                            +
                            673 void CodegenNeuronCppVisitor::print_data_structures(bool print_initializers) {
                            +
                            674  print_mechanism_global_var_structure(print_initializers);
                            +
                            675  print_mechanism_range_var_structure(print_initializers);
                            676 }
                            677 
                            678 
                            -
                            679 void CodegenNeuronCppVisitor::print_data_structures(bool print_initializers) {
                            -
                            680  print_mechanism_global_var_structure(print_initializers);
                            -
                            681  print_mechanism_range_var_structure(print_initializers);
                            -
                            682 }
                            -
                            683 
                            -
                            684 
                            - -
                            686  if (!info.vectorize) {
                            -
                            687  return;
                            -
                            688  }
                            -
                            689  printer->add_multi_line(R"CODE(
                            -
                            690  #if NRN_PRCELLSTATE
                            -
                            691  inst->v_unused[id] = v;
                            -
                            692  #endif
                            -
                            693  )CODE");
                            -
                            694 }
                            -
                            695 
                            -
                            696 
                            - -
                            698  printer->add_multi_line(R"CODE(
                            -
                            699  #if NRN_PRCELLSTATE
                            -
                            700  inst->g_unused[id] = g;
                            -
                            701  #endif
                            -
                            702  )CODE");
                            -
                            703 }
                            -
                            704 
                            -
                            705 
                            -
                            706 /// TODO: Edit for NEURON
                            - -
                            708  print_nrn_init();
                            -
                            709  print_nrn_cur();
                            -
                            710  print_nrn_state();
                            -
                            711  print_nrn_jacob();
                            -
                            712 }
                            -
                            713 
                            -
                            714 
                            -
                            715 /// TODO: Edit for NEURON
                            - -
                            717  codegen = true;
                            -
                            718  print_backend_info();
                            -
                            719  print_headers_include();
                            -
                            720  print_macro_definitions();
                            -
                            721  print_namespace_begin();
                            -
                            722  print_nmodl_constants();
                            -
                            723  print_prcellstate_macros();
                            -
                            724  print_mechanism_info();
                            -
                            725  print_data_structures(true);
                            -
                            726  print_nrn_alloc();
                            -
                            727  print_global_variables_for_hoc();
                            -
                            728  print_compute_functions(); // only nrn_cur and nrn_state
                            -
                            729  print_sdlists_init(true);
                            -
                            730  print_mechanism_register();
                            -
                            731  print_namespace_end();
                            -
                            732  codegen = false;
                            -
                            733 }
                            -
                            734 
                            -
                            735 
                            -
                            736 /****************************************************************************************/
                            -
                            737 /* Overloaded visitor routines */
                            -
                            738 /****************************************************************************************/
                            -
                            739 
                            -
                            740 
                            -
                            741 /// TODO: Edit for NEURON
                            - -
                            743  return;
                            -
                            744 }
                            + +
                            680  if (!info.vectorize) {
                            +
                            681  return;
                            +
                            682  }
                            +
                            683  printer->add_multi_line(R"CODE(
                            +
                            684  #if NRN_PRCELLSTATE
                            +
                            685  inst->v_unused[id] = v;
                            +
                            686  #endif
                            +
                            687  )CODE");
                            +
                            688 }
                            +
                            689 
                            +
                            690 
                            + +
                            692  printer->add_multi_line(R"CODE(
                            +
                            693  #if NRN_PRCELLSTATE
                            +
                            694  inst->g_unused[id] = g;
                            +
                            695  #endif
                            +
                            696  )CODE");
                            +
                            697 }
                            +
                            698 
                            +
                            699 
                            +
                            700 /// TODO: Edit for NEURON
                            + +
                            702  print_nrn_init();
                            +
                            703  print_nrn_cur();
                            +
                            704  print_nrn_state();
                            +
                            705  print_nrn_jacob();
                            +
                            706 }
                            +
                            707 
                            +
                            708 
                            +
                            709 /// TODO: Edit for NEURON
                            + +
                            711  codegen = true;
                            +
                            712  print_backend_info();
                            +
                            713  print_headers_include();
                            +
                            714  print_macro_definitions();
                            +
                            715  print_namespace_begin();
                            +
                            716  print_nmodl_constants();
                            +
                            717  print_prcellstate_macros();
                            +
                            718  print_mechanism_info();
                            +
                            719  print_data_structures(true);
                            +
                            720  print_nrn_alloc();
                            +
                            721  print_global_variables_for_hoc();
                            +
                            722  print_compute_functions(); // only nrn_cur and nrn_state
                            +
                            723  print_sdlists_init(true);
                            +
                            724  print_mechanism_register();
                            +
                            725  print_namespace_end();
                            +
                            726  codegen = false;
                            +
                            727 }
                            +
                            728 
                            + +
                            730  throw std::runtime_error("Not implemented.");
                            +
                            731 }
                            +
                            732 
                            + +
                            734  throw std::runtime_error("Not implemented.");
                            +
                            735 }
                            +
                            736 
                            + +
                            738  throw std::runtime_error("Not implemented.");
                            +
                            739 }
                            +
                            740 
                            +
                            741 
                            +
                            742 /****************************************************************************************/
                            +
                            743 /* Overloaded visitor routines */
                            +
                            744 /****************************************************************************************/
                            745 
                            746 
                            747 /// TODO: Edit for NEURON
                            - +
                            749  return;
                            750 }
                            751 
                            -
                            752 
                            -
                            753 } // namespace codegen
                            -
                            754 } // namespace nmodl
                            +
                            752 
                            +
                            753 /// TODO: Edit for NEURON
                            + +
                            755  return;
                            +
                            756 }
                            +
                            757 
                            +
                            758 
                            +
                            759 } // namespace codegen
                            +
                            760 } // namespace nmodl
                            -
                            const char * external_method_parameters(bool table=false) noexcept override
                            Parameters for functions in generated code that are called back from external code.
                            -
                            void print_nrn_destructor() override
                            Print nrn_destructor function definition.
                            -
                            void print_nrn_cur_non_conductance_kernel() override
                            Print the nrn_cur kernel without NMODL conductance keyword provisions.
                            +
                            const char * external_method_parameters(bool table=false) noexcept override
                            Parameters for functions in generated code that are called back from external code.
                            +
                            void print_nrn_destructor() override
                            Print nrn_destructor function definition.
                            +
                            void print_nrn_cur_non_conductance_kernel() override
                            Print the nrn_cur kernel without NMODL conductance keyword provisions.
                            Helper to represent information about index/int variables.
                            -
                            void print_nrn_cur() override
                            Print nrn_cur / current update function definition.
                            -
                            void print_macro_definitions()
                            Print all NEURON macros.
                            +
                            void print_nrn_cur() override
                            Print nrn_cur / current update function definition.
                            +
                            void print_macro_definitions()
                            Print all NEURON macros.
                            -
                            void print_neuron_includes()
                            Print includes from NEURON.
                            +
                            void print_net_event_call(const ast::FunctionCall &node) override
                            Print call to net_event.
                            +
                            void print_neuron_includes()
                            Print includes from NEURON.
                            static constexpr char NRN_JACOB_METHOD[]
                            nrn_jacob method in generated code
                            -
                            void print_nrn_init(bool skip_init_check=true)
                            Print the nrn_init function definition.
                            -
                            std::string internal_method_arguments() override
                            Arguments for functions that are defined and used internally.
                            +
                            void print_nrn_init(bool skip_init_check=true)
                            Print the nrn_init function definition.
                            +
                            std::string internal_method_arguments() override
                            Arguments for functions that are defined and used internally.
                            std::shared_ptr< symtab::Symbol > SymbolType
                            -
                            void print_nrn_alloc() override
                            Print nrn_alloc function definition.
                            -
                            std::string register_mechanism_arguments() const override
                            Arguments for register_mech or point_register_mech function.
                            +
                            void print_nrn_alloc() override
                            Print nrn_alloc function definition.
                            +
                            std::string register_mechanism_arguments() const override
                            Arguments for register_mech or point_register_mech function.
                            int position_of_int_var(const std::string &name) const override
                            Determine the position in the data array for a given int variable.
                            -
                            ParamVector internal_method_parameters() override
                            Parameters for internally defined functions.
                            +
                            ParamVector internal_method_parameters() override
                            Parameters for internally defined functions.
                            encapsulates code generation backend implementations
                            Definition: ast_common.hpp:26
                            -
                            std::string global_variable_name(const SymbolType &symbol, bool use_instance=true) const override
                            Determine the variable name for a global variable given its symbol.
                            -
                            std::string nrn_thread_internal_arguments() override
                            Arguments for "_threadargs_" macro in neuron implementation.
                            +
                            std::string global_variable_name(const SymbolType &symbol, bool use_instance=true) const override
                            Determine the variable name for a global variable given its symbol.
                            +
                            std::string nrn_thread_internal_arguments() override
                            Arguments for "_threadargs_" macro in neuron implementation.
                            Visitor for printing C++ code compatible with legacy api of NEURON
                            virtual std::string backend_name() const override
                            Name of the code generation backend.
                            -
                            std::string process_verbatim_text(std::string const &text) override
                            Process a verbatim block for possible variable renaming.
                            -
                            void print_g_unused() const override
                            Set g_unused (conductance) for NRN_PRCELLSTATE feature.
                            -
                            virtual void visit_watch_statement(const ast::WatchStatement &node) override
                            TODO: Edit for NEURON.
                            +
                            std::string process_verbatim_text(std::string const &text) override
                            Process a verbatim block for possible variable renaming.
                            +
                            void print_g_unused() const override
                            Set g_unused (conductance) for NRN_PRCELLSTATE feature.
                            +
                            virtual void visit_watch_statement(const ast::WatchStatement &node) override
                            TODO: Edit for NEURON.
                            +
                            void print_net_send_call(const ast::FunctionCall &node) override
                            Print call to net_send.
                            Implement string manipulation functions.
                            -
                            void print_namespace_end() override
                            Print end of namespaces.
                            -
                            void print_nrn_state() override
                            Print nrn_state / state update function definition.
                            +
                            void print_namespace_end() override
                            Print end of namespaces.
                            +
                            void print_net_move_call(const ast::FunctionCall &node) override
                            Print call to net_move.
                            +
                            void print_nrn_state() override
                            Print nrn_state / state update function definition.
                            static constexpr char NRN_ALLOC_METHOD[]
                            nrn_alloc method in generated code
                            static const std::string GIT_REVISION
                            git revision id
                            Definition: config.h:33
                            -
                            virtual void print_global_function_common_code(BlockType type, const std::string &function_name="") override
                            Print common code for global functions like nrn_init, nrn_cur and nrn_state.
                            -
                            std::string float_variable_name(const SymbolType &symbol, bool use_instance) const override
                            Determine the name of a float variable given its symbol.
                            -
                            void print_function(const ast::FunctionBlock &node) override
                            Print NMODL function in target backend code.
                            -
                            void print_v_unused() const override
                            Set v_unused (voltage) for NRN_PRCELLSTATE feature.
                            +
                            virtual void print_global_function_common_code(BlockType type, const std::string &function_name="") override
                            Print common code for global functions like nrn_init, nrn_cur and nrn_state.
                            +
                            std::string float_variable_name(const SymbolType &symbol, bool use_instance) const override
                            Determine the name of a float variable given its symbol.
                            +
                            void print_function(const ast::FunctionBlock &node) override
                            Print NMODL function in target backend code.
                            +
                            void print_v_unused() const override
                            Set v_unused (voltage) for NRN_PRCELLSTATE feature.
                            Base class for all block scoped nodes.
                            Definition: block.hpp:41
                            static std::string trim(std::string text)
                            Utility functions for visitors implementation.
                            static constexpr char USE_TABLE_VARIABLE[]
                            global variable to indicate if table is used
                            Represent WATCH statement in NMODL.
                            Represents a BREAKPOINT block in NMODL.
                            -
                            void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
                            Print the nrn_cur kernel with NMODL conductance keyword provisions.
                            -
                            std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const override
                            Determine the name of an int variable given its symbol.
                            -
                            void print_namespace_begin() override
                            Print start of namespaces.
                            +
                            void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
                            Print the nrn_cur kernel with NMODL conductance keyword provisions.
                            +
                            std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const override
                            Determine the name of an int variable given its symbol.
                            +
                            void print_namespace_begin() override
                            Print start of namespaces.
                            -
                            void print_global_variables_for_hoc() override
                            Print byte arrays that register scalar and vector variables for hoc interface.
                            -
                            void print_function_call(const ast::FunctionCall &node) override
                            Print call to internal or external function.
                            -
                            void print_standard_includes() override
                            Print standard C/C++ includes.
                            -
                            void print_mechanism_range_var_structure(bool print_initializers) override
                            Print the structure that wraps all range and int variables required for the NMODL.
                            -
                            virtual void print_procedure(const ast::ProcedureBlock &node) override
                            Print NMODL procedure in target backend code.
                            -
                            void print_namespace_start() override
                            Prints the start of the neuron namespace.
                            -
                            void print_backend_info() override
                            Print top file header printed in generated code.
                            +
                            void print_global_variables_for_hoc() override
                            Print byte arrays that register scalar and vector variables for hoc interface.
                            +
                            void print_standard_includes() override
                            Print standard C/C++ includes.
                            +
                            void print_mechanism_range_var_structure(bool print_initializers) override
                            Print the structure that wraps all range and int variables required for the NMODL.
                            +
                            virtual void print_procedure(const ast::ProcedureBlock &node) override
                            Print NMODL procedure in target backend code.
                            +
                            void print_namespace_start() override
                            Prints the start of the neuron namespace.
                            +
                            void print_backend_info() override
                            Print top file header printed in generated code.
                            std::string to_string(const T &obj)
                            -
                            virtual void print_compute_functions() override
                            Print all compute functions for every backend.
                            +
                            virtual void print_compute_functions() override
                            Print all compute functions for every backend.
                            static constexpr char NRN_INIT_METHOD[]
                            nrn_init method in generated code
                            -
                            void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
                            Print main body of nrn_cur function.
                            +
                            void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
                            Print main body of nrn_cur function.
                            static constexpr char NRN_CUR_METHOD[]
                            nrn_cur method in generated code
                            -
                            void print_mechanism_register() override
                            Print the mechanism registration function.
                            +
                            void print_mechanism_register() override
                            Print the mechanism registration function.
                            Implement utility functions for codegen visitors.
                            -
                            void print_nrn_jacob()
                            Print nrn_jacob function definition.
                            -
                            virtual void print_fast_imem_calculation() override
                            Print fast membrane current calculation code.
                            -
                            void print_data_structures(bool print_initializers) override
                            Print all classes.
                            -
                            void print_sdlists_init(bool print_initializers) override
                            +
                            void print_nrn_jacob()
                            Print nrn_jacob function definition.
                            +
                            virtual void print_fast_imem_calculation() override
                            Print fast membrane current calculation code.
                            +
                            void print_data_structures(bool print_initializers) override
                            Print all classes.
                            +
                            void print_sdlists_init(bool print_initializers) override
                            virtual void print_atomic_reduction_pragma() override
                            Print atomic update pragma for reduction statements.
                            NmodlType
                            NMODL variable properties.
                            -
                            void print_namespace_stop() override
                            Prints the end of the neuron namespace.
                            +
                            void print_namespace_stop() override
                            Prints the end of the neuron namespace.
                            -
                            void print_mechanism_variables_macros()
                            Print mechanism variables' related macros.
                            -
                            virtual void visit_solution_expression(const ast::SolutionExpression &node) override
                            TODO: Edit for NEURON.
                            -
                            void print_nrn_constructor() override
                            Print nrn_constructor function definition.
                            +
                            void print_mechanism_variables_macros()
                            Print mechanism variables' related macros.
                            +
                            virtual void visit_solution_expression(const ast::SolutionExpression &node) override
                            TODO: Edit for NEURON.
                            +
                            void print_nrn_constructor() override
                            Print nrn_constructor function definition.
                            static const std::string NMODL_VERSION
                            project tagged version in the cmake
                            Definition: config.h:36
                            Represent solution of a block in the AST.
                            BlockType
                            Helper to represent various block types.
                            -
                            void print_function_or_procedure(const ast::Block &node, const std::string &name) override
                            Print nmodl function or procedure (common code)
                            -
                            void print_headers_include() override
                            Print all includes.
                            +
                            void print_function_or_procedure(const ast::Block &node, const std::string &name) override
                            Print nmodl function or procedure (common code)
                            +
                            void print_headers_include() override
                            Print all includes.
                            static constexpr char NRN_STATE_METHOD[]
                            nrn_state method in generated code
                            Version information and units file path.
                            -
                            void print_nrn_current(const ast::BreakpointBlock &node) override
                            Print the nrn_current kernel.
                            +
                            void print_nrn_current(const ast::BreakpointBlock &node) override
                            Print the nrn_current kernel.
                            int position_of_float_var(const std::string &name) const override
                            Determine the position in the data array for a given float variable.
                            -
                            std::string get_variable_name(const std::string &name, bool use_instance=true) const override
                            Determine variable name in the structure of mechanism properties.
                            +
                            std::string get_variable_name(const std::string &name, bool use_instance=true) const override
                            Determine variable name in the structure of mechanism properties.
                            std::string simulator_name() override
                            Name of the simulator the code was generated for.
                            -
                            void print_function_procedure_helper(const ast::Block &node) override
                            Common helper function to help printing function or procedure blocks.
                            -
                            const char * external_method_arguments() noexcept override
                            Arguments for external functions called from generated code.
                            -
                            std::string nrn_thread_arguments() const override
                            Arguments for "_threadargs_" macro in neuron implementation.
                            -
                            void print_codegen_routines() override
                            Print entry point to code generation.
                            +
                            void print_function_procedure_helper(const ast::Block &node) override
                            Common helper function to help printing function or procedure blocks.
                            +
                            const char * external_method_arguments() noexcept override
                            Arguments for external functions called from generated code.
                            +
                            std::string nrn_thread_arguments() const override
                            Arguments for "_threadargs_" macro in neuron implementation.
                            +
                            void print_codegen_routines() override
                            Print entry point to code generation.
                            static constexpr char NRN_POINTERINDEX[]
                            hoc_nrnpointerindex name
                            Auto generated AST classes declaration.
                            -
                            void print_function_prototypes() override
                            Print function and procedures prototype declaration.
                            -
                            void print_mechanism_global_var_structure(bool print_initializers) override
                            Print the structure that wraps all global variables used in the NMODL.
                            -
                            void print_global_macros()
                            Print NEURON global variable macros.
                            +
                            void print_function_prototypes() override
                            Print function and procedures prototype declaration.
                            +
                            void print_mechanism_global_var_structure(bool print_initializers) override
                            Print the structure that wraps all global variables used in the NMODL.
                            +
                            void print_global_macros()
                            Print NEURON global variable macros.
                            std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
                            A vector of parameters represented by a 4-tuple of strings:
                            diff --git a/html/doxygen/src_2main_8cpp_source.html b/html/doxygen/src_2main_8cpp_source.html index ca42e4a826..eb04f6a092 100644 --- a/html/doxygen/src_2main_8cpp_source.html +++ b/html/doxygen/src_2main_8cpp_source.html @@ -716,7 +716,7 @@
                            Visitor to inline local procedure and function calls
                            Version information and units file path.
                            -
                            void visit_program(const ast::Program &program) override
                            Main and only member function to call after creating an instance of this class.
                            +
                            void visit_program(const ast::Program &program) override
                            Main and only member function to call after creating an instance of this class.
                            Represents top level AST node for whole NMODL input.
                            Definition: program.hpp:39
                            bool sparse_solver_exists(const ast::Ast &node)
                            THIS FILE IS GENERATED AT BUILD TIME AND SHALL NOT BE EDITED.