From 0e5f12c73cd06af514a09ab2921914c0786a20d5 Mon Sep 17 00:00:00 2001 From: 1uc Date: Fri, 12 Jan 2024 09:28:25 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20BlueBrai?= =?UTF-8?q?n/nmodl@b01e5f7be9c280b3e270cf27975763a3aa2274e7=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 | 10 +- ...dl_1_1codegen_1_1_codegen_acc_visitor.html | 30 +- ...odegen_coreneuron_cpp_visitor-members.html | 10 +- ...en_1_1_codegen_coreneuron_cpp_visitor.html | 400 +- ...egen_1_1_codegen_coreneuron_cpp_visitor.js | 5 - ...degen_1_1_codegen_cpp_visitor-members.html | 417 +- ...dl_1_1codegen_1_1_codegen_cpp_visitor.html | 271 +- ...modl_1_1codegen_1_1_codegen_cpp_visitor.js | 5 + ..._1_codegen_neuron_cpp_visitor-members.html | 6 +- ...odegen_1_1_codegen_neuron_cpp_visitor.html | 51 +- ...1codegen_1_1_codegen_neuron_cpp_visitor.js | 1 - .../codegen__acc__visitor_8cpp_source.html | 22 +- ..._coreneuron__cpp__visitor_8hpp_source.html | 2475 +++---- .../codegen__cpp__visitor_8cpp_source.html | 1469 ++-- .../codegen__cpp__visitor_8hpp_source.html | 1788 ++--- ...gen__neuron__cpp__visitor_8hpp_source.html | 1114 ++- html/doxygen/functions_func_g.html | 4 +- html/doxygen/functions_func_i.html | 5 +- html/doxygen/functions_func_p.html | 4 +- html/doxygen/functions_g.html | 4 +- html/doxygen/functions_i.html | 3 +- html/doxygen/functions_p.html | 4 +- html/doxygen/group__codegen__backends.html | 6 +- html/doxygen/group__codegen__backends.js | 11 +- html/doxygen/namespacenmodl_1_1codegen.html | 8 +- html/doxygen/navtreedata.js | 36 +- html/doxygen/navtreeindex14.js | 42 +- html/doxygen/navtreeindex15.js | 444 +- html/doxygen/navtreeindex16.js | 156 +- html/doxygen/navtreeindex17.js | 4 +- html/doxygen/navtreeindex18.js | 4 +- html/doxygen/navtreeindex19.js | 4 +- html/doxygen/navtreeindex20.js | 4 +- html/doxygen/navtreeindex21.js | 4 +- html/doxygen/navtreeindex22.js | 4 +- html/doxygen/navtreeindex23.js | 4 +- html/doxygen/navtreeindex24.js | 4 +- html/doxygen/navtreeindex25.js | 8 +- html/doxygen/navtreeindex26.js | 52 +- html/doxygen/navtreeindex27.js | 4 +- html/doxygen/navtreeindex28.js | 28 +- html/doxygen/navtreeindex29.js | 14 +- html/doxygen/navtreeindex30.js | 4 +- html/doxygen/navtreeindex31.js | 4 +- html/doxygen/navtreeindex32.js | 4 +- html/doxygen/navtreeindex33.js | 1 - html/doxygen/search/all_14.js | 2 +- html/doxygen/search/all_6.js | 4 +- html/doxygen/search/all_8.js | 2 +- html/doxygen/search/all_f.js | 4 +- html/doxygen/search/functions_6.js | 4 +- html/doxygen/search/functions_8.js | 2 +- html/doxygen/search/functions_f.js | 4 +- ..._coreneuron__cpp__visitor_8cpp_source.html | 6580 ++++++++--------- html/doxygen/src_2main_8cpp_source.html | 2 +- 55 files changed, 7775 insertions(+), 7781 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 5bd538da59..26c7b80495 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 @@ -132,12 +132,12 @@ get_parameter_str(const ParamVector &params)nmodl::codegen::CodegenCppVisitorprotectedstatic get_range_var_float_type(const SymbolType &symbol)nmodl::codegen::CodegenCoreneuronCppVisitorprotected get_variable_name(const std::string &name, bool use_instance=true) const overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - global_struct() constnmodl::codegen::CodegenCoreneuronCppVisitorinlineprotected - global_struct_instance() constnmodl::codegen::CodegenCoreneuronCppVisitorinlineprotected + global_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected + global_struct_instance() constnmodl::codegen::CodegenCppVisitorinlineprotected global_variable_name(const SymbolType &symbol, bool use_instance=true) const overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual has_parameter_of_name(const T &node, const std::string &name)nmodl::codegen::CodegenCppVisitorprotected infonmodl::codegen::CodegenCppVisitorprotected - instance_struct() constnmodl::codegen::CodegenCoreneuronCppVisitorinlineprotected + instance_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual int_variables_size() constnmodl::codegen::CodegenCppVisitorprotected internal_method_arguments() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual @@ -212,8 +212,8 @@ print_get_memb_list()nmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_global_function_common_code(BlockType type, const std::string &function_name="") overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_global_method_annotation()nmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - print_global_var_struct_assertions() constnmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - print_global_var_struct_decl()nmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual + print_global_var_struct_assertions() constnmodl::codegen::CodegenCppVisitorprotectedvirtual + print_global_var_struct_decl()nmodl::codegen::CodegenCppVisitorprotectedvirtual print_global_variable_device_update_annotation() overridenmodl::codegen::CodegenAccVisitorprotectedvirtual print_global_variables_for_hoc() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_headers_include() 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 07b3af9585..0f58a59689 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 @@ -607,15 +607,6 @@ std::string simulator_name () override  Name of the simulator the code was generated for. More...
  -std::string instance_struct () const - Name of structure that wraps range variables. More...
-  -std::string global_struct () const - Name of structure that wraps global variables. More...
-  -std::string global_struct_instance () const - Name of the (host-only) global instance of global_struct More...
-  int num_thread_objects () const noexcept  Determine the number of threads to allocate. More...
  @@ -661,9 +652,6 @@ bool optimize_ion_variable_copies () const  Check if ion variable copies should be avoided. More...
  -virtual void print_global_var_struct_decl () - Instantiate global var instance. More...
-  void print_top_verbatim_blocks ()  Print top level (global scope) verbatim blocks. More...
  @@ -791,9 +779,6 @@ void print_mechanism_global_var_structure (bool print_initializers) override  Print the structure that wraps all global variables used in the NMODL. More...
  -virtual void print_global_var_struct_assertions () const - Print static assertions about the global variable struct. More...
-  void print_global_variables_for_hoc () override  Print byte arrays that register scalar and vector variables for hoc interface. More...
  @@ -961,6 +946,15 @@ std::string nmodl_version () const noexcept  Return Nmodl language version. More...
  +std::string instance_struct () const + Name of structure that wraps range variables. More...
+  +std::string global_struct () const + Name of structure that wraps global variables. More...
+  +std::string global_struct_instance () const + Name of the (host-only) global instance of global_struct More...
+  const char * local_var_type () const noexcept  Data type for the local variables. More...
  @@ -1043,6 +1037,9 @@ std::vector< IndexVariableInfoget_int_variables ()  Determine all int variables required during code generation. More...
  +virtual void print_global_var_struct_decl () + Instantiate global var instance. More...
+  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...
  @@ -1065,6 +1062,9 @@ SymbolType make_symbol (const std::string &name) const  Creates a temporary symbol. More...
  +virtual void print_global_var_struct_assertions () const + Print static assertions about the global variable struct. More...
+  void print_prcellstate_macros () const  Print declaration of macro NRN_PRCELLSTATE for debugging. 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 ae3478e356..77bd8a1464 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 @@ -130,12 +130,12 @@ get_parameter_str(const ParamVector &params)nmodl::codegen::CodegenCppVisitorprotectedstatic get_range_var_float_type(const SymbolType &symbol)nmodl::codegen::CodegenCoreneuronCppVisitorprotected get_variable_name(const std::string &name, bool use_instance=true) const overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - global_struct() constnmodl::codegen::CodegenCoreneuronCppVisitorinlineprotected - global_struct_instance() constnmodl::codegen::CodegenCoreneuronCppVisitorinlineprotected + global_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected + global_struct_instance() constnmodl::codegen::CodegenCppVisitorinlineprotected global_variable_name(const SymbolType &symbol, bool use_instance=true) const overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual has_parameter_of_name(const T &node, const std::string &name)nmodl::codegen::CodegenCppVisitorprotected infonmodl::codegen::CodegenCppVisitorprotected - instance_struct() constnmodl::codegen::CodegenCoreneuronCppVisitorinlineprotected + instance_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual int_variables_size() constnmodl::codegen::CodegenCppVisitorprotected internal_method_arguments() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual @@ -210,8 +210,8 @@ print_get_memb_list()nmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_global_function_common_code(BlockType type, const std::string &function_name="") overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_global_method_annotation()nmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - print_global_var_struct_assertions() constnmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual - print_global_var_struct_decl()nmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual + print_global_var_struct_assertions() constnmodl::codegen::CodegenCppVisitorprotectedvirtual + print_global_var_struct_decl()nmodl::codegen::CodegenCppVisitorprotectedvirtual print_global_variable_device_update_annotation()nmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_global_variables_for_hoc() overridenmodl::codegen::CodegenCoreneuronCppVisitorprotectedvirtual print_headers_include() 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 2ce457ba6e..004ced8ae9 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 @@ -520,15 +520,6 @@ virtual std::string backend_name () const override  Name of the code generation backend. More...
  -std::string instance_struct () const - Name of structure that wraps range variables. More...
-  -std::string global_struct () const - Name of structure that wraps global variables. More...
-  -std::string global_struct_instance () const - Name of the (host-only) global instance of global_struct More...
-  int num_thread_objects () const noexcept  Determine the number of threads to allocate. More...
  @@ -634,9 +625,6 @@ virtual void print_abort_routine () const  Print backend specific abort routine. More...
  -virtual void print_global_var_struct_decl () - Instantiate global var instance. More...
-  virtual void print_instance_struct_transfer_routine_declarations ()  Print declarations of the functions used by print_instance_struct_copy_to_device and print_instance_struct_delete_from_device. More...
  @@ -776,9 +764,6 @@ void print_mechanism_global_var_structure (bool print_initializers) override  Print the structure that wraps all global variables used in the NMODL. More...
  -virtual void print_global_var_struct_assertions () const - Print static assertions about the global variable struct. More...
-  void print_global_variables_for_hoc () override  Print byte arrays that register scalar and vector variables for hoc interface. More...
  @@ -961,6 +946,15 @@ std::string nmodl_version () const noexcept  Return Nmodl language version. More...
  +std::string instance_struct () const + Name of structure that wraps range variables. More...
+  +std::string global_struct () const + Name of structure that wraps global variables. More...
+  +std::string global_struct_instance () const + Name of the (host-only) global instance of global_struct More...
+  const char * local_var_type () const noexcept  Data type for the local variables. More...
  @@ -1043,6 +1037,9 @@ std::vector< IndexVariableInfoget_int_variables ()  Determine all int variables required during code generation. More...
  +virtual void print_global_var_struct_decl () + Instantiate global var instance. More...
+  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...
  @@ -1065,6 +1062,9 @@ SymbolType make_symbol (const std::string &name) const  Creates a temporary symbol. More...
  +virtual void print_global_var_struct_assertions () const + Print static assertions about the global variable struct. More...
+  void print_prcellstate_macros () const  Print declaration of macro NRN_PRCELLSTATE for debugging. More...
  @@ -1298,7 +1298,7 @@

Definition at line 1230 of file codegen_coreneuron_cpp_visitor.hpp.

+

Definition at line 1191 of file codegen_coreneuron_cpp_visitor.hpp.

@@ -1360,7 +1360,7 @@

Definition at line 1252 of file codegen_coreneuron_cpp_visitor.hpp.

+

Definition at line 1213 of file codegen_coreneuron_cpp_visitor.hpp.

@@ -1463,7 +1463,7 @@

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

Definition at line 568 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 563 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1518,7 +1518,7 @@

Returns
The string representing the function call
-

Definition at line 1209 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1204 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1550,7 +1550,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1083 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1078 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1589,7 +1589,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1088 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1083 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1640,7 +1640,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1387 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1382 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1677,7 +1677,7 @@

-

Definition at line 2257 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2239 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1727,65 +1727,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1461 of file codegen_coreneuron_cpp_visitor.cpp.

- - - - -

◆ global_struct()

- -
-
- - - - - -
- - - - - - - -
std::string nmodl::codegen::CodegenCoreneuronCppVisitor::global_struct () const
-
-inlineprotected
-
- -

Name of structure that wraps global variables.

- -

Definition at line 97 of file codegen_coreneuron_cpp_visitor.hpp.

- -
-
- -

◆ global_struct_instance()

- -
-
- - - - - -
- - - - - - - -
std::string nmodl::codegen::CodegenCoreneuronCppVisitor::global_struct_instance () const
-
-inlineprotected
-
- -

Name of the (host-only) global instance of global_struct

- -

Definition at line 105 of file codegen_coreneuron_cpp_visitor.hpp.

+

Definition at line 1456 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1835,36 +1777,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1433 of file codegen_coreneuron_cpp_visitor.cpp.

- - - - -

◆ instance_struct()

- -
-
- - - - - -
- - - - - - - -
std::string nmodl::codegen::CodegenCoreneuronCppVisitor::instance_struct () const
-
-inlineprotected
-
- -

Name of structure that wraps range variables.

- -

Definition at line 89 of file codegen_coreneuron_cpp_visitor.hpp.

+

Definition at line 1428 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1922,7 +1835,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1407 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1402 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1954,7 +1867,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1055 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1050 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -1987,7 +1900,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1066 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1061 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2217,7 +2130,7 @@

Returns
True if operator() is const else False
-

Definition at line 910 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 905 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2247,7 +2160,7 @@

Returns
The target code string
-

Definition at line 3003 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2985 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2309,7 +2222,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1098 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1093 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2341,7 +2254,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1110 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1105 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2370,7 +2283,7 @@

Definition at line 113 of file codegen_coreneuron_cpp_visitor.hpp.

+

Definition at line 89 of file codegen_coreneuron_cpp_visitor.hpp.

@@ -2604,7 +2517,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1534 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1529 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2715,7 +2628,7 @@

Definition at line 2559 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2541 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2800,7 +2713,7 @@

Definition at line 788 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 783 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2831,7 +2744,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3649 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3631 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2860,7 +2773,7 @@

Definition at line 3580 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3562 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2891,7 +2804,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3618 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3600 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2920,7 +2833,7 @@

Definition at line 1565 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1560 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -2958,7 +2871,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3590 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3572 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3027,7 +2940,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 3215 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3197 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3188,7 +3101,7 @@

-

Definition at line 1013 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1008 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3221,7 +3134,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 3495 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3477 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3250,7 +3163,7 @@

Definition at line 1258 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1253 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3288,7 +3201,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 852 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 847 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3337,7 +3250,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 812 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 807 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3375,7 +3288,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 833 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 828 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3406,7 +3319,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 534 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 529 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3442,7 +3355,7 @@

Definition at line 872 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 867 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3478,7 +3391,7 @@

Definition at line 946 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 941 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3507,7 +3420,7 @@

Definition at line 2637 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2619 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3538,7 +3451,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3609 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3591 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3567,7 +3480,7 @@

Definition at line 3008 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2990 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3616,7 +3529,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2433 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2415 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3648,65 +3561,6 @@

Definition at line 450 of file codegen_coreneuron_cpp_visitor.cpp.

- - - -

◆ print_global_var_struct_assertions()

- -
-
- - - - - -
- - - - - - - -
void nmodl::codegen::CodegenCoreneuronCppVisitor::print_global_var_struct_assertions () const
-
-protectedvirtual
-
- -

Print static assertions about the global variable struct.

- -

Definition at line 1808 of file codegen_coreneuron_cpp_visitor.cpp.

- -
-
- -

◆ print_global_var_struct_decl()

- -
-
- - - - - -
- - - - - - - -
void nmodl::codegen::CodegenCoreneuronCppVisitor::print_global_var_struct_decl ()
-
-protectedvirtual
-
- -

Instantiate global var instance.

-

For C++ code generation this is empty

Returns
""
- -

Definition at line 500 of file codegen_coreneuron_cpp_visitor.cpp.

-
@@ -3737,7 +3591,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 2231 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2213 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3769,7 +3623,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1825 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1807 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3800,7 +3654,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3561 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3543 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3837,7 +3691,7 @@

Definition at line 2383 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2365 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -3869,7 +3723,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 409 of file codegen_coreneuron_cpp_visitor.hpp.

+

Definition at line 376 of file codegen_coreneuron_cpp_visitor.hpp.

@@ -3901,7 +3755,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 416 of file codegen_coreneuron_cpp_visitor.hpp.

+

Definition at line 383 of file codegen_coreneuron_cpp_visitor.hpp.

@@ -3932,7 +3786,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 387 of file codegen_coreneuron_cpp_visitor.hpp.

+

Definition at line 354 of file codegen_coreneuron_cpp_visitor.hpp.

@@ -3972,7 +3826,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 401 of file codegen_coreneuron_cpp_visitor.hpp.

+

Definition at line 368 of file codegen_coreneuron_cpp_visitor.hpp.

@@ -3993,7 +3847,7 @@

Definition at line 2273 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2255 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4029,7 +3883,7 @@

Definition at line 2209 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2191 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4058,7 +3912,7 @@

Definition at line 2179 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2161 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4087,7 +3941,7 @@

Definition at line 2226 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2208 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4185,7 +4039,7 @@

Definition at line 1294 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1289 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4227,7 +4081,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1665 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1660 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4265,7 +4119,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2137 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2119 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4305,7 +4159,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1932 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1914 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4334,7 +4188,7 @@

Definition at line 1304 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1299 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4396,7 +4250,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3568 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3550 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4427,7 +4281,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3574 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3556 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4458,7 +4312,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1316 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1311 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4489,7 +4343,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1322 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1317 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4527,7 +4381,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2898 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2880 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4556,7 +4410,7 @@

Definition at line 2950 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2932 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4656,7 +4510,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2871 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2853 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4685,7 +4539,7 @@

Definition at line 3174 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3156 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4714,7 +4568,7 @@

Definition at line 1282 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1277 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4750,7 +4604,7 @@

Definition at line 3029 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3011 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4797,7 +4651,7 @@

Definition at line 2788 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2770 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4826,7 +4680,7 @@

Definition at line 3115 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3097 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4855,7 +4709,7 @@

Definition at line 3017 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2999 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -4884,7 +4738,7 @@

Definition at line 3024 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3006 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5007,7 +4861,7 @@

Definition at line 3087 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3069 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5039,7 +4893,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 3075 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3057 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5071,7 +4925,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 3080 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3062 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5109,7 +4963,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2839 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2821 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5140,7 +4994,7 @@

nmodl::codegen::CodegenAccVisitor.

-

Definition at line 3304 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3286 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5171,7 +5025,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2645 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2627 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5202,7 +5056,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2613 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2595 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5233,7 +5087,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3524 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3506 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5272,7 +5126,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3388 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3370 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5310,7 +5164,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3459 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3441 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5404,7 +5258,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3425 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3407 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5443,7 +5297,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3369 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3351 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5474,7 +5328,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2625 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2607 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5510,7 +5364,7 @@

Definition at line 2484 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2466 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5542,7 +5396,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3314 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3296 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5571,7 +5425,7 @@

Definition at line 1267 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1262 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5609,7 +5463,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 847 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 842 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5670,7 +5524,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1598 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1593 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5699,7 +5553,7 @@

Definition at line 2982 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2964 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5728,7 +5582,7 @@

Definition at line 2236 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2218 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5759,7 +5613,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1554 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1549 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5795,7 +5649,7 @@

Definition at line 582 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 577 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5831,7 +5685,7 @@

Definition at line 679 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 674 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5866,7 +5720,7 @@

Definition at line 1338 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1333 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5895,7 +5749,7 @@

Definition at line 2074 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2056 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5924,7 +5778,7 @@

Definition at line 510 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 505 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5955,7 +5809,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 3597 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3579 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -5987,7 +5841,7 @@

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

Definition at line 2658 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2640 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6018,7 +5872,7 @@

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

need to verify with neuron/coreneuron about rest.

-

Definition at line 2706 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 2688 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6069,7 +5923,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 1237 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1232 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6110,7 +5964,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1151 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1146 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6185,7 +6039,7 @@

Returns
The ion read variable name
-

Definition at line 1197 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1192 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6216,7 +6070,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 1178 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1173 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6255,7 +6109,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 1122 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1117 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6323,7 +6177,7 @@

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

Definition at line 1443 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1438 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6355,7 +6209,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 3680 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3662 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6387,7 +6241,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 3716 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3698 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6419,7 +6273,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 3688 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3670 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6451,7 +6305,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 3742 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3724 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6483,7 +6337,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 3780 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 3762 of file codegen_coreneuron_cpp_visitor.cpp.

@@ -6520,7 +6374,7 @@

Returns
The ion write variable name
-

Definition at line 1203 of file codegen_coreneuron_cpp_visitor.cpp.

+

Definition at line 1198 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 9adafcb61f..0ab113b6a6 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 @@ -11,10 +11,7 @@ var classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor = [ "float_variable_name", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a18e0834ef774dd2bb5e5adc4ff2df5ae", null ], [ "get_range_var_float_type", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1b309a0bd2939736aadba430634ce52d", null ], [ "get_variable_name", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afdb445887173a3e006e72772cfffffbc", null ], - [ "global_struct", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aa2fc9281fb07384c291232a0c940321b", null ], - [ "global_struct_instance", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adb0de3bf29017af8e7337f908d420e85", null ], [ "global_variable_name", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9fad9ac24a10e083b2c5ee7cb168eea4", null ], - [ "instance_struct", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5612c2c74fb6784c5f1794259573bd64", null ], [ "int_variable_name", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a328753b743f89bbdf4123c462d63ba0c", null ], [ "internal_method_arguments", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7d14e3cc08441dc6b3bd64f0ca0a13ba", null ], [ "internal_method_parameters", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af48766525e3a1c8f88471a9338ae59e7", null ], @@ -67,8 +64,6 @@ var classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor = [ "print_get_memb_list", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2973dd8bba370083e1bfe449a70359ee", null ], [ "print_global_function_common_code", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3fb561fbaba6ab77da1d69e531eac7d5", null ], [ "print_global_method_annotation", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adaab88b7b51f2a19bd8a12403766be0a", null ], - [ "print_global_var_struct_assertions", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afe423982c31b15f80905df718709856a", null ], - [ "print_global_var_struct_decl", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a12b568597656cbb1ed593856f1e30b3e", null ], [ "print_global_variable_device_update_annotation", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acad81499ea14286cb3f598ee56a7930e", null ], [ "print_global_variables_for_hoc", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a16415780703b2653d6e4c29dba3ee7f9", null ], [ "print_headers_include", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6f5682b33a0230cf3a068290df144831", 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 d95f7c1af5..9cdb72b3e7 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 @@ -124,215 +124,220 @@ get_int_variables()nmodl::codegen::CodegenCppVisitorprotected get_parameter_str(const ParamVector &params)nmodl::codegen::CodegenCppVisitorprotectedstatic get_variable_name(const std::string &name, bool use_instance=true) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + global_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected + global_struct_instance() constnmodl::codegen::CodegenCppVisitorinlineprotected global_variable_name(const SymbolType &symbol, bool use_instance=true) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual has_parameter_of_name(const T &node, const std::string &name)nmodl::codegen::CodegenCppVisitorprotected infonmodl::codegen::CodegenCppVisitorprotected - int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - int_variables_size() constnmodl::codegen::CodegenCppVisitorprotected - internal_method_arguments()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - internal_method_call_encounterednmodl::codegen::CodegenCppVisitorprotected - internal_method_parameters()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - is_net_event(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - is_net_move(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - is_net_send(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - local_var_type() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - make_symbol(const std::string &name) constnmodl::codegen::CodegenCppVisitorinlineprotected - method_name(const std::string &name) constnmodl::codegen::CodegenCppVisitorinlineprotected - mod_filenamenmodl::codegen::CodegenCppVisitorprotected - need_semicolon(const ast::Statement &node)nmodl::codegen::CodegenCppVisitorprotectedstatic - net_receive_buffering_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - net_receive_exist() const noexceptnmodl::codegen::CodegenCppVisitorprotected - net_receive_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - net_send_buffer_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - nmodl_version() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - nrn_cur_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - nrn_state_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - nrn_thread_arguments() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - nrn_thread_internal_arguments()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - operator_for_d() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - operator_for_rhs() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - optimize_ionvar_copiesnmodl::codegen::CodegenCppVisitorprotected - ParamVector typedefnmodl::codegen::CodegenCppVisitorprotected - position_of_float_var(const std::string &name) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - position_of_int_var(const std::string &name) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_atomic_reduction_pragma()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_backend_info()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_codegen_routines()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_compute_functions()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - 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)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 - print_g_unused() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_global_function_common_code(BlockType type, const std::string &function_name="")=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_global_variables_for_hoc()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_headers_include()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_mechanism_global_var_structure(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_mechanism_info()nmodl::codegen::CodegenCppVisitorprotected - print_mechanism_range_var_structure(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorpure virtual - print_mechanism_register()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_namespace_begin()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_namespace_end()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_namespace_start()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_namespace_stop()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - 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::codegen::CodegenCppVisitorprotectedvirtual - 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 + instance_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected + int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + int_variables_size() constnmodl::codegen::CodegenCppVisitorprotected + internal_method_arguments()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + internal_method_call_encounterednmodl::codegen::CodegenCppVisitorprotected + internal_method_parameters()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + is_net_event(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + is_net_move(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + is_net_send(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + local_var_type() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + make_symbol(const std::string &name) constnmodl::codegen::CodegenCppVisitorinlineprotected + method_name(const std::string &name) constnmodl::codegen::CodegenCppVisitorinlineprotected + mod_filenamenmodl::codegen::CodegenCppVisitorprotected + need_semicolon(const ast::Statement &node)nmodl::codegen::CodegenCppVisitorprotectedstatic + net_receive_buffering_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + net_receive_exist() const noexceptnmodl::codegen::CodegenCppVisitorprotected + net_receive_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + net_send_buffer_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + nmodl_version() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + nrn_cur_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + nrn_state_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + nrn_thread_arguments() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + nrn_thread_internal_arguments()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + operator_for_d() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + operator_for_rhs() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + optimize_ionvar_copiesnmodl::codegen::CodegenCppVisitorprotected + ParamVector typedefnmodl::codegen::CodegenCppVisitorprotected + position_of_float_var(const std::string &name) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + position_of_int_var(const std::string &name) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_atomic_reduction_pragma()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_backend_info()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_codegen_routines()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_compute_functions()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + 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)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 + print_g_unused() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_global_function_common_code(BlockType type, const std::string &function_name="")=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_global_var_struct_assertions() constnmodl::codegen::CodegenCppVisitorprotectedvirtual + print_global_var_struct_decl()nmodl::codegen::CodegenCppVisitorprotectedvirtual + print_global_variables_for_hoc()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_headers_include()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_mechanism_global_var_structure(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_mechanism_info()nmodl::codegen::CodegenCppVisitorprotected + print_mechanism_range_var_structure(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorpure virtual + print_mechanism_register()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_namespace_begin()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_namespace_end()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_namespace_start()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_namespace_stop()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + 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::codegen::CodegenCppVisitorprotectedvirtual + 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 e013cc4144..1b98170ec5 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 @@ -521,6 +521,15 @@ virtual std::string simulator_name ()=0  Name of the simulator the code was generated for. More...
  +std::string instance_struct () const + Name of structure that wraps range variables. More...
+  +std::string global_struct () const + Name of structure that wraps global variables. More...
+  +std::string global_struct_instance () const + Name of the (host-only) global instance of global_struct More...
+  virtual std::string backend_name () const =0  Name of the code generation backend. More...
  @@ -615,6 +624,9 @@ virtual void print_atomic_reduction_pragma ()=0  Print atomic update pragma for reduction statements. More...
  +virtual void print_global_var_struct_decl () + Instantiate global var instance. More...
+  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...
  @@ -714,6 +726,9 @@ virtual void print_mechanism_global_var_structure (bool print_initializers)=0  Print the structure that wraps all global variables used in the NMODL. More...
  +virtual void print_global_var_struct_assertions () const + Print static assertions about the global variable struct. More...
+  void print_prcellstate_macros () const  Print declaration of macro NRN_PRCELLSTATE for debugging. More...
  @@ -1043,7 +1058,7 @@

Definition at line 1086 of file codegen_cpp_visitor.hpp.

+

Definition at line 1125 of file codegen_cpp_visitor.hpp.

@@ -1095,7 +1110,7 @@

Definition at line 1097 of file codegen_cpp_visitor.hpp.

+

Definition at line 1136 of file codegen_cpp_visitor.hpp.

@@ -1133,7 +1148,7 @@

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

Definition at line 754 of file codegen_cpp_visitor.hpp.

+

Definition at line 787 of file codegen_cpp_visitor.hpp.

@@ -1219,7 +1234,7 @@

-

Definition at line 900 of file codegen_cpp_visitor.cpp.

+

Definition at line 919 of file codegen_cpp_visitor.cpp.

@@ -1248,7 +1263,7 @@

Definition at line 336 of file codegen_cpp_visitor.hpp.

+

Definition at line 360 of file codegen_cpp_visitor.hpp.

@@ -1277,7 +1292,7 @@

Definition at line 352 of file codegen_cpp_visitor.hpp.

+

Definition at line 376 of file codegen_cpp_visitor.hpp.

@@ -1410,7 +1425,7 @@

Definition at line 344 of file codegen_cpp_visitor.hpp.

+

Definition at line 368 of file codegen_cpp_visitor.hpp.

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

Definition at line 376 of file codegen_cpp_visitor.hpp.

+

Definition at line 400 of file codegen_cpp_visitor.hpp.

@@ -1622,7 +1637,7 @@

Returns
A vector of float variables
-

Definition at line 696 of file codegen_cpp_visitor.cpp.

+

Definition at line 715 of file codegen_cpp_visitor.cpp.

@@ -1669,7 +1684,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 762 of file codegen_cpp_visitor.cpp.

+

Definition at line 781 of file codegen_cpp_visitor.cpp.

@@ -1757,6 +1772,64 @@

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

+ + + +

◆ global_struct()

+ +
+
+ + + + + +
+ + + + + + + +
std::string nmodl::codegen::CodegenCppVisitor::global_struct () const
+
+inlineprotected
+
+ +

Name of structure that wraps global variables.

+ +

Definition at line 322 of file codegen_cpp_visitor.hpp.

+ +
+
+ +

◆ global_struct_instance()

+ +
+
+ + + + + +
+ + + + + + + +
std::string nmodl::codegen::CodegenCppVisitor::global_struct_instance () const
+
+inlineprotected
+
+ +

Name of the (host-only) global instance of global_struct

+ +

Definition at line 330 of file codegen_cpp_visitor.hpp.

+
@@ -1861,6 +1934,35 @@

Definition at line 49 of file codegen_cpp_visitor.cpp.

+ + + +

◆ instance_struct()

+ +
+
+ + + + + +
+ + + + + + + +
std::string nmodl::codegen::CodegenCppVisitor::instance_struct () const
+
+inlineprotected
+
+ +

Name of structure that wraps range variables.

+ +

Definition at line 314 of file codegen_cpp_visitor.hpp.

+
@@ -2041,7 +2143,7 @@

Returns
true if the function is net_event
-

Definition at line 500 of file codegen_cpp_visitor.hpp.

+

Definition at line 524 of file codegen_cpp_visitor.hpp.

@@ -2078,7 +2180,7 @@

Returns
true if the function is net_move
-

Definition at line 490 of file codegen_cpp_visitor.hpp.

+

Definition at line 514 of file codegen_cpp_visitor.hpp.

@@ -2115,7 +2217,7 @@

Returns
true if the function is net_send
-

Definition at line 480 of file codegen_cpp_visitor.hpp.

+

Definition at line 504 of file codegen_cpp_visitor.hpp.

@@ -2144,7 +2246,7 @@

Definition at line 320 of file codegen_cpp_visitor.hpp.

+

Definition at line 344 of file codegen_cpp_visitor.hpp.

@@ -2181,7 +2283,7 @@

Returns
A symbol based on the given name
-

Definition at line 774 of file codegen_cpp_visitor.hpp.

+

Definition at line 807 of file codegen_cpp_visitor.hpp.

@@ -2218,7 +2320,7 @@

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

Definition at line 764 of file codegen_cpp_visitor.hpp.

+

Definition at line 797 of file codegen_cpp_visitor.hpp.

@@ -2547,7 +2649,7 @@

Definition at line 368 of file codegen_cpp_visitor.hpp.

+

Definition at line 392 of file codegen_cpp_visitor.hpp.

@@ -2576,7 +2678,7 @@

Definition at line 360 of file codegen_cpp_visitor.hpp.

+

Definition at line 384 of file codegen_cpp_visitor.hpp.

@@ -2903,7 +3005,7 @@

Definition at line 217 of file codegen_cpp_visitor.cpp.

+

Definition at line 236 of file codegen_cpp_visitor.cpp.

@@ -3092,6 +3194,65 @@

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

+ + + +

◆ print_global_var_struct_assertions()

+ +
+
+ + + + + +
+ + + + + + + +
void nmodl::codegen::CodegenCppVisitor::print_global_var_struct_assertions () const
+
+protectedvirtual
+
+ +

Print static assertions about the global variable struct.

+ +

Definition at line 218 of file codegen_cpp_visitor.cpp.

+ +
+
+ +

◆ print_global_var_struct_decl()

+ +
+
+ + + + + +
+ + + + + + + +
void nmodl::codegen::CodegenCppVisitor::print_global_var_struct_decl ()
+
+protectedvirtual
+
+ +

Instantiate global var instance.

+

For C++ code generation this is empty

Returns
""
+ +

Definition at line 231 of file codegen_cpp_visitor.cpp.

+
@@ -3213,7 +3374,7 @@

Definition at line 261 of file codegen_cpp_visitor.cpp.

+

Definition at line 280 of file codegen_cpp_visitor.cpp.

@@ -3536,7 +3697,7 @@

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

Definition at line 366 of file codegen_cpp_visitor.cpp.

+

Definition at line 385 of file codegen_cpp_visitor.cpp.

@@ -3850,7 +4011,7 @@

Definition at line 254 of file codegen_cpp_visitor.cpp.

+

Definition at line 273 of file codegen_cpp_visitor.cpp.

@@ -3999,7 +4160,7 @@

Definition at line 299 of file codegen_cpp_visitor.cpp.

+

Definition at line 318 of file codegen_cpp_visitor.cpp.

@@ -4156,7 +4317,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 338 of file codegen_cpp_visitor.cpp.

+

Definition at line 357 of file codegen_cpp_visitor.cpp.

@@ -4179,7 +4340,7 @@

Definition at line 881 of file codegen_cpp_visitor.cpp.

+

Definition at line 900 of file codegen_cpp_visitor.cpp.

@@ -4277,7 +4438,7 @@

Definition at line 629 of file codegen_cpp_visitor.cpp.

+

Definition at line 648 of file codegen_cpp_visitor.cpp.

@@ -4309,7 +4470,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 532 of file codegen_cpp_visitor.cpp.

+

Definition at line 551 of file codegen_cpp_visitor.cpp.

@@ -4341,7 +4502,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 550 of file codegen_cpp_visitor.cpp.

+

Definition at line 569 of file codegen_cpp_visitor.cpp.

@@ -4373,7 +4534,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 411 of file codegen_cpp_visitor.cpp.

+

Definition at line 430 of file codegen_cpp_visitor.cpp.

@@ -4405,7 +4566,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 406 of file codegen_cpp_visitor.cpp.

+

Definition at line 425 of file codegen_cpp_visitor.cpp.

@@ -4437,7 +4598,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 482 of file codegen_cpp_visitor.cpp.

+

Definition at line 501 of file codegen_cpp_visitor.cpp.

@@ -4469,7 +4630,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 490 of file codegen_cpp_visitor.cpp.

+

Definition at line 509 of file codegen_cpp_visitor.cpp.

@@ -4501,7 +4662,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 401 of file codegen_cpp_visitor.cpp.

+

Definition at line 420 of file codegen_cpp_visitor.cpp.

@@ -4533,7 +4694,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 504 of file codegen_cpp_visitor.cpp.

+

Definition at line 523 of file codegen_cpp_visitor.cpp.

@@ -4565,7 +4726,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 570 of file codegen_cpp_visitor.cpp.

+

Definition at line 589 of file codegen_cpp_visitor.cpp.

@@ -4597,7 +4758,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 469 of file codegen_cpp_visitor.cpp.

+

Definition at line 488 of file codegen_cpp_visitor.cpp.

@@ -4629,7 +4790,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 453 of file codegen_cpp_visitor.cpp.

+

Definition at line 472 of file codegen_cpp_visitor.cpp.

@@ -4661,7 +4822,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 395 of file codegen_cpp_visitor.cpp.

+

Definition at line 414 of file codegen_cpp_visitor.cpp.

@@ -4693,7 +4854,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 463 of file codegen_cpp_visitor.cpp.

+

Definition at line 482 of file codegen_cpp_visitor.cpp.

@@ -4725,7 +4886,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 602 of file codegen_cpp_visitor.cpp.

+

Definition at line 621 of file codegen_cpp_visitor.cpp.

@@ -4757,7 +4918,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 609 of file codegen_cpp_visitor.cpp.

+

Definition at line 628 of file codegen_cpp_visitor.cpp.

@@ -4789,7 +4950,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 416 of file codegen_cpp_visitor.cpp.

+

Definition at line 435 of file codegen_cpp_visitor.cpp.

@@ -4821,7 +4982,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 525 of file codegen_cpp_visitor.cpp.

+

Definition at line 544 of file codegen_cpp_visitor.cpp.

@@ -4853,7 +5014,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 426 of file codegen_cpp_visitor.cpp.

+

Definition at line 445 of file codegen_cpp_visitor.cpp.

@@ -4891,7 +5052,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 923 of file codegen_cpp_visitor.cpp.

+

Definition at line 942 of file codegen_cpp_visitor.cpp.

@@ -4923,7 +5084,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 594 of file codegen_cpp_visitor.cpp.

+

Definition at line 613 of file codegen_cpp_visitor.cpp.

@@ -4955,7 +5116,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 614 of file codegen_cpp_visitor.cpp.

+

Definition at line 633 of file codegen_cpp_visitor.cpp.

@@ -4986,7 +5147,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 565 of file codegen_cpp_visitor.cpp.

+

Definition at line 584 of file codegen_cpp_visitor.cpp.

@@ -5018,7 +5179,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 386 of file codegen_cpp_visitor.cpp.

+

Definition at line 405 of file codegen_cpp_visitor.cpp.

@@ -5050,7 +5211,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 555 of file codegen_cpp_visitor.cpp.

+

Definition at line 574 of file codegen_cpp_visitor.cpp.

@@ -5082,7 +5243,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 421 of file codegen_cpp_visitor.cpp.

+

Definition at line 440 of file codegen_cpp_visitor.cpp.

@@ -5114,7 +5275,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 589 of file codegen_cpp_visitor.cpp.

+

Definition at line 608 of file codegen_cpp_visitor.cpp.

@@ -5145,7 +5306,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 434 of file codegen_cpp_visitor.cpp.

+

Definition at line 453 of file codegen_cpp_visitor.cpp.

@@ -5177,7 +5338,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 575 of file codegen_cpp_visitor.cpp.

+

Definition at line 594 of file codegen_cpp_visitor.cpp.

@@ -5209,7 +5370,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 496 of file codegen_cpp_visitor.cpp.

+

Definition at line 515 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 74fe6a5aa2..fad48ec3cc 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 @@ -23,8 +23,11 @@ var classnmodl_1_1codegen_1_1_codegen_cpp_visitor = [ "get_int_variables", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a9fd66cb8986ef84feaa63fdd0f072e45", null ], [ "get_parameter_str", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a50cbee5029c7f2bc22d697b7cd09f0cf", null ], [ "get_variable_name", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac87b0baf7ca05124b07a2cb0c405a165", null ], + [ "global_struct", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a679b657463892cddf8e20d553f2ca682", null ], + [ "global_struct_instance", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad3fa1a15788de5405f64304fcae242f9", null ], [ "global_variable_name", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#abe4fe9f14753f16e3b1014cdb4e9f846", null ], [ "has_parameter_of_name", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acf8e00aaf5cd53b7be12cfeeee66c5b7", null ], + [ "instance_struct", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae380b1cd2026a4330518944637c56a79", null ], [ "int_variable_name", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7c72df642a0d00144470a946f65eb5bc", null ], [ "int_variables_size", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aac1df493cd346d7faccb17ae5440ddc4", null ], [ "internal_method_arguments", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aeacff81944f23540968aa617d25e3d22", null ], @@ -62,6 +65,8 @@ var classnmodl_1_1codegen_1_1_codegen_cpp_visitor = [ "print_function_prototypes", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a50ccadf68055ea9e26439ccaed0d68f7", null ], [ "print_g_unused", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a430f1ba9b0f5fe9f3b74678f63025384", null ], [ "print_global_function_common_code", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6d73d64a97cc8f024e1ee3367bfd119d", null ], + [ "print_global_var_struct_assertions", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a49519f5b846f396cd1a4bf0b8775ac65", null ], + [ "print_global_var_struct_decl", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aadbceff0e1e871a3b7fb3730faf07f3e", null ], [ "print_global_variables_for_hoc", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acd5e0d9dafe7c14f8946e980b77410ae", null ], [ "print_headers_include", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a190bf9a0838f05780f727a5a90883813", null ], [ "print_mechanism_global_var_structure", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a96ee5727c24f572b7b25cd2c39b9b776", 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 423765e38e..75dee66cba 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 @@ -126,10 +126,12 @@ get_int_variables()nmodl::codegen::CodegenCppVisitorprotected get_parameter_str(const ParamVector &params)nmodl::codegen::CodegenCppVisitorprotectedstatic get_variable_name(const std::string &name, bool use_instance=true) const overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual + global_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected + global_struct_instance() constnmodl::codegen::CodegenCppVisitorinlineprotected global_variable_name(const SymbolType &symbol, bool use_instance=true) const overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual has_parameter_of_name(const T &node, const std::string &name)nmodl::codegen::CodegenCppVisitorprotected infonmodl::codegen::CodegenCppVisitorprotected - instance_struct() constnmodl::codegen::CodegenNeuronCppVisitorinlineprotected + instance_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual int_variables_size() constnmodl::codegen::CodegenCppVisitorprotected internal_method_arguments() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual @@ -173,6 +175,8 @@ print_g_unused() const overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual print_global_function_common_code(BlockType type, const std::string &function_name="") overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual print_global_macros()nmodl::codegen::CodegenNeuronCppVisitorprotected + print_global_var_struct_assertions() constnmodl::codegen::CodegenCppVisitorprotectedvirtual + print_global_var_struct_decl()nmodl::codegen::CodegenCppVisitorprotectedvirtual print_global_variables_for_hoc() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual print_headers_include() overridenmodl::codegen::CodegenNeuronCppVisitorprotectedvirtual print_initial_block(const ast::InitialBlock *node)nmodl::codegen::CodegenNeuronCppVisitorprotected 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 9680d7c454..524681f71e 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 @@ -515,9 +515,6 @@ virtual std::string backend_name () const override  Name of the code generation backend. More...
  -std::string instance_struct () const - Name of structure that wraps range variables. More...
-  int position_of_float_var (const std::string &name) const override  Determine the position in the data array for a given float variable. More...
  @@ -702,6 +699,15 @@ std::string nmodl_version () const noexcept  Return Nmodl language version. More...
  +std::string instance_struct () const + Name of structure that wraps range variables. More...
+  +std::string global_struct () const + Name of structure that wraps global variables. More...
+  +std::string global_struct_instance () const + Name of the (host-only) global instance of global_struct More...
+  const char * local_var_type () const noexcept  Data type for the local variables. More...
  @@ -784,6 +790,9 @@ std::vector< IndexVariableInfoget_int_variables ()  Determine all int variables required during code generation. More...
  +virtual void print_global_var_struct_decl () + Instantiate global var instance. More...
+  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...
  @@ -806,6 +815,9 @@ SymbolType make_symbol (const std::string &name) const  Creates a temporary symbol. More...
  +virtual void print_global_var_struct_assertions () const + Print static assertions about the global variable struct. More...
+  void print_prcellstate_macros () const  Print declaration of macro NRN_PRCELLSTATE for debugging. More...
  @@ -1030,7 +1042,7 @@

Definition at line 603 of file codegen_neuron_cpp_visitor.hpp.

+

Definition at line 597 of file codegen_neuron_cpp_visitor.hpp.

@@ -1092,7 +1104,7 @@

Definition at line 625 of file codegen_neuron_cpp_visitor.hpp.

+

Definition at line 619 of file codegen_neuron_cpp_visitor.hpp.

@@ -1352,35 +1364,6 @@

Definition at line 229 of file codegen_neuron_cpp_visitor.cpp.

- - - -

◆ instance_struct()

- -
-
- - - - - -
- - - - - - - -
std::string nmodl::codegen::CodegenNeuronCppVisitor::instance_struct () const
-
-inlineprotected
-
- -

Name of structure that wraps range variables.

- -

Definition at line 89 of file codegen_neuron_cpp_visitor.hpp.

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

- g -

    : nmodl::symtab::SymbolTable
  • global_struct() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
  • global_struct_instance() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
  • global_variable_name() : nmodl::codegen::CodegenCoreneuronCppVisitor diff --git a/html/doxygen/functions_func_i.html b/html/doxygen/functions_func_i.html index caedfcb047..7155d0c13d 100644 --- a/html/doxygen/functions_func_i.html +++ b/html/doxygen/functions_func_i.html @@ -181,8 +181,7 @@

    - i -

      : nmodl::utils::SingletonRandomString< SIZE >
    • instance_struct() -: nmodl::codegen::CodegenCoreneuronCppVisitor -, nmodl::codegen::CodegenNeuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
    • int_variable_name() : nmodl::codegen::CodegenCoreneuronCppVisitor @@ -206,7 +205,7 @@

      - i -

        , nmodl::codegen::CodegenNeuronCppVisitor
      • Ion() -: nmodl::codegen::Ion +: nmodl::codegen::Ion
      • ion_has_write_variable() : nmodl::codegen::CodegenInfo diff --git a/html/doxygen/functions_func_p.html b/html/doxygen/functions_func_p.html index 0101047cde..9df7e22424 100644 --- a/html/doxygen/functions_func_p.html +++ b/html/doxygen/functions_func_p.html @@ -335,10 +335,10 @@

        - p -

          : nmodl::codegen::CodegenCoreneuronCppVisitor
        • print_global_var_struct_assertions() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
        • print_global_var_struct_decl() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
        • print_global_variable_device_update_annotation() : nmodl::codegen::CodegenAccVisitor diff --git a/html/doxygen/functions_g.html b/html/doxygen/functions_g.html index 45be8dd4ca..43338578c7 100644 --- a/html/doxygen/functions_g.html +++ b/html/doxygen/functions_g.html @@ -1272,10 +1272,10 @@

          - g -

            : nmodl::symtab::SymbolTable
          • global_struct() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
          • global_struct_instance() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
          • global_symtab : nmodl::visitor::DefUseAnalyzeVisitor diff --git a/html/doxygen/functions_i.html b/html/doxygen/functions_i.html index acef41d599..7a01a73075 100644 --- a/html/doxygen/functions_i.html +++ b/html/doxygen/functions_i.html @@ -263,8 +263,7 @@

            - i -

              : nmodl::utils::SingletonRandomString< SIZE >
            • instance_struct() -: nmodl::codegen::CodegenCoreneuronCppVisitor -, nmodl::codegen::CodegenNeuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
            • int_variable_name() : nmodl::codegen::CodegenCoreneuronCppVisitor diff --git a/html/doxygen/functions_p.html b/html/doxygen/functions_p.html index ff1447d3a7..43288b0f2e 100644 --- a/html/doxygen/functions_p.html +++ b/html/doxygen/functions_p.html @@ -390,10 +390,10 @@

              - p -

                : nmodl::codegen::CodegenCoreneuronCppVisitor
              • print_global_var_struct_assertions() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
              • print_global_var_struct_decl() -: nmodl::codegen::CodegenCoreneuronCppVisitor +: nmodl::codegen::CodegenCppVisitor
              • print_global_variable_device_update_annotation() : nmodl::codegen::CodegenAccVisitor diff --git a/html/doxygen/group__codegen__backends.html b/html/doxygen/group__codegen__backends.html index 9c4495e716..b50b993596 100644 --- a/html/doxygen/group__codegen__backends.html +++ b/html/doxygen/group__codegen__backends.html @@ -191,7 +191,7 @@

                Definition at line 654 of file codegen_neuron_cpp_visitor.hpp.

                +

                Definition at line 648 of file codegen_neuron_cpp_visitor.hpp.

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

                Definition at line 1287 of file codegen_coreneuron_cpp_visitor.hpp.

                +

                Definition at line 1248 of file codegen_coreneuron_cpp_visitor.hpp.

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

                Definition at line 1174 of file codegen_cpp_visitor.hpp.

                +

                Definition at line 1213 of file codegen_cpp_visitor.hpp.

                diff --git a/html/doxygen/group__codegen__backends.js b/html/doxygen/group__codegen__backends.js index 32af8a21de..dcdbcfc112 100644 --- a/html/doxygen/group__codegen__backends.js +++ b/html/doxygen/group__codegen__backends.js @@ -59,10 +59,7 @@ var group__codegen__backends = [ "float_variable_name", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a18e0834ef774dd2bb5e5adc4ff2df5ae", null ], [ "get_range_var_float_type", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1b309a0bd2939736aadba430634ce52d", null ], [ "get_variable_name", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afdb445887173a3e006e72772cfffffbc", null ], - [ "global_struct", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aa2fc9281fb07384c291232a0c940321b", null ], - [ "global_struct_instance", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adb0de3bf29017af8e7337f908d420e85", null ], [ "global_variable_name", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9fad9ac24a10e083b2c5ee7cb168eea4", null ], - [ "instance_struct", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5612c2c74fb6784c5f1794259573bd64", null ], [ "int_variable_name", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a328753b743f89bbdf4123c462d63ba0c", null ], [ "internal_method_arguments", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7d14e3cc08441dc6b3bd64f0ca0a13ba", null ], [ "internal_method_parameters", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af48766525e3a1c8f88471a9338ae59e7", null ], @@ -115,8 +112,6 @@ var group__codegen__backends = [ "print_get_memb_list", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2973dd8bba370083e1bfe449a70359ee", null ], [ "print_global_function_common_code", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3fb561fbaba6ab77da1d69e531eac7d5", null ], [ "print_global_method_annotation", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adaab88b7b51f2a19bd8a12403766be0a", null ], - [ "print_global_var_struct_assertions", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afe423982c31b15f80905df718709856a", null ], - [ "print_global_var_struct_decl", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a12b568597656cbb1ed593856f1e30b3e", null ], [ "print_global_variable_device_update_annotation", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acad81499ea14286cb3f598ee56a7930e", null ], [ "print_global_variables_for_hoc", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a16415780703b2653d6e4c29dba3ee7f9", null ], [ "print_headers_include", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6f5682b33a0230cf3a068290df144831", null ], @@ -227,8 +222,11 @@ var group__codegen__backends = [ "get_int_variables", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a9fd66cb8986ef84feaa63fdd0f072e45", null ], [ "get_parameter_str", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a50cbee5029c7f2bc22d697b7cd09f0cf", null ], [ "get_variable_name", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac87b0baf7ca05124b07a2cb0c405a165", null ], + [ "global_struct", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a679b657463892cddf8e20d553f2ca682", null ], + [ "global_struct_instance", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad3fa1a15788de5405f64304fcae242f9", null ], [ "global_variable_name", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#abe4fe9f14753f16e3b1014cdb4e9f846", null ], [ "has_parameter_of_name", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acf8e00aaf5cd53b7be12cfeeee66c5b7", null ], + [ "instance_struct", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae380b1cd2026a4330518944637c56a79", null ], [ "int_variable_name", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7c72df642a0d00144470a946f65eb5bc", null ], [ "int_variables_size", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aac1df493cd346d7faccb17ae5440ddc4", null ], [ "internal_method_arguments", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aeacff81944f23540968aa617d25e3d22", null ], @@ -266,6 +264,8 @@ var group__codegen__backends = [ "print_function_prototypes", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a50ccadf68055ea9e26439ccaed0d68f7", null ], [ "print_g_unused", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a430f1ba9b0f5fe9f3b74678f63025384", null ], [ "print_global_function_common_code", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6d73d64a97cc8f024e1ee3367bfd119d", null ], + [ "print_global_var_struct_assertions", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a49519f5b846f396cd1a4bf0b8775ac65", null ], + [ "print_global_var_struct_decl", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aadbceff0e1e871a3b7fb3730faf07f3e", null ], [ "print_global_variables_for_hoc", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acd5e0d9dafe7c14f8946e980b77410ae", null ], [ "print_headers_include", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a190bf9a0838f05780f727a5a90883813", null ], [ "print_mechanism_global_var_structure", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a96ee5727c24f572b7b25cd2c39b9b776", null ], @@ -358,7 +358,6 @@ var group__codegen__backends = [ "float_variable_name", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#acfd3c1256b1d34de5fef97cff079cb8a", null ], [ "get_variable_name", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3e4bdc70a4d2eb6169d656c1ec9c9fe1", null ], [ "global_variable_name", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3af0b90beeeec4a0e17e84a11a76ecbc", null ], - [ "instance_struct", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a8c1b83f9ee311f5d493142c5e6cfe160", null ], [ "int_variable_name", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad5b66ea20129a4cf098f744a8d449893", null ], [ "internal_method_arguments", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af66d9e0ce20ea0c75375aa354f9446bc", null ], [ "internal_method_parameters", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a68499754b87764b2eba30bf38a1edbb4", null ], diff --git a/html/doxygen/namespacenmodl_1_1codegen.html b/html/doxygen/namespacenmodl_1_1codegen.html index 73d22e3ca9..677cb95524 100644 --- a/html/doxygen/namespacenmodl_1_1codegen.html +++ b/html/doxygen/namespacenmodl_1_1codegen.html @@ -220,7 +220,7 @@

                Definition at line 1882 of file codegen_coreneuron_cpp_visitor.cpp.

                +

                Definition at line 1864 of file codegen_coreneuron_cpp_visitor.cpp.

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

                -

                Definition at line 553 of file codegen_coreneuron_cpp_visitor.cpp.

                +

                Definition at line 548 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 2937 of file codegen_coreneuron_cpp_visitor.cpp.

                +

                Definition at line 2919 of file codegen_coreneuron_cpp_visitor.cpp.

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

                -

                Definition at line 383 of file codegen_cpp_visitor.cpp.

                +

                Definition at line 402 of file codegen_cpp_visitor.cpp.

                diff --git a/html/doxygen/navtreedata.js b/html/doxygen/navtreedata.js index 892bde0e9e..fd6f7912b4 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#a293512e33ee9a6a4585664e73e5897ed", -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad4462dbd2b4f56b33b7cc875150ca77c", -"classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#a9403ad70bd5e5db162670117fd904b3b", -"classnmodl_1_1utils_1_1_singleton_random_string.html#ad91a73fad7220d6abe0623f609ca504b", -"classnmodl_1_1visitor_1_1_const_visitor.html#a026b14614b86e31e6336bf539a413a9c", -"classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3b2e8f00b6db5ba5966b7fe9826babd0", -"classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#aa7e7d0f33025fcc27f3952a80ea707ae", -"classnmodl_1_1visitor_1_1_perf_visitor.html#aca5546916c9755f723c409f13da78d09", -"classnmodl_1_1visitor_1_1_verbatim_visitor.html", -"classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#afb4eff4a29235f84af83fadf075a8f23", -"dir_b4b8bd075f03e0fff4167d5f80e92046.html", +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a294fadf1935383379dd1002208363c71", +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad488bc63dac24ac7e5c29a1138172ed7", +"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#ggac542051eff25e93d11270a5c9d211143a1c2321a7038198c2126ae1828b9a4b36", -"group__codegen__backends.html#ga743bcd56c5822a14381fd87fe586ed6c", -"lon__difuse_8hpp.html", -"perf__stat_8cpp_source.html", -"structnmodl_1_1codegen_1_1_codegen_info.html#aa516bfc1058bdddd366473cd87970b59", -"symbol__properties_8hpp.html#a901f9299d7c59b1694463d26928f2a75a6a21b6995a068148bbb65c8f949b3fb2", -"var__name_8hpp_source.html" +"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 e68ce90cbc..0ab985533e 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,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,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#a03811d5433b03bea89083de74b62c40f":[0,1,0,2,111], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a06aa792160b4f021f66b58a21d3a296c":[0,1,0,2,145], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a0ae3f3e58ed5748189ac482eabac295b":[0,1,0,2,75], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a0c07a4568bf732ccc7a6ec9b763bc71b":[0,1,0,2,18], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a0dfee548a568667a78d0ab729131d6c2":[0,1,0,2,43], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a0eb6eb4f68afb0711caa99a0f9ee85d4":[0,1,0,2,129], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a151c9e289cdc4df282ed47b1f72ecc6e":[0,1,0,2,60], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a16415780703b2653d6e4c29dba3ee7f9":[0,1,0,2,65], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a18c00e97466c3bf5a83f277ca48b0d95":[0,1,0,2,21], "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,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#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,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] +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1b43c39d762c18b8457ba45496726e24":[0,1,0,2,107], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1bd7222586890e03588e16f640f0bcbf":[0,1,0,2,97], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1ca2f8a251f296a1fde805928739be41":[0,1,0,2,113], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1e15a71e22ad32b958dd83b1df5d10fb":[0,1,0,2,22], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a1edece0e83918dd7384d0bbe406bf9e7":[0,1,0,2,71], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a213e98f7c1ff3a0b9f07a6f3f3af3ee3":[0,1,0,2,103], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a227edd197659a7ae89b0beba807a4f54":[0,1,0,2,40], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a24a315e64fe859e57c3fe8187c23c137":[0,1,0,2,122], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a24ec8383532b4cab19cafd75554a7119":[0,1,0,2,68], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a24f47375affd9cc7195d83f026fc2ab8":[0,1,0,2,109], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a25d775a02a44f3e45f3b8a661249c5e8":[0,1,0,2,102], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a293512e33ee9a6a4585664e73e5897ed":[0,1,0,2,4] }; diff --git a/html/doxygen/navtreeindex15.js b/html/doxygen/navtreeindex15.js index 525255e7d6..a15742e93e 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#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,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#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,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#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#a294fadf1935383379dd1002208363c71":[0,1,0,2,23], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2973dd8bba370083e1bfe449a70359ee":[0,1,0,2,61], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2998645f8c5bf76da0389299d033afe0":[0,1,0,2,118], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2c93009c078b20b41517309c499f081f":[0,1,0,2,20], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2e6460f6c8b0f6a0ae0732a5a0a15c45":[0,1,0,2,36], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a2ff6b6d552739a604c1c9c19968dafb4":[0,1,0,2,15], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a30c0625de66788948965e8e6b1d6ff1c":[0,1,0,2,77], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a328753b743f89bbdf4123c462d63ba0c":[0,1,0,2,12], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3516dd7938db6a28e1d5668a9c4aca25":[0,1,0,2,92], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a38c76390b1d1c0a5cf1fe8df3f27fb57":[0,1,0,2,119], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3ea1bf8ef47090b926d8738d18306de7":[0,1,0,2,134], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3fb561fbaba6ab77da1d69e531eac7d5":[0,1,0,2,62], "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,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,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,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,153], -"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,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,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,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,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,104], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a421dd82c2f3762ff97fb4d0d646c1565":[0,1,0,2,83], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a43b05a41af87606941c4dff097a5f7b9":[0,1,0,2,25], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a43e3e9beeb7ca80989d361c917491e1e":[0,1,0,2,16], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a45b1dc5e371bf956e045d40f19b2470c":[0,1,0,2,37], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a47aa1e9e08042a9c2bc4c5a0773fdf53":[0,1,0,2,86], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a48e4c785bbae026d24044736fd6913c2":[0,1,0,2,93], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a498d36eb5344aa9689b514adeb57aefd":[0,1,0,2,70], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4b959a2df6058dc1539d8f4f745b01ec":[0,1,0,2,24], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4c165609255c0fe51ba8af7684890d1e":[0,1,0,2,126], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4c3349dba0cee6135e099e042936adac":[0,1,0,2,41], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4c6c17a2eeafae316e104bf5722337fa":[0,1,0,2,148], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4ce5f8dd96c5a12646610da8e40de705":[0,1,0,2,137], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4d163cf837717e6f1bac43c1a492f456":[0,1,0,2,106], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4dd6948c9064a446dc45cf6f4d463975":[0,1,0,2,56], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a4f3cf2cc2726db4de8edd19ef660f52b":[0,1,0,2,89], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a524be3f8fa4165f983647ed8ebbb9f01":[0,1,0,2,146], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a58808da4cf7e64ffb1bcb5be20f977e3":[0,1,0,2,26], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a58cf39050c85f0c1450d16c1fb87ebab":[0,1,0,2,32], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a592905dcf5bb27083ec0a84f1ab29508":[0,1,0,2,136], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5b5df9be580baa41acf1e32b177ca2f7":[0,1,0,2,76], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5be32556e7bb7fd48b1bdb71d75fe5bb":[0,1,0,2,55], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5d1ca0fcb615508f88c56b6d7a987419":[0,1,0,2,19], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a60f89c589e7bde18fcb7dfcdd62160ef":[0,1,0,2,73], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6228949e87b0a9e14fe6886fc346e28c":[0,1,0,2,50], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6291f96c056104b3b3c7a7a2ea0a7f13":[0,1,0,2,58], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6498ebb631852d55d7585ef179b3008e":[0,1,0,2,51], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a656859e8b2ce968ed39db6e966c2338f":[0,1,0,2,90], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a65d00673a1f7d24ba66b6730593da402":[0,1,0,2,84], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a66833aede8ecc336b85129ca1e8b8b2e":[0,1,0,2,30], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6aacd1083b5929ad28f227d20a412b4e":[0,1,0,2,99], "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,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,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#a6f5682b33a0230cf3a068290df144831":[0,1,0,2,66], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6ffa9eb4970b25948f6e971d8af7208e":[0,1,0,2,120], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7089dc9d4bfda5791d6f95388a877c8b":[0,1,0,2,17], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a798b58891191750906359b1f097bca05":[0,1,0,2,117], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7b99884ba28c9b21c1ff40bb54ca20f5":[0,1,0,2,135], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7bc87ceb8b4772c3e407ce79883bc368":[0,1,0,2,74], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7be1a9429e5200afb286bbc3b4e4ba13":[0,1,0,2,104], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a7d14e3cc08441dc6b3bd64f0ca0a13ba":[0,1,0,2,13], "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,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,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,152], -"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,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,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,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,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#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,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,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#a8366981bc5ecb9b4d52af74865e16bb6":[0,1,0,2,133], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a88faa4c78d1652d9eecea6a9583d4f77":[0,1,0,2,46], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8baaf5567ede31aa84237b45e9a2ec5f":[0,1,0,2,79], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8c25ecae06f5de662111c25a57501ad8":[0,1,0,2,115], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8ced8ed7909fe1536bdef83de1922d42":[0,1,0,2,123], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8d05784b3300be188775cf2ec9958dc6":[0,1,0,2,147], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a8e088ff367970d2e1bab67ff21f3c4ba":[0,1,0,2,49], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9206c89aa6ac5f56a2d462df9659ded2":[0,1,0,2,96], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a92f46b65366a865118933f37c589d34e":[0,1,0,2,38], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a93aa5868249076c8b0766369cbbba993":[0,1,0,2,44], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9494db3e1dfa2a390f133a9a8b5aa8e0":[0,1,0,2,27], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a950d9144e4f19333c602cfff78810d1b":[0,1,0,2,140], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a966d675b83b69bd16b7f9058638b69c7":[0,1,0,2,69], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a97acfbb75ee033066beb784570ad4a04":[0,1,0,2,143], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a97f84ddeb2d9220d871138f0bc99fa18":[0,1,0,2,128], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a992c19b9aa26099d7d1954fe77107b0d":[0,1,0,2,142], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9a8ec34d0a51fbf43a5318f67fc5d278":[0,1,0,2,57], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9aefdb1b586dd2b8b2102af7541be392":[0,1,0,2,101], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9b49da771d85d8326615e8b023dec3b8":[0,1,0,2,80], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9d1748ca9db1665902c25c32a2b458d6":[0,1,0,2,35], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9fad9ac24a10e083b2c5ee7cb168eea4":[0,1,0,2,11], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aa00bfb7065e72ad3b287eb78c414bd8d":[0,1,0,2,132], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aad6c90116002d10659c14c064bfa9aaa":[0,1,0,2,87], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aae78c1f217a4b785186bd211bde20da8":[0,1,0,2,121], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aaf42cb87b55f8b75effc9a052bb58dc1":[0,1,0,2,98], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab0d109b9d28587ba6cce93783a348d86":[0,1,0,2,54], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab13ca7a0bef674739095466ff66f9843":[0,1,0,2,141], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab44b2f7085319835ec99afa02f751bd4":[0,1,0,2,131], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab7016831f7a1331681cd712690d64bc7":[0,1,0,2,81], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab83b1dd02818a29abd3ad0cd4697a470":[0,1,0,2,105], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab87a69ec67fe4d42df3cb0084c99dc85":[0,1,0,2,29], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#abbcf6dbd38c9ded33c7b55d5fadf7e24":[0,1,0,2,39], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#abd6be1c541190358a512f0021ea82b16":[0,1,0,2,31], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#abe7b5a4015101375080492cc8e691d1d":[0,1,0,2,125], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#abf4234bd8f1f12b2c674205f1a02bd9f":[0,1,0,2,33], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac1fd31d8615b5b189349471a7ca23cee":[0,1,0,2,94], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac6eb4038a1823315b2aa509f7c05c132":[0,1,0,2,108], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ac9ba65a2697010e37db0eadc024e8635":[0,1,0,2,100], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acad81499ea14286cb3f598ee56a7930e":[0,1,0,2,64], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acb901a2db0ca1e0bfa37a2135552290f":[0,1,0,2,59], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ace8a12f90790e0699523d9fe3dae6114":[0,1,0,2,78], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acf87cda48d91ff766adba418a86946a0":[0,1,0,2,130], "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,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#ad518c9841fbf8ff0bd686774bb0babeb":[0,1,0,2,114], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad642a4b775008c980bffe4ad2b451691":[0,1,0,2,67], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad964cdf59c0f6c54e92cd652f2ea8a02":[0,1,0,2,88], "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,66], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adaab88b7b51f2a19bd8a12403766be0a":[0,1,0,2,63], "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,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,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,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,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,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#adcb3937d2bb619a2f22c8808f77be963":[0,1,0,2,48], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adfa5ba77a6812001d674883bb7b751dd":[0,1,0,2,110], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adfa5eae64e455cccd9932e083fc17026":[0,1,0,2,45], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae188dfb96e7d00229f619b3a82188391":[0,1,0,2,47], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae1e239d860d7e7c0bf6722b2192f4306":[0,1,0,2,116], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae2e96333bb9b3ab2d694c93bcf8a8ab6":[0,1,0,2,124], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae47b27b3bfb2d9fa200b02f449c126e7":[0,1,0,2,52], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ae8e22bda2a1cd6093087143eb7ac1953":[0,1,0,2,127], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aeada2d6cff883f8cbd1924f1d9729250":[0,1,0,2,28], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aeb4f46dc88633a2d367cda3aaa650e1e":[0,1,0,2,138], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aed50b0789d65ce89402dcf00e186f261":[0,1,0,2,85], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af48766525e3a1c8f88471a9338ae59e7":[0,1,0,2,14], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af4c6c80adb48bffce8c0c2b4119a4002":[0,1,0,2,82], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7875f3465315841ea962205c98a39d6":[0,1,0,2,112], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7cb383070a38db2f4015b982371ca1b":[0,1,0,2,95], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#af7e3a49a86646f3b69a3d387aa4116bb":[0,1,0,2,139], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afa72e4268acf4beee9e0297e7efa9f3f":[0,1,0,2,144], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afaaa9405b30312279aa8977c015ef1fa":[0,1,0,2,91], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afae0368728a114f8b4ce82148e4489dd":[0,1,0,2,42], "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,67], -"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afeaeb2e47f164b9ffd545c3dee232ab4":[0,1,0,2,77], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afe3a45430ecf9ad29bc15baa377464f7":[0,1,0,2,34], +"classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afeaeb2e47f164b9ffd545c3dee232ab4":[0,1,0,2,72], "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#a022e94245068b1c395e13272d8bc4984":[0,1,0,3,72], "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,117], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a09d3b482c400b93d31010c2f33f794f4":[0,1,0,3,44], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a0c937b0ca36a6489bbc6630db5df0cf5":[0,1,0,3,122], "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#a190bf9a0838f05780f727a5a90883813":[0,1,0,3,68], "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,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,124], -"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,130], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1d253986a351e263db95bb63c51775c3":[0,1,0,3,76], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1e105e4b89ba5652f46bb91e49c817eb":[0,1,0,3,98], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a1eb66c309a71c8e942f8bc0b518c84ed":[0,1,0,3,112], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a20666add7b3f75937954a038c51f5b55":[0,1,0,3,54], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a20a5b2ac403015cf48bc09b6f1f26408":[0,1,0,3,129], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a22b033ac5c8d3f09e96b814355fea17a":[0,1,0,3,106], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2453a1be52f39c3fa9bab2603f1f4773":[0,1,0,3,89], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a294f3c4467883beffdc0d6bea67e1741":[0,1,0,3,32], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a29c095f39a79b5fe0782a6ee22d597ff":[0,1,0,3,39], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2a1e5337a20e3f1dad1d1dfbb89fbb1b":[0,1,0,3,135], "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#a2d7cffd628c745f2e7614ffab48f4346":[0,1,0,3,48], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2ecbf452d80ce4914271469183e2e31c":[0,1,0,3,34], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a2f0c1a7b9127c6248b03b296257e8833":[0,1,0,3,74], "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,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,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,87], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a314e2615fb2851cf695a7b3adacef3e8":[0,1,0,3,147], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a32f908e88bbb1c5070b5e011f2955c07":[0,1,0,3,31], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34453683f5cc03bd4169ea004cd7e725":[0,1,0,3,116], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34492b32e18b9fbfd3ba01ba8ad85eb5":[0,1,0,3,57], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a34ae139e68f31b69fa73c9a84c2197e8":[0,1,0,3,92], "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,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,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,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#a40bc1308f847c66bc91d9c93368db6ec":[0,1,0,3,120], -"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,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,82], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4f2304d508e3d9645581004c676d94ca":[0,1,0,3,126], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a502fd875dc95e68f905fe2070abaeff8":[0,1,0,3,122], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a36470f1359566ee071015a630deb89cd":[0,1,0,3,78], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a37c30fea3191a0275918448626e043c4":[0,1,0,3,45], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a380ec35a9c68ed3384489d17a385551a":[0,1,0,3,148], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3836bfe0a9610b9037a73ea727246e71":[0,1,0,3,60], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3a37a4c72e59e5b6e5db518f4a88e7ff":[0,1,0,3,91], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3a441ca48ae4cff29a4f715314fcb0c9":[0,1,0,3,40], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3c5c3eba48b2417a66663739a128e05a":[0,1,0,3,113], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3e46711f25455021caa5de67ef374f55":[0,1,0,3,114], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a3ef901c89d40124058a0df268b4f8101":[0,1,0,3,50], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a407af2b73f564d5db79381b5b2699c97":[0,1,0,3,55], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a40bc1308f847c66bc91d9c93368db6ec":[0,1,0,3,125], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a430f1ba9b0f5fe9f3b74678f63025384":[0,1,0,3,63], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a431541d09a66c744e0df775d2ccd3acd":[0,1,0,3,110], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a481001b393776c233ccdc069916d2d7c":[0,1,0,3,88], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a491e418920668f8fce331c65e8b48a02":[0,1,0,3,123], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a49519f5b846f396cd1a4bf0b8775ac65":[0,1,0,3,65], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4b9e335b7f968d36d9cd6bdfc34bba34":[0,1,0,3,58], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4bf65c93bea904102b63553f3e5dd1b3":[0,1,0,3,87], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a4f2304d508e3d9645581004c676d94ca":[0,1,0,3,131], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a502fd875dc95e68f905fe2070abaeff8":[0,1,0,3,127], "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,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#a50ccadf68055ea9e26439ccaed0d68f7":[0,1,0,3,62], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a522261006f1cc94869ef15cd26b739da":[0,1,0,3,90], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a52c4e7589ecefee4dbbff1286344499e":[0,1,0,3,138], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a52cb50316afdcb5899663c98aa47c0de":[0,1,0,3,142], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a5711fc465136219d98b57fc2c2822f24":[0,1,0,3,111], "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,90], -"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#a5c6520580009a4608d6ea4e221ef3d29":[0,1,0,3,41], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a5d7d3326aaa9849977f0c203078f39e4":[0,1,0,3,95], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6131bec61397f01d9739e694c57afdbf":[0,1,0,3,93], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6145c59148d531ca06c5d6f218e21b02":[0,1,0,3,82], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a629e1fff799f15735376832d9ed176a2":[0,1,0,3,145], "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,131], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6b6f336bd93b1a3053428a92cf0fc909":[0,1,0,3,125], -"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,123], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a661794563709a984308164abcdd543ee":[0,1,0,3,136], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a679b657463892cddf8e20d553f2ca682":[0,1,0,3,23], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6b6f336bd93b1a3053428a92cf0fc909":[0,1,0,3,130], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6c0ac0823d48779ad3c84ee0bedf1e23":[0,1,0,3,43], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6d260fcee2ad4a83b36fc26adad5934d":[0,1,0,3,49], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6d73d64a97cc8f024e1ee3367bfd119d":[0,1,0,3,64], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6e7b32701d8bf69f1ba8995e4bf50ad3":[0,1,0,3,128], "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#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,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#a7559257a5ad55a48d1221522838c5daf":[0,1,0,3,33], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a78481115d7590930ac4d58d0bdaa2acc":[0,1,0,3,79], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a789dae2310c3496443a8a51c26cc8b71":[0,1,0,3,103], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7b4903b21fc0872bcb8e68fe0a2efb1a":[0,1,0,3,81], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7c72df642a0d00144470a946f65eb5bc":[0,1,0,3,28], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7cb14cb8ebe04982bb17999fa1a2c479":[0,1,0,3,37], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7dad6de0caa4a6f50a54db2a87edda5e":[0,1,0,3,85], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a821839be74f3cc975dff8a9c76ed54ad":[0,1,0,3,109], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8229d44e2e83410c2e28319a64e24f75":[0,1,0,3,120], "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,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,121], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8ed7dc66684dd077c0aa2260e0e0afb4":[0,1,0,3,113], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8b8b75dcd53ae8e3a641f18cb00bee1d":[0,1,0,3,102], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8b912ad6d9a4f6d8e4c1bb16f2c95fbf":[0,1,0,3,94], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8cefcce52cd721b3869701367f456a71":[0,1,0,3,80], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8eb67dab884cc678e541ff5cc77b5e03":[0,1,0,3,126], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a8ed7dc66684dd077c0aa2260e0e0afb4":[0,1,0,3,118], "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,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,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,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#a91fdec443327720111f0b8ecad783c87":[0,1,0,3,84], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a92bfb8a4daec705014f8e871fb0feacb":[0,1,0,3,52], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a93592e117e3283a0b2e0a5aa647bc155":[0,1,0,3,83], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a936ed1973fb19388fd20fa09f0f9d8bb":[0,1,0,3,107], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a946c6fc559c23573210285ed47e28570":[0,1,0,3,124], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a96932dfa1cc61d6eeb2d650e707ecf20":[0,1,0,3,121], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a96ee5727c24f572b7b25cd2c39b9b776":[0,1,0,3,69], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a987d2e01b76d37c69fd6e589b4d69473":[0,1,0,3,140], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a9a425d43bf21b8dddc7971e25c9e09fb":[0,1,0,3,108], "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,139], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aa017bbe95ad7539e72d182dac59f2454":[0,1,0,3,61], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aa2be06a920e2103ba838c308a2dcc57e":[0,1,0,3,144], "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,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,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#aaa6dae67e44cbd29e86e10b270249bed":[0,1,0,3,51], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aac1df493cd346d7faccb17ae5440ddc4":[0,1,0,3,29], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aad0e75ceecc2e0802555fcd92cb7d437":[0,1,0,3,53], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aadbceff0e1e871a3b7fb3730faf07f3e":[0,1,0,3,66], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aaf72cbf7288677fa045647df13322804":[0,1,0,3,86], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#abb107f782ba7985c00ac77dc77acd35c":[0,1,0,3,36], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#abcf0d5623d10f929b40dd3fc0e8ad00a":[0,1,0,3,47], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#abe4fe9f14753f16e3b1014cdb4e9f846":[0,1,0,3,25], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac03f9380fcd4421f95e56f37f0cd00c7":[0,1,0,3,35], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac1af60c6e410db30d87cecefd7cc7160":[0,1,0,3,115], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac2029b16365753e1e337f82cda0e3350":[0,1,0,3,143], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac22dee1d346345a9c9583029c5c1f285":[0,1,0,3,119], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac53419e9abc2d2f9b12acf10507e7954":[0,1,0,3,97], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ac5bd9ecbc1c392116871b5adaeb815a8":[0,1,0,3,137], "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,134], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acf8e00aaf5cd53b7be12cfeeee66c5b7":[0,1,0,3,24], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad283ce438acd2faea2bbb309251890a1":[0,1,0,3,127] +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acbb83079b063cd6b48e07030b1f5df84":[0,1,0,3,56], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acd5e0d9dafe7c14f8946e980b77410ae":[0,1,0,3,67], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acec9a90ac60967aeee0466003256855a":[0,1,0,3,139], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acf8e00aaf5cd53b7be12cfeeee66c5b7":[0,1,0,3,26], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad283ce438acd2faea2bbb309251890a1":[0,1,0,3,132], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad3fa1a15788de5405f64304fcae242f9":[0,1,0,3,24], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad4462dbd2b4f56b33b7cc875150ca77c":[0,1,0,3,117] }; diff --git a/html/doxygen/navtreeindex16.js b/html/doxygen/navtreeindex16.js index c441d4e6e2..b344120833 100644 --- a/html/doxygen/navtreeindex16.js +++ b/html/doxygen/navtreeindex16.js @@ -1,29 +1,29 @@ var NAVTREEINDEX16 = { -"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,128], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad4e248ac19ce527c6e64304c42364388":[0,1,0,3,39], -"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#ad488bc63dac24ac7e5c29a1138172ed7":[0,1,0,3,133], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad4e248ac19ce527c6e64304c42364388":[0,1,0,3,42], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad63b4318b5abd6b8c224fab70fe61081":[0,1,0,3,59], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae02024096ab4490b8a6215b3e59e6de0":[0,1,0,3,105], "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,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,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,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#ae0d8d4e346e244c764911c0c64c2ac1c":[0,1,0,3,104], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae0e48a2461354feaaa2a3077da1d02f6":[0,1,0,3,70], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae2fa3994b15579d0752d740c279c2073":[0,1,0,3,141], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae333398890c61148ec60cb52c3d28c10":[0,1,0,3,101], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae350ed7effbbcf8dbea050231599c8e6":[0,1,0,3,77], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae380b1cd2026a4330518944637c56a79":[0,1,0,3,27], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae63ddf806884e983a264346f21794168":[0,1,0,3,134], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aeacff81944f23540968aa617d25e3d22":[0,1,0,3,30], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aec3cef47cc3c1e5901b4ff401ce8e725":[0,1,0,3,99], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aee824eb01f6cf6f9187af509245ffc3a":[0,1,0,3,71], "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,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,141], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aef331b9ddcbd761f3aea6b457f83e88e":[0,1,0,3,100], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af2490222aefa83d67238c605e05197a3":[0,1,0,3,75], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af3e2476ccbaa3d2502fa8e6c0e42a628":[0,1,0,3,73], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#af55b2f46300b89a8458f17ab405eaa29":[0,1,0,3,146], "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], -"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aff92b4a2fed92577dbd5294d54def2e8":[0,1,0,3,43], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#afdf8d3232526bf1978bb298755f42958":[0,1,0,3,38], +"classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aff92b4a2fed92577dbd5294d54def2e8":[0,1,0,3,46], "classnmodl_1_1codegen_1_1_codegen_helper_visitor.html":[0,1,1,2], "classnmodl_1_1codegen_1_1_codegen_helper_visitor.html#a00a403d7992d9e11cf278ced1e4e2896":[0,1,1,2,9], "classnmodl_1_1codegen_1_1_codegen_helper_visitor.html#a054569f05b02caaba93e107812c4e539":[0,1,1,2,18], @@ -76,71 +76,70 @@ 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,49], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a05f014fb5be8b7dd4b747bcc5d861ae3":[0,1,0,4,35], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a085966219db2e0b51d168738421df098":[0,1,0,4,54], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a111784a1f5c4ef8a2c04edb714cca60f":[0,1,0,4,53], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a13af4fa40fc5b97bfcf91d199fe6a8e2":[0,1,0,4,62], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a0195ec229853e6a5568228b868829942":[0,1,0,4,48], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a05f014fb5be8b7dd4b747bcc5d861ae3":[0,1,0,4,34], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a085966219db2e0b51d168738421df098":[0,1,0,4,53], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a111784a1f5c4ef8a2c04edb714cca60f":[0,1,0,4,52], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a13af4fa40fc5b97bfcf91d199fe6a8e2":[0,1,0,4,61], "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,36], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a24c55a8420d179cbbd7bc6968f3c12e3":[0,1,0,4,57], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3529a162774aca01dbc18b604acfe00c":[0,1,0,4,17], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a1d7cd0325d3658024daba8fe2d2cb804":[0,1,0,4,35], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a24c55a8420d179cbbd7bc6968f3c12e3":[0,1,0,4,56], +"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#a403636272eebe18cf3f25759c06ec00a":[0,1,0,4,65], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a480879d1374101ede3c9542951433543":[0,1,0,4,51], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a50026c205b223b41ffe682526735873c":[0,1,0,4,63], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a5429cb9990f7cbe91dc33522da5ad76d":[0,1,0,4,52], -"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,46], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a68499754b87764b2eba30bf38a1edbb4":[0,1,0,4,11], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a6abde0bb8aa4c6bd11cd15303295e9f9":[0,1,0,4,40], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a403636272eebe18cf3f25759c06ec00a":[0,1,0,4,64], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a480879d1374101ede3c9542951433543":[0,1,0,4,50], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a50026c205b223b41ffe682526735873c":[0,1,0,4,62], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a5429cb9990f7cbe91dc33522da5ad76d":[0,1,0,4,51], +"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,45], +"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,39], "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,60], -"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,47], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a77ac6349ba709a4ef7ecd6a4c34b9e0c":[0,1,0,4,64], -"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#a8633f24f67f430477ff3bf4a0c6b36cb":[0,1,0,4,22], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a75551174c0c66124b0096de40ca20cbf":[0,1,0,4,59], +"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,46], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a77ac6349ba709a4ef7ecd6a4c34b9e0c":[0,1,0,4,63], +"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#a8c1b83f9ee311f5d493142c5e6cfe160":[0,1,0,4,8], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a8c348f1869653cec3dcc39b1866bab97":[0,1,0,4,15], +"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,16], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a94f4993226aa53f6095ad4a44fe47420":[0,1,0,4,19], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a96edb3ade58fc8c569ac0c73a54fd091":[0,1,0,4,48], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9749309d724cd1f4a47989c9d76c92c3":[0,1,0,4,41], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9b04c504442be8eaffd17f52376b265a":[0,1,0,4,59], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9f9d3aebd2dc5bbc05e0cb7e9a707c7f":[0,1,0,4,18], -"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#aa08a55bc62e18a9c545e8903dd3b1530":[0,1,0,4,13], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa40457fee0fa38359bb1ef9487efd00e":[0,1,0,4,42], -"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,33], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aaea5e3201bfb4a18f919f8e60db23d49":[0,1,0,4,61], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab501ff577dc0c959112378c70a9bb125":[0,1,0,4,38], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab5ead6dc1ad6f664019b6713d3238622":[0,1,0,4,58], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab6d3ef0a7aaee1cbdb59070b6982f6f3":[0,1,0,4,34], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab72208bf9821d213a933f4b3f5579d20":[0,1,0,4,39], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#abce8ff7e8bd0754c8d61066779b4e72f":[0,1,0,4,21], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#abd73fe57cf5edd770a7e775f130fc723":[0,1,0,4,37], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ac5eaa12b912040d6564bd2d1908a44e0":[0,1,0,4,32], -"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,56], +"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,47], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9749309d724cd1f4a47989c9d76c92c3":[0,1,0,4,40], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a9b04c504442be8eaffd17f52376b265a":[0,1,0,4,58], +"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,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,41], +"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,32], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aaea5e3201bfb4a18f919f8e60db23d49":[0,1,0,4,60], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab501ff577dc0c959112378c70a9bb125":[0,1,0,4,37], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab5ead6dc1ad6f664019b6713d3238622":[0,1,0,4,57], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab6d3ef0a7aaee1cbdb59070b6982f6f3":[0,1,0,4,33], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab72208bf9821d213a933f4b3f5579d20":[0,1,0,4,38], +"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,36], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ac5eaa12b912040d6564bd2d1908a44e0":[0,1,0,4,31], +"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,55], "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,55], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad5b66ea20129a4cf098f744a8d449893":[0,1,0,4,9], -"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#adbf8216b0f67ec9e714bee6aa52e1e3f":[0,1,0,4,45], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adf3ecfb21886bca7be8a882e2166a919":[0,1,0,4,43], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ae8c6eae53160557133e32fb9cef1f153":[0,1,0,4,50], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aeb0635e7e6e488519882d930401b5c2b":[0,1,0,4,20], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad4ac4cce1ce357ab264dde505128f5e5":[0,1,0,4,54], +"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,23], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adbf8216b0f67ec9e714bee6aa52e1e3f":[0,1,0,4,44], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#adf3ecfb21886bca7be8a882e2166a919":[0,1,0,4,42], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ae8c6eae53160557133e32fb9cef1f153":[0,1,0,4,49], +"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,44], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af6676bc4b255a87e484bc2641d64b713":[0,1,0,4,12], -"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af66d9e0ce20ea0c75375aa354f9446bc":[0,1,0,4,10], -"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#afdd6466ebac569ec670c3b6f4ca11d3e":[0,1,0,4,14], +"classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#af2f331ce244ac6fa94bbc94de9163fba":[0,1,0,4,43], +"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,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], "classnmodl_1_1parser_1_1_c_driver.html#a1517751d004ce35202eeaae7c01a51cb":[0,10,0,20], @@ -249,5 +248,6 @@ var NAVTREEINDEX16 = "classnmodl_1_1parser_1_1diffeq_1_1_diff_eq_context.html#a6deba0d7cd84d97f8e77ae6d0886b5ea":[2,0,0,3,0,0,1], "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#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] }; diff --git a/html/doxygen/navtreeindex17.js b/html/doxygen/navtreeindex17.js index 5e38504b27..c58651f6d5 100644 --- a/html/doxygen/navtreeindex17.js +++ b/html/doxygen/navtreeindex17.js @@ -1,6 +1,5 @@ var NAVTREEINDEX17 = { -"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX17 = "classnmodl_1_1utils_1_1_singleton_random_string.html#a8636f8bfba5add1a513d1ce337986a6f":[0,7,0,1], "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#ac3e00de497e1b0a24c7db603b6c3dcd2":[0,7,0,5], +"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 287c5bd7f0..96b2aeb75a 100644 --- a/html/doxygen/navtreeindex18.js +++ b/html/doxygen/navtreeindex18.js @@ -1,6 +1,5 @@ var NAVTREEINDEX18 = { -"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX18 = "classnmodl_1_1visitor_1_1_const_ast_visitor.html#afc4906c7fb5ca5c787480199299f1f40":[2,0,0,10,4,23], "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#a00f4d360a1345e059f1e9e09a8d4f4a6":[0,8,0,33,111], +"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 b40874b3be..d78199cbd5 100644 --- a/html/doxygen/navtreeindex19.js +++ b/html/doxygen/navtreeindex19.js @@ -1,6 +1,5 @@ var NAVTREEINDEX19 = { -"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX19 = "classnmodl_1_1visitor_1_1_j_s_o_n_visitor.html#a3a22685bce32eb66f6a14f550dbd75b6":[0,8,0,28,18], "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#a3a5014436d619ce7e012e0b29528b7cf":[0,8,0,28,126], +"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 7ebe991a5a..4796030487 100644 --- a/html/doxygen/navtreeindex20.js +++ b/html/doxygen/navtreeindex20.js @@ -1,6 +1,5 @@ var NAVTREEINDEX20 = { -"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX20 = "classnmodl_1_1visitor_1_1_meta_ast_lookup_visitor.html#a9b6968cc15c9589823d2a16bb579be2a":[0,8,0,29,112], "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#aa3139b96c280dfd5a2eec0dd862672b1":[0,8,0,29,35], +"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 fc19571e4d..1451f85a2a 100644 --- a/html/doxygen/navtreeindex21.js +++ b/html/doxygen/navtreeindex21.js @@ -1,6 +1,5 @@ var NAVTREEINDEX21 = { -"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX21 = "classnmodl_1_1visitor_1_1_perf_visitor.html#abb9fa025a33e64d4fa557e264c2369f0":[0,8,0,15,39], "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#ac77e12748df0f9ab47d54bf9489d9ab5":[0,8,0,15,46], +"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 f300b87931..25081b1c4d 100644 --- a/html/doxygen/navtreeindex22.js +++ b/html/doxygen/navtreeindex22.js @@ -1,6 +1,5 @@ var NAVTREEINDEX22 = { -"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX22 = "classnmodl_1_1visitor_1_1_verbatim_var_rename_visitor.html#ad4b5f8f84cb722c0d0f0e8eee8403a11":[0,8,0,25,0], "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_var_rename_visitor.html#aef890a20c23b7cba397d89f975bda18e":[0,8,0,25,3], +"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 83256392bf..a684363d4d 100644 --- a/html/doxygen/navtreeindex23.js +++ b/html/doxygen/navtreeindex23.js @@ -1,6 +1,5 @@ var NAVTREEINDEX23 = { -"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX23 = "classnmodl_1_1visitor_1_1test_1_1_check_parent_visitor.html#af8bb37853ec64ac5b75b2f026eace06e":[0,8,0,35,115], "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#af9fc3d222e4f3848b97947370637f4ea":[0,8,0,35,38], +"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 785f9f3487..ea9c30d2d4 100644 --- a/html/doxygen/navtreeindex24.js +++ b/html/doxygen/navtreeindex24.js @@ -1,6 +1,5 @@ var NAVTREEINDEX24 = { -"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX24 = "dir_7e83d1792d529f4aa7126ac7e0b3b699.html":[3,0,1,2], "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_ad1da340fca3da41db96f59547bf3d8b.html":[3,0,0,0,0,0], +"dir_b4b8bd075f03e0fff4167d5f80e92046.html":[3,0,0] }; diff --git a/html/doxygen/navtreeindex25.js b/html/doxygen/navtreeindex25.js index d39555d867..d4a6beb9a5 100644 --- a/html/doxygen/navtreeindex25.js +++ b/html/doxygen/navtreeindex25.js @@ -1,6 +1,5 @@ var NAVTREEINDEX25 = { -"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], @@ -72,8 +71,8 @@ var NAVTREEINDEX25 = "function__call_8hpp_source.html":[3,0,0,0,0,0,0,49], "function__table__block_8hpp.html":[3,0,0,0,0,0,0,50], "function__table__block_8hpp_source.html":[3,0,0,0,0,0,0,50], -"functions.html":[2,3,0], "functions.html":[2,3,0,0], +"functions.html":[2,3,0], "functions_b.html":[2,3,0,1], "functions_c.html":[2,3,0,2], "functions_d.html":[2,3,0,3], @@ -121,8 +120,8 @@ var NAVTREEINDEX25 = "functions_type.html":[2,3,3], "functions_u.html":[2,3,0,19], "functions_v.html":[2,3,0,20], -"functions_vars.html":[2,3,2], "functions_vars.html":[2,3,2,0], +"functions_vars.html":[2,3,2], "functions_vars_b.html":[2,3,2,1], "functions_vars_c.html":[2,3,2,2], "functions_vars_d.html":[2,3,2,3], @@ -249,5 +248,6 @@ var NAVTREEINDEX25 = "group__ast__class.html#ga3b6381327cb9e25b740e855660a7ff3a":[0,0,1,163], "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#ga3e1362838ed4cc6d1ab04e6a9fc86bf2":[0,0,1,4,106], +"group__ast__class.html#ga3f92f72529d03053ab51c41b38a29897":[0,0,1,191] }; diff --git a/html/doxygen/navtreeindex26.js b/html/doxygen/navtreeindex26.js index ce87619b4c..6862168fee 100644 --- a/html/doxygen/navtreeindex26.js +++ b/html/doxygen/navtreeindex26.js @@ -1,11 +1,10 @@ var NAVTREEINDEX26 = { -"group__ast__class.html#ga3f92f72529d03053ab51c41b38a29897":[0,0,1,191], "group__ast__class.html#ga3f92f72529d03053ab51c41b38a29897":[0,0,1,4,71], -"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,134], +"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,4,40], "group__ast__class.html#ga4ac0e01057626ba84f0511ea12370956":[0,0,1,160], "group__ast__class.html#ga4efd89b3e621b205a36fb120b62b954b":[0,0,1,4,121], @@ -18,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], @@ -66,16 +65,16 @@ var NAVTREEINDEX26 = "group__ast__class.html#ga8a32b8ca9796d4c6ff51fd651c1e410a":[0,0,1,233], "group__ast__class.html#ga8ae7b3772077532d180c376c149ca59b":[0,0,1,4,135], "group__ast__class.html#ga8ae7b3772077532d180c376c149ca59b":[0,0,1,255], -"group__ast__class.html#ga8b7765bb1b32cac9e1d3cef796b747ac":[0,0,1,256], "group__ast__class.html#ga8b7765bb1b32cac9e1d3cef796b747ac":[0,0,1,4,136], +"group__ast__class.html#ga8b7765bb1b32cac9e1d3cef796b747ac":[0,0,1,256], "group__ast__class.html#ga8e133edb6222fbee34e5f0d342797ee4":[0,0,1,4,9], "group__ast__class.html#ga8e133edb6222fbee34e5f0d342797ee4":[0,0,1,129], "group__ast__class.html#ga90a102823381b1f8e6047a1af748056e":[0,0,1,4,23], "group__ast__class.html#ga90a102823381b1f8e6047a1af748056e":[0,0,1,143], "group__ast__class.html#ga92a0562e9202ed00c90134bccbc09972":[0,0,1,4,91], "group__ast__class.html#ga92a0562e9202ed00c90134bccbc09972":[0,0,1,211], -"group__ast__class.html#ga9313a4af4b7e130f1ff85aa1e11882ab":[0,0,1,4,70], "group__ast__class.html#ga9313a4af4b7e130f1ff85aa1e11882ab":[0,0,1,190], +"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,228], @@ -110,14 +109,14 @@ var NAVTREEINDEX26 = "group__ast__class.html#gaafdc39f0529d0879f741f525181bb756":[0,0,1,4,26], "group__ast__class.html#gaafe0391f61c4d985226cf91abf6d0ea6":[0,0,1,181], "group__ast__class.html#gaafe0391f61c4d985226cf91abf6d0ea6":[0,0,1,4,61], -"group__ast__class.html#gab0ca0546b6c94aa502549453ff611811":[0,0,1,4,73], "group__ast__class.html#gab0ca0546b6c94aa502549453ff611811":[0,0,1,193], +"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], @@ -126,12 +125,12 @@ var NAVTREEINDEX26 = "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#gabe0d8be79f0e0c0967da29d186c86c3c":[0,0,1,4,6], +"group__ast__class.html#gabdc81c1d11f50f067df4cf0d7746f110":[0,0,1,4,29], "group__ast__class.html#gabe0d8be79f0e0c0967da29d186c86c3c":[0,0,1,126], -"group__ast__class.html#gabf2f9f79aaa6163faccf95beec66c585":[0,0,1,4,86], +"group__ast__class.html#gabe0d8be79f0e0c0967da29d186c86c3c":[0,0,1,4,6], "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,147], @@ -140,12 +139,12 @@ var NAVTREEINDEX26 = "group__ast__class.html#gac38a02afaac3a75f0c66f0d351bf9c04":[0,0,1,4,50], "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,229], "group__ast__class.html#gac59852558ed3eaf48643738b5a00f1ad":[0,0,1,4,109], -"group__ast__class.html#gac6117017139fe43441831581205b087b":[0,0,1,121], +"group__ast__class.html#gac59852558ed3eaf48643738b5a00f1ad":[0,0,1,229], "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], @@ -158,14 +157,14 @@ var NAVTREEINDEX26 = "group__ast__class.html#gacb75345ef088d81fcbc33cf08b5dcde3":[0,0,1,141], "group__ast__class.html#gaccf0eb232f3f92727a805fdb96012a2c":[0,0,1,4,137], "group__ast__class.html#gaccf0eb232f3f92727a805fdb96012a2c":[0,0,1,257], -"group__ast__class.html#gacd652af0b9dd48cd7fee5e26aa19ed71":[0,0,1,161], "group__ast__class.html#gacd652af0b9dd48cd7fee5e26aa19ed71":[0,0,1,4,41], +"group__ast__class.html#gacd652af0b9dd48cd7fee5e26aa19ed71":[0,0,1,161], "group__ast__class.html#gacf97186289f358ea51959f4285f870cb":[0,0,1,167], "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], @@ -176,16 +175,16 @@ var NAVTREEINDEX26 = "group__ast__class.html#gad9186bccf4349f4dc1b42448422151a5":[0,0,1,4,1], "group__ast__class.html#gad920434f140f771242aed6060526a3ba":[0,0,1,4,24], "group__ast__class.html#gad920434f140f771242aed6060526a3ba":[0,0,1,144], -"group__ast__class.html#gad920ec3fd8147522e85d67bfacb8ebdd":[0,0,1,157], "group__ast__class.html#gad920ec3fd8147522e85d67bfacb8ebdd":[0,0,1,4,37], +"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], "group__ast__class.html#gade58bfc61f86b2713d50b523aee0c92f":[0,0,1,4,59], -"group__ast__class.html#gae0579e9d3a6f697fcd4ab022eba3ed6d":[0,0,1,4,101], "group__ast__class.html#gae0579e9d3a6f697fcd4ab022eba3ed6d":[0,0,1,221], +"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,4,77], @@ -200,22 +199,22 @@ var NAVTREEINDEX26 = "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#gaed858f15cec95707094262eff7f96003":[0,0,1,239], +"group__ast__class.html#gaea4ef0d9fa16aa06d9167dd81f411913":[0,0,1,230], "group__ast__class.html#gaed858f15cec95707094262eff7f96003":[0,0,1,4,119], -"group__ast__class.html#gaee1e3d29559569a7dc809ba13fac4d80":[0,0,1,151], +"group__ast__class.html#gaed858f15cec95707094262eff7f96003":[0,0,1,239], "group__ast__class.html#gaee1e3d29559569a7dc809ba13fac4d80":[0,0,1,4,31], -"group__ast__class.html#gaefcd48a1c371deac5a65b9ccf68a3cdf":[0,0,1,4,83], +"group__ast__class.html#gaee1e3d29559569a7dc809ba13fac4d80":[0,0,1,151], "group__ast__class.html#gaefcd48a1c371deac5a65b9ccf68a3cdf":[0,0,1,203], +"group__ast__class.html#gaefcd48a1c371deac5a65b9ccf68a3cdf":[0,0,1,4,83], "group__ast__class.html#gaf47927781853e1b1d888dc16b227b2e8":[0,0,1,4,80], "group__ast__class.html#gaf47927781853e1b1d888dc16b227b2e8":[0,0,1,200], "group__ast__class.html#gaf59c475a99ee7363dc08790004763366":[0,0,1,176], "group__ast__class.html#gaf59c475a99ee7363dc08790004763366":[0,0,1,4,56], "group__ast__class.html#gaf9abed7526427801c191fbaa4fae2e94":[0,0,1,142], "group__ast__class.html#gaf9abed7526427801c191fbaa4fae2e94":[0,0,1,4,22], -"group__ast__class.html#gafca2d0b12ebffe60535c7527189cc089":[0,0,1,138], "group__ast__class.html#gafca2d0b12ebffe60535c7527189cc089":[0,0,1,4,18], +"group__ast__class.html#gafca2d0b12ebffe60535c7527189cc089":[0,0,1,138], "group__ast__class.html#gafedb2d6f0c7f3ea73c34947fed8a2d6b":[0,0,1,145], "group__ast__class.html#gafedb2d6f0c7f3ea73c34947fed8a2d6b":[0,0,1,4,25], "group__ast__prop.html":[0,0,0], @@ -249,5 +248,6 @@ var NAVTREEINDEX26 = "group__ast__prop.html#gga524298752d3913086b9e8bf101091719a83ea87e7dfea14fcd4b049f0f5121d42":[0,0,0,4,1], "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#ggac542051eff25e93d11270a5c9d211143a1572910415251835b17fc3bf40d9c9a0":[0,0,0,0,3], +"group__ast__prop.html#ggac542051eff25e93d11270a5c9d211143a1c2321a7038198c2126ae1828b9a4b36":[0,0,0,0,0] }; diff --git a/html/doxygen/navtreeindex27.js b/html/doxygen/navtreeindex27.js index 4fd7e8f582..db2c54103c 100644 --- a/html/doxygen/navtreeindex27.js +++ b/html/doxygen/navtreeindex27.js @@ -1,6 +1,5 @@ var NAVTREEINDEX27 = { -"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], @@ -249,5 +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,7] +"group__codegen__backends.html#ga743bcd56c5822a14381fd87fe586ed6c":[0,1,0,7], +"group__codegen__backends.html#ga743bcd56c5822a14381fd87fe586ed6c":[0,1,0,3,96] }; diff --git a/html/doxygen/navtreeindex28.js b/html/doxygen/navtreeindex28.js index 3eef5762f0..5a56da9331 100644 --- a/html/doxygen/navtreeindex28.js +++ b/html/doxygen/navtreeindex28.js @@ -1,10 +1,9 @@ var NAVTREEINDEX28 = { -"group__codegen__backends.html#ga743bcd56c5822a14381fd87fe586ed6c":[0,1,0,3,91], "group__codegen__backends.html#gabd283274182774ed39c08a0714842d43":[0,1,0,5], -"group__codegen__backends.html#gabd283274182774ed39c08a0714842d43":[0,1,0,4,23], +"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__backends.html#gaebe64f7d52f5cb96d8c73c1619bddabf":[0,1,0,2,53], "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], @@ -42,44 +41,44 @@ var NAVTREEINDEX28 = "group__token__test.html":[0,2,1], "group__token__test.html#ga0da85adf566fc93b8d173fa4117ccb74":[0,2,1,3], "group__token__test.html#ga0da85adf566fc93b8d173fa4117ccb74":[3,0,2,0,3,0,3], -"group__token__test.html#ga46008ea4532600b05a677394c6600055":[3,0,2,0,3,0,2], "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,8], "group__units.html#ga08e9b606cb5ea92658765b82a886f2f8":[0,6,1,4], -"group__units.html#ga141975968d2f0eef8cfc36d80e8962c8":[0,6,0,0], +"group__units.html#ga08e9b606cb5ea92658765b82a886f2f8":[0,6,8], "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,1,9], "group__units.html#ga31bdaa723dc74c12a9bf1a652561d6e7":[0,6,19], "group__units.html#ga330f86b461ce0320cd23e935b710be05":[0,6,20], "group__units.html#ga330f86b461ce0320cd23e935b710be05":[0,6,1,10], -"group__units.html#ga3a8c3503da97aeee3d242ddafb52774a":[0,6,1,11], "group__units.html#ga3a8c3503da97aeee3d242ddafb52774a":[0,6,21], +"group__units.html#ga3a8c3503da97aeee3d242ddafb52774a":[0,6,1,11], "group__units.html#ga4014c46fced93378dee7846b57211f6e":[0,6,1,8], "group__units.html#ga4014c46fced93378dee7846b57211f6e":[0,6,18], "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#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#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,1,2], "group__units.html#gaac93a10252a81387387be4571bbed890":[0,6,5], -"group__units.html#gabab997408892d209edc2e6207bcf6b3a":[0,6,14], +"group__units.html#gaac93a10252a81387387be4571bbed890":[0,6,1,2], "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,16], "group__units.html#gacf73317c537bff91a6631c0c4f4cded0":[0,6,0,3], -"group__units.html#gae0d4c7dbd75815ee53391809a8dac74d":[0,6,12], "group__units.html#gae0d4c7dbd75815ee53391809a8dac74d":[0,6,1,1], +"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX28 = "logger_8cpp.html#a6f087e40d0134fa62ba1dbc48dc2462b":[3,0,1,10,4,2], "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] +"logger_8hpp_source.html":[3,0,1,10,5], +"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 ec741d68b9..1d82506bcc 100644 --- a/html/doxygen/navtreeindex29.js +++ b/html/doxygen/navtreeindex29.js @@ -1,6 +1,5 @@ var NAVTREEINDEX29 = { -"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], @@ -71,8 +70,8 @@ var NAVTREEINDEX29 = "namespacemembers_v.html":[1,1,0,20], "namespacemembers_vars.html":[1,1,2], "namespacemembers_w.html":[1,1,0,21], -"namespacenmodl.html":[1,0,0], "namespacenmodl.html":[2,0,0], +"namespacenmodl.html":[1,0,0], "namespacenmodl_1_1ast.html":[2,0,0,0], "namespacenmodl_1_1ast.html":[1,0,0,0], "namespacenmodl_1_1codegen.html":[2,0,0,1], @@ -80,14 +79,14 @@ var NAVTREEINDEX29 = "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":[1,0,0,6,0], +"namespacenmodl_1_1parser.html":[2,0,0,3], "namespacenmodl_1_1parser_1_1diffeq.html":[2,0,0,3,0], +"namespacenmodl_1_1parser_1_1diffeq.html":[1,0,0,6,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], @@ -104,8 +103,8 @@ var NAVTREEINDEX29 = "namespacenmodl_1_1utils.html":[1,0,0,13], "namespacenmodl_1_1visitor.html":[1,0,0,14], "namespacenmodl_1_1visitor.html":[2,0,0,10], -"namespacenmodl_1_1visitor_1_1test.html":[1,0,0,14,0], "namespacenmodl_1_1visitor_1_1test.html":[2,0,0,10,0], +"namespacenmodl_1_1visitor_1_1test.html":[1,0,0,14,0], "namespaces.html":[1,0], "net__receive__block_8hpp.html":[3,0,0,0,0,0,0,73], "net__receive__block_8hpp_source.html":[3,0,0,0,0,0,0,73], @@ -249,5 +248,6 @@ var NAVTREEINDEX29 = "perf_8cpp.html#a76c6f0aac162f66fa43da97f096120b1":[3,0,2,0,10,18,0], "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.html#abd71d3764885442ea947cc4b19465543":[3,0,1,10,6,0], +"perf__stat_8cpp_source.html":[3,0,1,10,6] }; diff --git a/html/doxygen/navtreeindex30.js b/html/doxygen/navtreeindex30.js index 1b071c5a50..c8a35b474c 100644 --- a/html/doxygen/navtreeindex30.js +++ b/html/doxygen/navtreeindex30.js @@ -1,6 +1,5 @@ var NAVTREEINDEX30 = { -"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX30 = "structnmodl_1_1codegen_1_1_codegen_info.html#a98382c302176bcaf7f52563fd1a96208":[0,1,1,6,79], "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#a9fc99f3e7bce31fd0529633d31ba1547":[0,1,1,6,62], +"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 a0bd28e8bb..3bbc6b567b 100644 --- a/html/doxygen/navtreeindex31.js +++ b/html/doxygen/navtreeindex31.js @@ -1,6 +1,5 @@ var NAVTREEINDEX31 = { -"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX31 = "symbol__properties_8hpp.html#a7d0b8aa765db0de7491021b4d403b6e2aec404527ecda6950689fc6a3adf5957b":[3,0,1,8,4,5,3], "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#a901f9299d7c59b1694463d26928f2a75":[3,0,1,8,4,4], +"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 a60616064e..a92a8096a6 100644 --- a/html/doxygen/navtreeindex32.js +++ b/html/doxygen/navtreeindex32.js @@ -1,6 +1,5 @@ var NAVTREEINDEX32 = { -"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], @@ -249,5 +248,6 @@ var NAVTREEINDEX32 = "useion_8hpp_source.html":[3,0,0,0,0,0,0,115], "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.html":[3,0,0,0,0,0,0,117], +"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 e836ab985f..d6f9ec315b 100644 --- a/html/doxygen/navtreeindex33.js +++ b/html/doxygen/navtreeindex33.js @@ -1,6 +1,5 @@ var NAVTREEINDEX33 = { -"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], diff --git a/html/doxygen/search/all_14.js b/html/doxygen/search/all_14.js index 11cfe8e550..67b0a26310 100644 --- a/html/doxygen/search/all_14.js +++ b/html/doxygen/search/all_14.js @@ -4,7 +4,7 @@ var searchData= ['valence_2291',['Valence',['../classnmodl_1_1ast_1_1_valence.html',1,'nmodl::ast::Valence'],['../classnmodl_1_1ast_1_1_useion.html#a03c0207cb2f2d4213868a726e0f56929',1,'nmodl::ast::Useion::valence()'],['../classnmodl_1_1ast_1_1_valence.html#acbd1671653f567543a9e225643a0cc89',1,'nmodl::ast::Valence::Valence(Name *type, Double *value)'],['../classnmodl_1_1ast_1_1_valence.html#afb67d26bb621d2788662c5d0d4044181',1,'nmodl::ast::Valence::Valence(std::shared_ptr< Name > type, std::shared_ptr< Double > value)'],['../classnmodl_1_1ast_1_1_valence.html#af9c9657b95a55238325b4b9cce302099',1,'nmodl::ast::Valence::Valence(const Valence &obj)'],['../group__ast__type.html#ggac392e49849e60c05e42ea02c7b445033ad4c282fc67c65a77faf3d6bf6128a069',1,'nmodl::ast::VALENCE()']]], ['valence_2ehpp_2292',['valence.hpp',['../valence_8hpp.html',1,'']]], ['valencevector_2293',['ValenceVector',['../group__ast__vec__type.html#ga94c1f13db006ede6849398172ec460fa',1,'nmodl::ast']]], - ['value_2294',['value',['../classnmodl_1_1symtab_1_1_symbol.html#a4e14d5164984b47f5ea181c02960da6d',1,'nmodl::symtab::Symbol::value()'],['../classnmodl_1_1visitor_1_1_index_remover.html#a2476ea703ce84b841cff7b1815c23842',1,'nmodl::visitor::IndexRemover::value()'],['../classnmodl_1_1ast_1_1_b_a_block_type.html#a9b1b8934600e5fb3a84ef30de53be456',1,'nmodl::ast::BABlockType::value()'],['../classnmodl_1_1ast_1_1_binary_operator.html#a78e2a8807bdd3bdbd7d1138cab6e82aa',1,'nmodl::ast::BinaryOperator::value()'],['../classnmodl_1_1ast_1_1_boolean.html#afafd2493834bf8ff249ea1acbd73b732',1,'nmodl::ast::Boolean::value()'],['../classnmodl_1_1ast_1_1_constant_var.html#a69b7ca36ad10013d7a336506fdf106f4',1,'nmodl::ast::ConstantVar::value()'],['../classnmodl_1_1ast_1_1_define.html#ad4c6d62eb31386e7143d7cef296d0dc5',1,'nmodl::ast::Define::value()'],['../classnmodl_1_1ast_1_1_double.html#adcaf1c4901d81bdc10bef90a53937a56',1,'nmodl::ast::Double::value()'],['../classnmodl_1_1ast_1_1_double_unit.html#a4aec1f2ed586edfbda972face6555117',1,'nmodl::ast::DoubleUnit::value()'],['../classnmodl_1_1ast_1_1_factor_def.html#a7df2f637e432cc3ca5c377619b14ea60',1,'nmodl::ast::FactorDef::value()'],['../classnmodl_1_1ast_1_1_float.html#a16a77a1795222a7b1e6528ad87b23000',1,'nmodl::ast::Float::value()'],['../classnmodl_1_1ast_1_1_integer.html#aeaec2b9afaf14f054c246485e6d15f58',1,'nmodl::ast::Integer::value()'],['../classnmodl_1_1ast_1_1_name.html#ab42bb69ed518812d11f1c193cf947987',1,'nmodl::ast::Name::value()'],['../classnmodl_1_1ast_1_1_param_assign.html#ae23e63d7e3ed3b3afcff22a85c1e46a8',1,'nmodl::ast::ParamAssign::value()'],['../classnmodl_1_1ast_1_1_prime_name.html#a34474c780de39af9f7c0f8243c343735',1,'nmodl::ast::PrimeName::value()'],['../classnmodl_1_1ast_1_1_react_var_name.html#a9c42b533bb1a2efb538d52125fd3ccd2',1,'nmodl::ast::ReactVarName::value()'],['../classnmodl_1_1ast_1_1_reaction_operator.html#a39c15647f7aa4b38e4e56a05c71d4884',1,'nmodl::ast::ReactionOperator::value()'],['../classnmodl_1_1ast_1_1_string.html#adbf40ddad32c859cb81d54f2851e60c1',1,'nmodl::ast::String::value()'],['../classnmodl_1_1ast_1_1_unary_operator.html#accb254bd4dc77c1bd0cb9b4b777591c2',1,'nmodl::ast::UnaryOperator::value()'],['../classnmodl_1_1ast_1_1_unit_state.html#adc0687ac6fae48fa57cd3c807b1f008a',1,'nmodl::ast::UnitState::value()'],['../classnmodl_1_1ast_1_1_update_dt.html#a3c17ff2383d8df31dae0c34abb4fe390',1,'nmodl::ast::UpdateDt::value()'],['../classnmodl_1_1ast_1_1_valence.html#a98c5477463b20add89219dadcda80def',1,'nmodl::ast::Valence::value()'],['../classnmodl_1_1ast_1_1_watch.html#a720c9ed1bf7eff4c79d6fd55420b7a33',1,'nmodl::ast::Watch::value()'],['../classnmodl_1_1visitor_1_1_sympy_replace_solutions_visitor.html#a1e49fcb9c416a45a1607f335948228c1aecc2e9c313faddb07e7da223c1dc5c3f',1,'nmodl::visitor::SympyReplaceSolutionsVisitor::VALUE()']]], + ['value_2294',['VALUE',['../classnmodl_1_1visitor_1_1_sympy_replace_solutions_visitor.html#a1e49fcb9c416a45a1607f335948228c1aecc2e9c313faddb07e7da223c1dc5c3f',1,'nmodl::visitor::SympyReplaceSolutionsVisitor::VALUE()'],['../classnmodl_1_1symtab_1_1_symbol.html#a4e14d5164984b47f5ea181c02960da6d',1,'nmodl::symtab::Symbol::value()'],['../classnmodl_1_1visitor_1_1_index_remover.html#a2476ea703ce84b841cff7b1815c23842',1,'nmodl::visitor::IndexRemover::value()'],['../classnmodl_1_1ast_1_1_b_a_block_type.html#a9b1b8934600e5fb3a84ef30de53be456',1,'nmodl::ast::BABlockType::value()'],['../classnmodl_1_1ast_1_1_binary_operator.html#a78e2a8807bdd3bdbd7d1138cab6e82aa',1,'nmodl::ast::BinaryOperator::value()'],['../classnmodl_1_1ast_1_1_boolean.html#afafd2493834bf8ff249ea1acbd73b732',1,'nmodl::ast::Boolean::value()'],['../classnmodl_1_1ast_1_1_constant_var.html#a69b7ca36ad10013d7a336506fdf106f4',1,'nmodl::ast::ConstantVar::value()'],['../classnmodl_1_1ast_1_1_define.html#ad4c6d62eb31386e7143d7cef296d0dc5',1,'nmodl::ast::Define::value()'],['../classnmodl_1_1ast_1_1_double.html#adcaf1c4901d81bdc10bef90a53937a56',1,'nmodl::ast::Double::value()'],['../classnmodl_1_1ast_1_1_double_unit.html#a4aec1f2ed586edfbda972face6555117',1,'nmodl::ast::DoubleUnit::value()'],['../classnmodl_1_1ast_1_1_factor_def.html#a7df2f637e432cc3ca5c377619b14ea60',1,'nmodl::ast::FactorDef::value()'],['../classnmodl_1_1ast_1_1_float.html#a16a77a1795222a7b1e6528ad87b23000',1,'nmodl::ast::Float::value()'],['../classnmodl_1_1ast_1_1_integer.html#aeaec2b9afaf14f054c246485e6d15f58',1,'nmodl::ast::Integer::value()'],['../classnmodl_1_1ast_1_1_name.html#ab42bb69ed518812d11f1c193cf947987',1,'nmodl::ast::Name::value()'],['../classnmodl_1_1ast_1_1_param_assign.html#ae23e63d7e3ed3b3afcff22a85c1e46a8',1,'nmodl::ast::ParamAssign::value()'],['../classnmodl_1_1ast_1_1_prime_name.html#a34474c780de39af9f7c0f8243c343735',1,'nmodl::ast::PrimeName::value()'],['../classnmodl_1_1ast_1_1_react_var_name.html#a9c42b533bb1a2efb538d52125fd3ccd2',1,'nmodl::ast::ReactVarName::value()'],['../classnmodl_1_1ast_1_1_reaction_operator.html#a39c15647f7aa4b38e4e56a05c71d4884',1,'nmodl::ast::ReactionOperator::value()'],['../classnmodl_1_1ast_1_1_string.html#adbf40ddad32c859cb81d54f2851e60c1',1,'nmodl::ast::String::value()'],['../classnmodl_1_1ast_1_1_unary_operator.html#accb254bd4dc77c1bd0cb9b4b777591c2',1,'nmodl::ast::UnaryOperator::value()'],['../classnmodl_1_1ast_1_1_unit_state.html#adc0687ac6fae48fa57cd3c807b1f008a',1,'nmodl::ast::UnitState::value()'],['../classnmodl_1_1ast_1_1_update_dt.html#a3c17ff2383d8df31dae0c34abb4fe390',1,'nmodl::ast::UpdateDt::value()'],['../classnmodl_1_1ast_1_1_valence.html#a98c5477463b20add89219dadcda80def',1,'nmodl::ast::Valence::value()'],['../classnmodl_1_1ast_1_1_watch.html#a720c9ed1bf7eff4c79d6fd55420b7a33',1,'nmodl::ast::Watch::value()']]], ['values_2295',['values',['../structnmodl_1_1utils_1_1_perf_stat.html#a73b03ee433317593a5a8112f58aa0163',1,'nmodl::utils::PerfStat']]], ['var2dependants_2296',['var2dependants',['../structnmodl_1_1visitor_1_1_sympy_replace_solutions_visitor_1_1_statement_dispenser.html#a64b0e5e760e0c33abe7fa555d77e9da0',1,'nmodl::visitor::SympyReplaceSolutionsVisitor::StatementDispenser']]], ['var2statement_2297',['var2statement',['../structnmodl_1_1visitor_1_1_sympy_replace_solutions_visitor_1_1_statement_dispenser.html#a5349e9d8a2ef3e8bbbd22a23a55eea36',1,'nmodl::visitor::SympyReplaceSolutionsVisitor::StatementDispenser']]], diff --git a/html/doxygen/search/all_6.js b/html/doxygen/search/all_6.js index 01ee6f796a..a12b602fd7 100644 --- a/html/doxygen/search/all_6.js +++ b/html/doxygen/search/all_6.js @@ -167,8 +167,8 @@ var searchData= ['global_5fmemr_5fkey_811',['global_memr_key',['../classnmodl_1_1visitor_1_1_perf_visitor.html#a5c949a736941dd76ef29048b96772c4c',1,'nmodl::visitor::PerfVisitor']]], ['global_5fmemw_5fkey_812',['global_memw_key',['../classnmodl_1_1visitor_1_1_perf_visitor.html#a1cdc2ed41eb6c298d466527c242b1089',1,'nmodl::visitor::PerfVisitor']]], ['global_5fscope_813',['global_scope',['../classnmodl_1_1symtab_1_1_symbol_table.html#a823e414c87da37aed1b3a10d60f7081e',1,'nmodl::symtab::SymbolTable']]], - ['global_5fstruct_814',['global_struct',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aa2fc9281fb07384c291232a0c940321b',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], - ['global_5fstruct_5finstance_815',['global_struct_instance',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adb0de3bf29017af8e7337f908d420e85',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], + ['global_5fstruct_814',['global_struct',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a679b657463892cddf8e20d553f2ca682',1,'nmodl::codegen::CodegenCppVisitor']]], + ['global_5fstruct_5finstance_815',['global_struct_instance',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad3fa1a15788de5405f64304fcae242f9',1,'nmodl::codegen::CodegenCppVisitor']]], ['global_5fsymtab_816',['global_symtab',['../classnmodl_1_1visitor_1_1_def_use_analyze_visitor.html#a406122bab2bc607874f6d992f84e5bb4',1,'nmodl::visitor::DefUseAnalyzeVisitor']]], ['global_5fsymtab_5fname_817',['GLOBAL_SYMTAB_NAME',['../classnmodl_1_1symtab_1_1_model_symbol_table.html#acd197e1630bfca7dcfd19fb75b31adfe',1,'nmodl::symtab::ModelSymbolTable']]], ['global_5fto_5frange_2ecpp_818',['global_to_range.cpp',['../global__to__range_8cpp.html',1,'']]], diff --git a/html/doxygen/search/all_8.js b/html/doxygen/search/all_8.js index 27c4c40678..ecd88df0b7 100644 --- a/html/doxygen/search/all_8.js +++ b/html/doxygen/search/all_8.js @@ -89,7 +89,7 @@ var searchData= ['insert_5fwatch_931',['insert_watch',['../classnmodl_1_1ast_1_1_watch_statement.html#ae6d0a6b694be6a0b1dd8ef91f1bd94fe',1,'nmodl::ast::WatchStatement::insert_watch(WatchVector::const_iterator position, const std::shared_ptr< Watch > &n)'],['../classnmodl_1_1ast_1_1_watch_statement.html#aa0fb10c6d99342875d226b090f37a6aa',1,'nmodl::ast::WatchStatement::insert_watch(WatchVector::const_iterator position, NodeType &to, InputIterator first, InputIterator last)']]], ['inst_5fglobal_5fmember_932',['INST_GLOBAL_MEMBER',['../namespacenmodl_1_1codegen_1_1naming.html#a1cbc7704c95e06b613efd121525893bd',1,'nmodl::codegen::naming']]], ['instance_933',['instance',['../classnmodl_1_1utils_1_1_singleton_random_string.html#ade5b240627e7f47d65b1ce72be1b85be',1,'nmodl::utils::SingletonRandomString']]], - ['instance_5fstruct_934',['instance_struct',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5612c2c74fb6784c5f1794259573bd64',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::instance_struct()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a8c1b83f9ee311f5d493142c5e6cfe160',1,'nmodl::codegen::CodegenNeuronCppVisitor::instance_struct()']]], + ['instance_5fstruct_934',['instance_struct',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae380b1cd2026a4330518944637c56a79',1,'nmodl::codegen::CodegenCppVisitor']]], ['int_5fvariable_5fname_935',['int_variable_name',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a328753b743f89bbdf4123c462d63ba0c',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::int_variable_name()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7c72df642a0d00144470a946f65eb5bc',1,'nmodl::codegen::CodegenCppVisitor::int_variable_name()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad5b66ea20129a4cf098f744a8d449893',1,'nmodl::codegen::CodegenNeuronCppVisitor::int_variable_name()']]], ['int_5fvariables_5fsize_936',['int_variables_size',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aac1df493cd346d7faccb17ae5440ddc4',1,'nmodl::codegen::CodegenCppVisitor']]], ['integer_937',['Integer',['../classnmodl_1_1ast_1_1_integer.html',1,'nmodl::ast::Integer'],['../classnmodl_1_1ast_1_1_integer.html#a6691fb68715002d61e7bc73e6a456edc',1,'nmodl::ast::Integer::Integer(int value, Name *macro)'],['../classnmodl_1_1ast_1_1_integer.html#a6b967f28a94f0690ef6b7115f10d159d',1,'nmodl::ast::Integer::Integer(int value, std::shared_ptr< Name > macro)'],['../classnmodl_1_1ast_1_1_integer.html#a0b2060eb015fdec2b620ba48468f152e',1,'nmodl::ast::Integer::Integer(const Integer &obj)'],['../classnmodl_1_1ast_1_1_integer.html#a4d92952b349dcfcf0cd02b8910773815',1,'nmodl::ast::Integer::Integer()=default'],['../group__ast__type.html#ggac392e49849e60c05e42ea02c7b445033a5d5cd46919fa987731fb2edefe0f2a0c',1,'nmodl::ast::INTEGER()']]], diff --git a/html/doxygen/search/all_f.js b/html/doxygen/search/all_f.js index dcbe600e62..b0e51cf63d 100644 --- a/html/doxygen/search/all_f.js +++ b/html/doxygen/search/all_f.js @@ -109,8 +109,8 @@ var searchData= ['print_5fglobal_5ffunction_5fcommon_5fcode_1629',['print_global_function_common_code',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3fb561fbaba6ab77da1d69e531eac7d5',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_global_function_common_code()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6d73d64a97cc8f024e1ee3367bfd119d',1,'nmodl::codegen::CodegenCppVisitor::print_global_function_common_code()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a76894f40f5ef1531c1b3c884f93eda42',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_global_function_common_code()']]], ['print_5fglobal_5fmacros_1630',['print_global_macros',['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa02a628bedfd1b7cbd65b32e8f2042e5',1,'nmodl::codegen::CodegenNeuronCppVisitor']]], ['print_5fglobal_5fmethod_5fannotation_1631',['print_global_method_annotation',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adaab88b7b51f2a19bd8a12403766be0a',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], - ['print_5fglobal_5fvar_5fstruct_5fassertions_1632',['print_global_var_struct_assertions',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afe423982c31b15f80905df718709856a',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], - ['print_5fglobal_5fvar_5fstruct_5fdecl_1633',['print_global_var_struct_decl',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a12b568597656cbb1ed593856f1e30b3e',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], + ['print_5fglobal_5fvar_5fstruct_5fassertions_1632',['print_global_var_struct_assertions',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a49519f5b846f396cd1a4bf0b8775ac65',1,'nmodl::codegen::CodegenCppVisitor']]], + ['print_5fglobal_5fvar_5fstruct_5fdecl_1633',['print_global_var_struct_decl',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aadbceff0e1e871a3b7fb3730faf07f3e',1,'nmodl::codegen::CodegenCppVisitor']]], ['print_5fglobal_5fvariable_5fdevice_5fupdate_5fannotation_1634',['print_global_variable_device_update_annotation',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#ab76d2ea624e89d175ff3456005e410da',1,'nmodl::codegen::CodegenAccVisitor::print_global_variable_device_update_annotation()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acad81499ea14286cb3f598ee56a7930e',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_global_variable_device_update_annotation()']]], ['print_5fglobal_5fvariables_5ffor_5fhoc_1635',['print_global_variables_for_hoc',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a16415780703b2653d6e4c29dba3ee7f9',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_global_variables_for_hoc()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acd5e0d9dafe7c14f8946e980b77410ae',1,'nmodl::codegen::CodegenCppVisitor::print_global_variables_for_hoc()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a5e99f3edec8e7e1f852cac39b1b7314e',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_global_variables_for_hoc()']]], ['print_5fheaders_5finclude_1636',['print_headers_include',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6f5682b33a0230cf3a068290df144831',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_headers_include()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a190bf9a0838f05780f727a5a90883813',1,'nmodl::codegen::CodegenCppVisitor::print_headers_include()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa7665c8b7c92f51b6fbccfa74b97a706',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_headers_include()']]], diff --git a/html/doxygen/search/functions_6.js b/html/doxygen/search/functions_6.js index ab3660aa63..4005f46fd2 100644 --- a/html/doxygen/search/functions_6.js +++ b/html/doxygen/search/functions_6.js @@ -163,8 +163,8 @@ var searchData= ['get_5fwritelist_3578',['get_writelist',['../classnmodl_1_1ast_1_1_useion.html#a01d0eb4f29a252e99499193c9b3cb6dd',1,'nmodl::ast::Useion']]], ['global_3579',['Global',['../classnmodl_1_1ast_1_1_global.html#acfa6246beca257faebf25c6ac02282b7',1,'nmodl::ast::Global::Global(const GlobalVarVector &variables)'],['../classnmodl_1_1ast_1_1_global.html#ae012e622034bb370b9aa3d8b9fd079ce',1,'nmodl::ast::Global::Global(const Global &obj)']]], ['global_5fscope_3580',['global_scope',['../classnmodl_1_1symtab_1_1_symbol_table.html#a823e414c87da37aed1b3a10d60f7081e',1,'nmodl::symtab::SymbolTable']]], - ['global_5fstruct_3581',['global_struct',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#aa2fc9281fb07384c291232a0c940321b',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], - ['global_5fstruct_5finstance_3582',['global_struct_instance',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adb0de3bf29017af8e7337f908d420e85',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], + ['global_5fstruct_3581',['global_struct',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a679b657463892cddf8e20d553f2ca682',1,'nmodl::codegen::CodegenCppVisitor']]], + ['global_5fstruct_5finstance_3582',['global_struct_instance',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ad3fa1a15788de5405f64304fcae242f9',1,'nmodl::codegen::CodegenCppVisitor']]], ['global_5fvariable_5fname_3583',['global_variable_name',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a9fad9ac24a10e083b2c5ee7cb168eea4',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::global_variable_name()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#abe4fe9f14753f16e3b1014cdb4e9f846',1,'nmodl::codegen::CodegenCppVisitor::global_variable_name()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a3af0b90beeeec4a0e17e84a11a76ecbc',1,'nmodl::codegen::CodegenNeuronCppVisitor::global_variable_name()']]], ['globaltorangevisitor_3584',['GlobalToRangeVisitor',['../classnmodl_1_1visitor_1_1_global_to_range_visitor.html#a40121374fb9a41c948c5870d68aab965',1,'nmodl::visitor::GlobalToRangeVisitor::GlobalToRangeVisitor()=delete'],['../classnmodl_1_1visitor_1_1_global_to_range_visitor.html#ac25ca51cd3f6340904594700d60e70d7',1,'nmodl::visitor::GlobalToRangeVisitor::GlobalToRangeVisitor(const ast::Program &node)']]], ['globalvar_3585',['GlobalVar',['../classnmodl_1_1ast_1_1_global_var.html#afbe4f34e46d65f29827d6339433e4304',1,'nmodl::ast::GlobalVar::GlobalVar(Name *name)'],['../classnmodl_1_1ast_1_1_global_var.html#ac484125891d11858ccaa68be2d40447e',1,'nmodl::ast::GlobalVar::GlobalVar(std::shared_ptr< Name > name)'],['../classnmodl_1_1ast_1_1_global_var.html#a2286adf8adf955d90b852bf3578f1acb',1,'nmodl::ast::GlobalVar::GlobalVar(const GlobalVar &obj)']]] diff --git a/html/doxygen/search/functions_8.js b/html/doxygen/search/functions_8.js index 4f4c39bb07..486f650016 100644 --- a/html/doxygen/search/functions_8.js +++ b/html/doxygen/search/functions_8.js @@ -33,7 +33,7 @@ var searchData= ['insert_5ftable_3626',['insert_table',['../classnmodl_1_1symtab_1_1_symbol_table.html#ac6d37e46d08586231942c7d490f9eb84',1,'nmodl::symtab::SymbolTable']]], ['insert_5fwatch_3627',['insert_watch',['../classnmodl_1_1ast_1_1_watch_statement.html#ae6d0a6b694be6a0b1dd8ef91f1bd94fe',1,'nmodl::ast::WatchStatement::insert_watch(WatchVector::const_iterator position, const std::shared_ptr< Watch > &n)'],['../classnmodl_1_1ast_1_1_watch_statement.html#aa0fb10c6d99342875d226b090f37a6aa',1,'nmodl::ast::WatchStatement::insert_watch(WatchVector::const_iterator position, NodeType &to, InputIterator first, InputIterator last)']]], ['instance_3628',['instance',['../classnmodl_1_1utils_1_1_singleton_random_string.html#ade5b240627e7f47d65b1ce72be1b85be',1,'nmodl::utils::SingletonRandomString']]], - ['instance_5fstruct_3629',['instance_struct',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a5612c2c74fb6784c5f1794259573bd64',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::instance_struct()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a8c1b83f9ee311f5d493142c5e6cfe160',1,'nmodl::codegen::CodegenNeuronCppVisitor::instance_struct()']]], + ['instance_5fstruct_3629',['instance_struct',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ae380b1cd2026a4330518944637c56a79',1,'nmodl::codegen::CodegenCppVisitor']]], ['int_5fvariable_5fname_3630',['int_variable_name',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a328753b743f89bbdf4123c462d63ba0c',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::int_variable_name()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a7c72df642a0d00144470a946f65eb5bc',1,'nmodl::codegen::CodegenCppVisitor::int_variable_name()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ad5b66ea20129a4cf098f744a8d449893',1,'nmodl::codegen::CodegenNeuronCppVisitor::int_variable_name()']]], ['int_5fvariables_5fsize_3631',['int_variables_size',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aac1df493cd346d7faccb17ae5440ddc4',1,'nmodl::codegen::CodegenCppVisitor']]], ['integer_3632',['Integer',['../classnmodl_1_1ast_1_1_integer.html#a6691fb68715002d61e7bc73e6a456edc',1,'nmodl::ast::Integer::Integer(int value, Name *macro)'],['../classnmodl_1_1ast_1_1_integer.html#a6b967f28a94f0690ef6b7115f10d159d',1,'nmodl::ast::Integer::Integer(int value, std::shared_ptr< Name > macro)'],['../classnmodl_1_1ast_1_1_integer.html#a0b2060eb015fdec2b620ba48468f152e',1,'nmodl::ast::Integer::Integer(const Integer &obj)'],['../classnmodl_1_1ast_1_1_integer.html#a4d92952b349dcfcf0cd02b8910773815',1,'nmodl::ast::Integer::Integer()=default']]], diff --git a/html/doxygen/search/functions_f.js b/html/doxygen/search/functions_f.js index ca07ac310a..6304cf2fbb 100644 --- a/html/doxygen/search/functions_f.js +++ b/html/doxygen/search/functions_f.js @@ -65,8 +65,8 @@ var searchData= ['print_5fglobal_5ffunction_5fcommon_5fcode_3957',['print_global_function_common_code',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a3fb561fbaba6ab77da1d69e531eac7d5',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_global_function_common_code()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a6d73d64a97cc8f024e1ee3367bfd119d',1,'nmodl::codegen::CodegenCppVisitor::print_global_function_common_code()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a76894f40f5ef1531c1b3c884f93eda42',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_global_function_common_code()']]], ['print_5fglobal_5fmacros_3958',['print_global_macros',['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa02a628bedfd1b7cbd65b32e8f2042e5',1,'nmodl::codegen::CodegenNeuronCppVisitor']]], ['print_5fglobal_5fmethod_5fannotation_3959',['print_global_method_annotation',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#adaab88b7b51f2a19bd8a12403766be0a',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], - ['print_5fglobal_5fvar_5fstruct_5fassertions_3960',['print_global_var_struct_assertions',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#afe423982c31b15f80905df718709856a',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], - ['print_5fglobal_5fvar_5fstruct_5fdecl_3961',['print_global_var_struct_decl',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a12b568597656cbb1ed593856f1e30b3e',1,'nmodl::codegen::CodegenCoreneuronCppVisitor']]], + ['print_5fglobal_5fvar_5fstruct_5fassertions_3960',['print_global_var_struct_assertions',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a49519f5b846f396cd1a4bf0b8775ac65',1,'nmodl::codegen::CodegenCppVisitor']]], + ['print_5fglobal_5fvar_5fstruct_5fdecl_3961',['print_global_var_struct_decl',['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aadbceff0e1e871a3b7fb3730faf07f3e',1,'nmodl::codegen::CodegenCppVisitor']]], ['print_5fglobal_5fvariable_5fdevice_5fupdate_5fannotation_3962',['print_global_variable_device_update_annotation',['../classnmodl_1_1codegen_1_1_codegen_acc_visitor.html#ab76d2ea624e89d175ff3456005e410da',1,'nmodl::codegen::CodegenAccVisitor::print_global_variable_device_update_annotation()'],['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acad81499ea14286cb3f598ee56a7930e',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_global_variable_device_update_annotation()']]], ['print_5fglobal_5fvariables_5ffor_5fhoc_3963',['print_global_variables_for_hoc',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a16415780703b2653d6e4c29dba3ee7f9',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_global_variables_for_hoc()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#acd5e0d9dafe7c14f8946e980b77410ae',1,'nmodl::codegen::CodegenCppVisitor::print_global_variables_for_hoc()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a5e99f3edec8e7e1f852cac39b1b7314e',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_global_variables_for_hoc()']]], ['print_5fheaders_5finclude_3964',['print_headers_include',['../classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a6f5682b33a0230cf3a068290df144831',1,'nmodl::codegen::CodegenCoreneuronCppVisitor::print_headers_include()'],['../classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a190bf9a0838f05780f727a5a90883813',1,'nmodl::codegen::CodegenCppVisitor::print_headers_include()'],['../classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aa7665c8b7c92f51b6fbccfa74b97a706',1,'nmodl::codegen::CodegenNeuronCppVisitor::print_headers_include()']]], 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 2c9c9458c2..a6999ff724 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 @@ -593,3391 +593,3373 @@
                497 }
                498 
                499 
                - -
                501  printer->add_line(global_struct(), ' ', global_struct_instance(), ';');
                -
                502 }
                +
                500 /****************************************************************************************/
                +
                501 /* Printing routines for code generation */
                +
                502 /****************************************************************************************/
                503 
                504 
                -
                505 /****************************************************************************************/
                -
                506 /* Printing routines for code generation */
                -
                507 /****************************************************************************************/
                -
                508 
                -
                509 
                - -
                511  if (info.top_verbatim_blocks.empty()) {
                -
                512  return;
                -
                513  }
                -
                514  print_namespace_stop();
                + +
                506  if (info.top_verbatim_blocks.empty()) {
                +
                507  return;
                +
                508  }
                +
                509  print_namespace_stop();
                +
                510 
                +
                511  printer->add_newline(2);
                +
                512  printer->add_line("using namespace coreneuron;");
                +
                513 
                +
                514  printing_top_verbatim_blocks = true;
                515 
                -
                516  printer->add_newline(2);
                -
                517  printer->add_line("using namespace coreneuron;");
                -
                518 
                -
                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  }
                +
                516  for (const auto& block: info.top_blocks) {
                +
                517  if (block->is_verbatim()) {
                +
                518  printer->add_newline(2);
                +
                519  block->accept(*this);
                +
                520  }
                +
                521  }
                +
                522 
                +
                523  printing_top_verbatim_blocks = false;
                +
                524 
                +
                525  print_namespace_start();
                +
                526 }
                527 
                -
                528  printing_top_verbatim_blocks = false;
                -
                529 
                -
                530  print_namespace_start();
                -
                531 }
                -
                532 
                +
                528 
                + +
                530  if (info.functions.empty() && info.procedures.empty()) {
                +
                531  return;
                +
                532  }
                533 
                - -
                535  if (info.functions.empty() && info.procedures.empty()) {
                -
                536  return;
                -
                537  }
                -
                538 
                -
                539  printer->add_newline(2);
                -
                540  for (const auto& node: info.functions) {
                +
                534  printer->add_newline(2);
                +
                535  for (const auto& node: info.functions) {
                +
                536  print_function_declaration(*node, node->get_node_name());
                +
                537  printer->add_text(';');
                +
                538  printer->add_newline();
                +
                539  }
                +
                540  for (const auto& node: info.procedures) {
                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 }
                -
                551 
                +
                545 }
                +
                546 
                +
                547 
                +
                548 static const TableStatement* get_table_statement(const ast::Block& node) {
                +
                549  // TableStatementVisitor v;
                +
                550 
                +
                551  const auto& table_statements = collect_nodes(node, {AstNodeType::TABLE_STATEMENT});
                552 
                -
                553 static const TableStatement* get_table_statement(const ast::Block& node) {
                -
                554  // TableStatementVisitor v;
                -
                555 
                -
                556  const auto& table_statements = collect_nodes(node, {AstNodeType::TABLE_STATEMENT});
                -
                557 
                -
                558  if (table_statements.size() != 1) {
                -
                559  auto message = fmt::format("One table statement expected in {} found {}",
                -
                560  node.get_node_name(),
                -
                561  table_statements.size());
                -
                562  throw std::runtime_error(message);
                -
                563  }
                -
                564  return dynamic_cast<const TableStatement*>(table_statements.front().get());
                -
                565 }
                -
                566 
                -
                567 
                -
                568 std::tuple<bool, int> CodegenCoreneuronCppVisitor::check_if_var_is_array(const std::string& name) {
                -
                569  auto symbol = program_symtab->lookup_in_scope(name);
                -
                570  if (!symbol) {
                -
                571  throw std::runtime_error(
                -
                572  fmt::format("CodegenCoreneuronCppVisitor:: {} not found in symbol table!", name));
                +
                553  if (table_statements.size() != 1) {
                +
                554  auto message = fmt::format("One table statement expected in {} found {}",
                +
                555  node.get_node_name(),
                +
                556  table_statements.size());
                +
                557  throw std::runtime_error(message);
                +
                558  }
                +
                559  return dynamic_cast<const TableStatement*>(table_statements.front().get());
                +
                560 }
                +
                561 
                +
                562 
                +
                563 std::tuple<bool, int> CodegenCoreneuronCppVisitor::check_if_var_is_array(const std::string& name) {
                +
                564  auto symbol = program_symtab->lookup_in_scope(name);
                +
                565  if (!symbol) {
                +
                566  throw std::runtime_error(
                +
                567  fmt::format("CodegenCoreneuronCppVisitor:: {} not found in symbol table!", name));
                +
                568  }
                +
                569  if (symbol->is_array()) {
                +
                570  return {true, symbol->get_length()};
                +
                571  } else {
                +
                572  return {false, 0};
                573  }
                -
                574  if (symbol->is_array()) {
                -
                575  return {true, symbol->get_length()};
                -
                576  } else {
                -
                577  return {false, 0};
                -
                578  }
                -
                579 }
                -
                580 
                -
                581 
                - -
                583  auto statement = get_table_statement(node);
                -
                584  auto table_variables = statement->get_table_vars();
                -
                585  auto depend_variables = statement->get_depend_vars();
                -
                586  const auto& from = statement->get_from();
                -
                587  const auto& to = statement->get_to();
                -
                588  auto name = node.get_node_name();
                -
                589  auto internal_params = internal_method_parameters();
                -
                590  auto with = statement->get_with()->eval();
                -
                591  auto use_table_var = get_variable_name(naming::USE_TABLE_VARIABLE);
                -
                592  auto tmin_name = get_variable_name("tmin_" + name);
                -
                593  auto mfac_name = get_variable_name("mfac_" + name);
                -
                594  auto float_type = default_float_data_type();
                -
                595 
                -
                596  printer->add_newline(2);
                -
                597  print_device_method_annotation();
                -
                598  printer->fmt_push_block("void check_{}({})",
                -
                599  method_name(name),
                -
                600  get_parameter_str(internal_params));
                -
                601  {
                -
                602  printer->fmt_push_block("if ({} == 0)", use_table_var);
                -
                603  printer->add_line("return;");
                -
                604  printer->pop_block();
                +
                574 }
                +
                575 
                +
                576 
                + +
                578  auto statement = get_table_statement(node);
                +
                579  auto table_variables = statement->get_table_vars();
                +
                580  auto depend_variables = statement->get_depend_vars();
                +
                581  const auto& from = statement->get_from();
                +
                582  const auto& to = statement->get_to();
                +
                583  auto name = node.get_node_name();
                +
                584  auto internal_params = internal_method_parameters();
                +
                585  auto with = statement->get_with()->eval();
                +
                586  auto use_table_var = get_variable_name(naming::USE_TABLE_VARIABLE);
                +
                587  auto tmin_name = get_variable_name("tmin_" + name);
                +
                588  auto mfac_name = get_variable_name("mfac_" + name);
                +
                589  auto float_type = default_float_data_type();
                +
                590 
                +
                591  printer->add_newline(2);
                +
                592  print_device_method_annotation();
                +
                593  printer->fmt_push_block("void check_{}({})",
                +
                594  method_name(name),
                +
                595  get_parameter_str(internal_params));
                +
                596  {
                +
                597  printer->fmt_push_block("if ({} == 0)", use_table_var);
                +
                598  printer->add_line("return;");
                +
                599  printer->pop_block();
                +
                600 
                +
                601  printer->add_line("static bool make_table = true;");
                +
                602  for (const auto& variable: depend_variables) {
                +
                603  printer->fmt_line("static {} save_{};", float_type, variable->get_node_name());
                +
                604  }
                605 
                -
                606  printer->add_line("static bool make_table = true;");
                -
                607  for (const auto& variable: depend_variables) {
                -
                608  printer->fmt_line("static {} save_{};", float_type, variable->get_node_name());
                -
                609  }
                -
                610 
                -
                611  for (const auto& variable: depend_variables) {
                -
                612  const auto& var_name = variable->get_node_name();
                -
                613  const auto& instance_name = get_variable_name(var_name);
                -
                614  printer->fmt_push_block("if (save_{} != {})", var_name, instance_name);
                -
                615  printer->add_line("make_table = true;");
                -
                616  printer->pop_block();
                -
                617  }
                -
                618 
                -
                619  printer->push_block("if (make_table)");
                -
                620  {
                -
                621  printer->add_line("make_table = false;");
                -
                622 
                -
                623  printer->add_indent();
                -
                624  printer->add_text(tmin_name, " = ");
                -
                625  from->accept(*this);
                -
                626  printer->add_text(';');
                -
                627  printer->add_newline();
                -
                628 
                -
                629  printer->add_indent();
                -
                630  printer->add_text("double tmax = ");
                -
                631  to->accept(*this);
                -
                632  printer->add_text(';');
                -
                633  printer->add_newline();
                -
                634 
                -
                635 
                -
                636  printer->fmt_line("double dx = (tmax-{}) / {}.;", tmin_name, with);
                -
                637  printer->fmt_line("{} = 1./dx;", mfac_name);
                -
                638 
                -
                639  printer->fmt_line("double x = {};", tmin_name);
                -
                640  printer->fmt_push_block("for (std::size_t i = 0; i < {}; x += dx, i++)", with + 1);
                -
                641  auto function = method_name("f_" + name);
                -
                642  if (node.is_procedure_block()) {
                -
                643  printer->fmt_line("{}({}, x);", function, internal_method_arguments());
                -
                644  for (const auto& variable: table_variables) {
                -
                645  auto var_name = variable->get_node_name();
                -
                646  auto instance_name = get_variable_name(var_name);
                -
                647  auto table_name = get_variable_name("t_" + var_name);
                -
                648  auto [is_array, array_length] = check_if_var_is_array(var_name);
                -
                649  if (is_array) {
                -
                650  for (int j = 0; j < array_length; j++) {
                -
                651  printer->fmt_line(
                -
                652  "{}[{}][i] = {}[{}];", table_name, j, instance_name, j);
                -
                653  }
                -
                654  } else {
                -
                655  printer->fmt_line("{}[i] = {};", table_name, instance_name);
                -
                656  }
                -
                657  }
                -
                658  } else {
                -
                659  auto table_name = get_variable_name("t_" + name);
                -
                660  printer->fmt_line("{}[i] = {}({}, x);",
                -
                661  table_name,
                -
                662  function,
                -
                663  internal_method_arguments());
                -
                664  }
                -
                665  printer->pop_block();
                -
                666 
                -
                667  for (const auto& variable: depend_variables) {
                -
                668  auto var_name = variable->get_node_name();
                -
                669  auto instance_name = get_variable_name(var_name);
                -
                670  printer->fmt_line("save_{} = {};", var_name, instance_name);
                -
                671  }
                -
                672  }
                -
                673  printer->pop_block();
                -
                674  }
                -
                675  printer->pop_block();
                -
                676 }
                -
                677 
                -
                678 
                - -
                680  auto name = node.get_node_name();
                -
                681  auto statement = get_table_statement(node);
                -
                682  auto table_variables = statement->get_table_vars();
                -
                683  auto with = statement->get_with()->eval();
                -
                684  auto use_table_var = get_variable_name(naming::USE_TABLE_VARIABLE);
                -
                685  auto tmin_name = get_variable_name("tmin_" + name);
                -
                686  auto mfac_name = get_variable_name("mfac_" + name);
                -
                687  auto function_name = method_name("f_" + name);
                -
                688 
                -
                689  printer->add_newline(2);
                -
                690  print_function_declaration(node, name);
                -
                691  printer->push_block();
                -
                692  {
                -
                693  const auto& params = node.get_parameters();
                -
                694  printer->fmt_push_block("if ({} == 0)", use_table_var);
                -
                695  if (node.is_procedure_block()) {
                -
                696  printer->fmt_line("{}({}, {});",
                -
                697  function_name,
                -
                698  internal_method_arguments(),
                -
                699  params[0].get()->get_node_name());
                -
                700  printer->add_line("return 0;");
                -
                701  } else {
                -
                702  printer->fmt_line("return {}({}, {});",
                -
                703  function_name,
                -
                704  internal_method_arguments(),
                -
                705  params[0].get()->get_node_name());
                -
                706  }
                -
                707  printer->pop_block();
                -
                708 
                -
                709  printer->fmt_line("double xi = {} * ({} - {});",
                -
                710  mfac_name,
                -
                711  params[0].get()->get_node_name(),
                -
                712  tmin_name);
                -
                713  printer->push_block("if (isnan(xi))");
                -
                714  if (node.is_procedure_block()) {
                -
                715  for (const auto& var: table_variables) {
                -
                716  auto var_name = get_variable_name(var->get_node_name());
                -
                717  auto [is_array, array_length] = check_if_var_is_array(var->get_node_name());
                -
                718  if (is_array) {
                -
                719  for (int j = 0; j < array_length; j++) {
                -
                720  printer->fmt_line("{}[{}] = xi;", var_name, j);
                -
                721  }
                -
                722  } else {
                -
                723  printer->fmt_line("{} = xi;", var_name);
                -
                724  }
                -
                725  }
                -
                726  printer->add_line("return 0;");
                -
                727  } else {
                -
                728  printer->add_line("return xi;");
                -
                729  }
                -
                730  printer->pop_block();
                -
                731 
                -
                732  printer->fmt_push_block("if (xi <= 0. || xi >= {}.)", with);
                -
                733  printer->fmt_line("int index = (xi <= 0.) ? 0 : {};", with);
                -
                734  if (node.is_procedure_block()) {
                -
                735  for (const auto& variable: table_variables) {
                -
                736  auto var_name = variable->get_node_name();
                -
                737  auto instance_name = get_variable_name(var_name);
                -
                738  auto table_name = get_variable_name("t_" + var_name);
                -
                739  auto [is_array, array_length] = check_if_var_is_array(var_name);
                -
                740  if (is_array) {
                -
                741  for (int j = 0; j < array_length; j++) {
                -
                742  printer->fmt_line(
                -
                743  "{}[{}] = {}[{}][index];", instance_name, j, table_name, j);
                -
                744  }
                -
                745  } else {
                -
                746  printer->fmt_line("{} = {}[index];", instance_name, table_name);
                -
                747  }
                -
                748  }
                -
                749  printer->add_line("return 0;");
                -
                750  } else {
                -
                751  auto table_name = get_variable_name("t_" + name);
                -
                752  printer->fmt_line("return {}[index];", table_name);
                -
                753  }
                -
                754  printer->pop_block();
                -
                755 
                -
                756  printer->add_line("int i = int(xi);");
                -
                757  printer->add_line("double theta = xi - double(i);");
                -
                758  if (node.is_procedure_block()) {
                -
                759  for (const auto& var: table_variables) {
                -
                760  auto var_name = var->get_node_name();
                -
                761  auto instance_name = get_variable_name(var_name);
                -
                762  auto table_name = get_variable_name("t_" + var_name);
                -
                763  auto [is_array, array_length] = check_if_var_is_array(var->get_node_name());
                -
                764  if (is_array) {
                -
                765  for (size_t j = 0; j < array_length; j++) {
                -
                766  printer->fmt_line(
                -
                767  "{0}[{1}] = {2}[{1}][i] + theta*({2}[{1}][i+1]-{2}[{1}][i]);",
                -
                768  instance_name,
                -
                769  j,
                -
                770  table_name);
                -
                771  }
                -
                772  } else {
                -
                773  printer->fmt_line("{0} = {1}[i] + theta*({1}[i+1]-{1}[i]);",
                -
                774  instance_name,
                -
                775  table_name);
                -
                776  }
                -
                777  }
                -
                778  printer->add_line("return 0;");
                -
                779  } else {
                -
                780  auto table_name = get_variable_name("t_" + name);
                -
                781  printer->fmt_line("return {0}[i] + theta * ({0}[i+1] - {0}[i]);", table_name);
                -
                782  }
                -
                783  }
                -
                784  printer->pop_block();
                -
                785 }
                -
                786 
                +
                606  for (const auto& variable: depend_variables) {
                +
                607  const auto& var_name = variable->get_node_name();
                +
                608  const auto& instance_name = get_variable_name(var_name);
                +
                609  printer->fmt_push_block("if (save_{} != {})", var_name, instance_name);
                +
                610  printer->add_line("make_table = true;");
                +
                611  printer->pop_block();
                +
                612  }
                +
                613 
                +
                614  printer->push_block("if (make_table)");
                +
                615  {
                +
                616  printer->add_line("make_table = false;");
                +
                617 
                +
                618  printer->add_indent();
                +
                619  printer->add_text(tmin_name, " = ");
                +
                620  from->accept(*this);
                +
                621  printer->add_text(';');
                +
                622  printer->add_newline();
                +
                623 
                +
                624  printer->add_indent();
                +
                625  printer->add_text("double tmax = ");
                +
                626  to->accept(*this);
                +
                627  printer->add_text(';');
                +
                628  printer->add_newline();
                +
                629 
                +
                630 
                +
                631  printer->fmt_line("double dx = (tmax-{}) / {}.;", tmin_name, with);
                +
                632  printer->fmt_line("{} = 1./dx;", mfac_name);
                +
                633 
                +
                634  printer->fmt_line("double x = {};", tmin_name);
                +
                635  printer->fmt_push_block("for (std::size_t i = 0; i < {}; x += dx, i++)", with + 1);
                +
                636  auto function = method_name("f_" + name);
                +
                637  if (node.is_procedure_block()) {
                +
                638  printer->fmt_line("{}({}, x);", function, internal_method_arguments());
                +
                639  for (const auto& variable: table_variables) {
                +
                640  auto var_name = variable->get_node_name();
                +
                641  auto instance_name = get_variable_name(var_name);
                +
                642  auto table_name = get_variable_name("t_" + var_name);
                +
                643  auto [is_array, array_length] = check_if_var_is_array(var_name);
                +
                644  if (is_array) {
                +
                645  for (int j = 0; j < array_length; j++) {
                +
                646  printer->fmt_line(
                +
                647  "{}[{}][i] = {}[{}];", table_name, j, instance_name, j);
                +
                648  }
                +
                649  } else {
                +
                650  printer->fmt_line("{}[i] = {};", table_name, instance_name);
                +
                651  }
                +
                652  }
                +
                653  } else {
                +
                654  auto table_name = get_variable_name("t_" + name);
                +
                655  printer->fmt_line("{}[i] = {}({}, x);",
                +
                656  table_name,
                +
                657  function,
                +
                658  internal_method_arguments());
                +
                659  }
                +
                660  printer->pop_block();
                +
                661 
                +
                662  for (const auto& variable: depend_variables) {
                +
                663  auto var_name = variable->get_node_name();
                +
                664  auto instance_name = get_variable_name(var_name);
                +
                665  printer->fmt_line("save_{} = {};", var_name, instance_name);
                +
                666  }
                +
                667  }
                +
                668  printer->pop_block();
                +
                669  }
                +
                670  printer->pop_block();
                +
                671 }
                +
                672 
                +
                673 
                + +
                675  auto name = node.get_node_name();
                +
                676  auto statement = get_table_statement(node);
                +
                677  auto table_variables = statement->get_table_vars();
                +
                678  auto with = statement->get_with()->eval();
                +
                679  auto use_table_var = get_variable_name(naming::USE_TABLE_VARIABLE);
                +
                680  auto tmin_name = get_variable_name("tmin_" + name);
                +
                681  auto mfac_name = get_variable_name("mfac_" + name);
                +
                682  auto function_name = method_name("f_" + name);
                +
                683 
                +
                684  printer->add_newline(2);
                +
                685  print_function_declaration(node, name);
                +
                686  printer->push_block();
                +
                687  {
                +
                688  const auto& params = node.get_parameters();
                +
                689  printer->fmt_push_block("if ({} == 0)", use_table_var);
                +
                690  if (node.is_procedure_block()) {
                +
                691  printer->fmt_line("{}({}, {});",
                +
                692  function_name,
                +
                693  internal_method_arguments(),
                +
                694  params[0].get()->get_node_name());
                +
                695  printer->add_line("return 0;");
                +
                696  } else {
                +
                697  printer->fmt_line("return {}({}, {});",
                +
                698  function_name,
                +
                699  internal_method_arguments(),
                +
                700  params[0].get()->get_node_name());
                +
                701  }
                +
                702  printer->pop_block();
                +
                703 
                +
                704  printer->fmt_line("double xi = {} * ({} - {});",
                +
                705  mfac_name,
                +
                706  params[0].get()->get_node_name(),
                +
                707  tmin_name);
                +
                708  printer->push_block("if (isnan(xi))");
                +
                709  if (node.is_procedure_block()) {
                +
                710  for (const auto& var: table_variables) {
                +
                711  auto var_name = get_variable_name(var->get_node_name());
                +
                712  auto [is_array, array_length] = check_if_var_is_array(var->get_node_name());
                +
                713  if (is_array) {
                +
                714  for (int j = 0; j < array_length; j++) {
                +
                715  printer->fmt_line("{}[{}] = xi;", var_name, j);
                +
                716  }
                +
                717  } else {
                +
                718  printer->fmt_line("{} = xi;", var_name);
                +
                719  }
                +
                720  }
                +
                721  printer->add_line("return 0;");
                +
                722  } else {
                +
                723  printer->add_line("return xi;");
                +
                724  }
                +
                725  printer->pop_block();
                +
                726 
                +
                727  printer->fmt_push_block("if (xi <= 0. || xi >= {}.)", with);
                +
                728  printer->fmt_line("int index = (xi <= 0.) ? 0 : {};", with);
                +
                729  if (node.is_procedure_block()) {
                +
                730  for (const auto& variable: table_variables) {
                +
                731  auto var_name = variable->get_node_name();
                +
                732  auto instance_name = get_variable_name(var_name);
                +
                733  auto table_name = get_variable_name("t_" + var_name);
                +
                734  auto [is_array, array_length] = check_if_var_is_array(var_name);
                +
                735  if (is_array) {
                +
                736  for (int j = 0; j < array_length; j++) {
                +
                737  printer->fmt_line(
                +
                738  "{}[{}] = {}[{}][index];", instance_name, j, table_name, j);
                +
                739  }
                +
                740  } else {
                +
                741  printer->fmt_line("{} = {}[index];", instance_name, table_name);
                +
                742  }
                +
                743  }
                +
                744  printer->add_line("return 0;");
                +
                745  } else {
                +
                746  auto table_name = get_variable_name("t_" + name);
                +
                747  printer->fmt_line("return {}[index];", table_name);
                +
                748  }
                +
                749  printer->pop_block();
                +
                750 
                +
                751  printer->add_line("int i = int(xi);");
                +
                752  printer->add_line("double theta = xi - double(i);");
                +
                753  if (node.is_procedure_block()) {
                +
                754  for (const auto& var: table_variables) {
                +
                755  auto var_name = var->get_node_name();
                +
                756  auto instance_name = get_variable_name(var_name);
                +
                757  auto table_name = get_variable_name("t_" + var_name);
                +
                758  auto [is_array, array_length] = check_if_var_is_array(var->get_node_name());
                +
                759  if (is_array) {
                +
                760  for (size_t j = 0; j < array_length; j++) {
                +
                761  printer->fmt_line(
                +
                762  "{0}[{1}] = {2}[{1}][i] + theta*({2}[{1}][i+1]-{2}[{1}][i]);",
                +
                763  instance_name,
                +
                764  j,
                +
                765  table_name);
                +
                766  }
                +
                767  } else {
                +
                768  printer->fmt_line("{0} = {1}[i] + theta*({1}[i+1]-{1}[i]);",
                +
                769  instance_name,
                +
                770  table_name);
                +
                771  }
                +
                772  }
                +
                773  printer->add_line("return 0;");
                +
                774  } else {
                +
                775  auto table_name = get_variable_name("t_" + name);
                +
                776  printer->fmt_line("return {0}[i] + theta * ({0}[i+1] - {0}[i]);", table_name);
                +
                777  }
                +
                778  }
                +
                779  printer->pop_block();
                +
                780 }
                +
                781 
                +
                782 
                + +
                784  if (info.table_count == 0) {
                +
                785  return;
                +
                786  }
                787 
                - -
                789  if (info.table_count == 0) {
                -
                790  return;
                -
                791  }
                -
                792 
                -
                793  printer->add_newline(2);
                -
                794  auto name = method_name("check_table_thread");
                -
                795  auto parameters = external_method_parameters(true);
                +
                788  printer->add_newline(2);
                +
                789  auto name = method_name("check_table_thread");
                +
                790  auto parameters = external_method_parameters(true);
                +
                791 
                +
                792  printer->fmt_push_block("static void {} ({})", name, parameters);
                +
                793  printer->add_line("setup_instance(nt, ml);");
                +
                794  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                +
                795  printer->add_line("double v = 0;");
                796 
                -
                797  printer->fmt_push_block("static void {} ({})", name, parameters);
                -
                798  printer->add_line("setup_instance(nt, ml);");
                -
                799  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                -
                800  printer->add_line("double v = 0;");
                -
                801 
                -
                802  for (const auto& function: info.functions_with_table) {
                -
                803  auto method_name_str = method_name("check_" + function->get_node_name());
                -
                804  auto arguments = internal_method_arguments();
                -
                805  printer->fmt_line("{}({});", method_name_str, arguments);
                -
                806  }
                -
                807 
                -
                808  printer->pop_block();
                -
                809 }
                -
                810 
                -
                811 
                - -
                813  const std::string& name) {
                -
                814  printer->add_newline(2);
                -
                815  print_function_declaration(node, name);
                -
                816  printer->add_text(" ");
                -
                817  printer->push_block();
                -
                818 
                -
                819  // function requires return variable declaration
                -
                820  if (node.is_function_block()) {
                -
                821  auto type = default_float_data_type();
                -
                822  printer->fmt_line("{} ret_{} = 0.0;", type, name);
                -
                823  } else {
                -
                824  printer->fmt_line("int ret_{} = 0;", name);
                -
                825  }
                +
                797  for (const auto& function: info.functions_with_table) {
                +
                798  auto method_name_str = method_name("check_" + function->get_node_name());
                +
                799  auto arguments = internal_method_arguments();
                +
                800  printer->fmt_line("{}({});", method_name_str, arguments);
                +
                801  }
                +
                802 
                +
                803  printer->pop_block();
                +
                804 }
                +
                805 
                +
                806 
                + +
                808  const std::string& name) {
                +
                809  printer->add_newline(2);
                +
                810  print_function_declaration(node, name);
                +
                811  printer->add_text(" ");
                +
                812  printer->push_block();
                +
                813 
                +
                814  // function requires return variable declaration
                +
                815  if (node.is_function_block()) {
                +
                816  auto type = default_float_data_type();
                +
                817  printer->fmt_line("{} ret_{} = 0.0;", type, name);
                +
                818  } else {
                +
                819  printer->fmt_line("int ret_{} = 0;", name);
                +
                820  }
                +
                821 
                +
                822  print_statement_block(*node.get_statement_block(), false, false);
                +
                823  printer->fmt_line("return ret_{};", name);
                +
                824  printer->pop_block();
                +
                825 }
                826 
                -
                827  print_statement_block(*node.get_statement_block(), false, false);
                -
                828  printer->fmt_line("return ret_{};", name);
                -
                829  printer->pop_block();
                -
                830 }
                -
                831 
                -
                832 
                - -
                834  auto name = node.get_node_name();
                -
                835 
                -
                836  if (info.function_uses_table(name)) {
                -
                837  auto new_name = "f_" + name;
                -
                838  print_function_or_procedure(node, new_name);
                -
                839  print_table_check_function(node);
                -
                840  print_table_replacement_function(node);
                -
                841  } else {
                -
                842  print_function_or_procedure(node, name);
                -
                843  }
                +
                827 
                + +
                829  auto name = node.get_node_name();
                +
                830 
                +
                831  if (info.function_uses_table(name)) {
                +
                832  auto new_name = "f_" + name;
                +
                833  print_function_or_procedure(node, new_name);
                +
                834  print_table_check_function(node);
                +
                835  print_table_replacement_function(node);
                +
                836  } else {
                +
                837  print_function_or_procedure(node, name);
                +
                838  }
                +
                839 }
                +
                840 
                +
                841 
                + +
                843  print_function_procedure_helper(node);
                844 }
                845 
                846 
                - -
                848  print_function_procedure_helper(node);
                -
                849 }
                -
                850 
                -
                851 
                - -
                853  auto name = node.get_node_name();
                -
                854 
                -
                855  // name of return variable
                -
                856  std::string return_var;
                -
                857  if (info.function_uses_table(name)) {
                -
                858  return_var = "ret_f_" + name;
                -
                859  } else {
                -
                860  return_var = "ret_" + name;
                -
                861  }
                + +
                848  auto name = node.get_node_name();
                +
                849 
                +
                850  // name of return variable
                +
                851  std::string return_var;
                +
                852  if (info.function_uses_table(name)) {
                +
                853  return_var = "ret_f_" + name;
                +
                854  } else {
                +
                855  return_var = "ret_" + name;
                +
                856  }
                +
                857 
                +
                858  // first rename return variable name
                +
                859  auto block = node.get_statement_block().get();
                +
                860  RenameVisitor v(name, return_var);
                +
                861  block->accept(v);
                862 
                -
                863  // first rename return variable name
                -
                864  auto block = node.get_statement_block().get();
                -
                865  RenameVisitor v(name, return_var);
                -
                866  block->accept(v);
                -
                867 
                -
                868  print_function_procedure_helper(node);
                -
                869 }
                -
                870 
                -
                871 
                - -
                873  auto name = node.get_node_name();
                -
                874  const auto& p = node.get_parameters();
                -
                875  auto params = internal_method_parameters();
                -
                876  for (const auto& i: p) {
                -
                877  params.emplace_back("", "double", "", i->get_node_name());
                -
                878  }
                -
                879  printer->fmt_line("double {}({})", method_name(name), get_parameter_str(params));
                -
                880  printer->push_block();
                -
                881  printer->fmt_line("double _arg[{}];", p.size());
                -
                882  for (size_t i = 0; i < p.size(); ++i) {
                -
                883  printer->fmt_line("_arg[{}] = {};", i, p[i]->get_node_name());
                -
                884  }
                -
                885  printer->fmt_line("return hoc_func_table({}, {}, _arg);",
                -
                886  get_variable_name(std::string("_ptable_" + name), true),
                -
                887  p.size());
                -
                888  printer->pop_block();
                -
                889 
                -
                890  printer->fmt_push_block("double table_{}()", method_name(name));
                -
                891  printer->fmt_line("hoc_spec_table(&{}, {});",
                -
                892  get_variable_name(std::string("_ptable_" + name)),
                -
                893  p.size());
                -
                894  printer->add_line("return 0.;");
                -
                895  printer->pop_block();
                -
                896 }
                -
                897 
                -
                898 
                -
                899 /**
                -
                900  * @brief Checks whether the functor_block generated by sympy solver modifies any variable outside
                -
                901  * its scope. If it does then return false, so that the operator() of the struct functor of the
                -
                902  * Eigen Newton solver doesn't have const qualifier.
                -
                903  *
                -
                904  * @param variable_block Statement Block of the variables declarations used in the functor struct of
                -
                905  * the solver
                -
                906  * @param functor_block Actual code being printed in the operator() of the functor struct of the
                -
                907  * solver
                -
                908  * @return True if operator() is const else False
                -
                909  */
                - -
                911  const ast::StatementBlock& functor_block) {
                -
                912  // Create complete_block with both variable declarations (done in variable_block) and solver
                -
                913  // part (done in functor_block) to be able to run the SymtabVisitor and DefUseAnalyzeVisitor
                -
                914  // then and get the proper DUChains for the variables defined in the variable_block
                -
                915  ast::StatementBlock complete_block(functor_block);
                -
                916  // Typically variable_block has only one statement, a statement containing the declaration
                -
                917  // of the local variables
                -
                918  for (const auto& statement: variable_block.get_statements()) {
                -
                919  complete_block.insert_statement(complete_block.get_statements().begin(), statement);
                -
                920  }
                -
                921 
                -
                922  // Create Symbol Table for complete_block
                -
                923  auto model_symbol_table = std::make_shared<symtab::ModelSymbolTable>();
                -
                924  SymtabVisitor(model_symbol_table.get()).visit_statement_block(complete_block);
                -
                925  // Initialize DefUseAnalyzeVisitor to generate the DUChains for the variables defined in the
                -
                926  // variable_block
                -
                927  DefUseAnalyzeVisitor v(*complete_block.get_symbol_table());
                -
                928 
                -
                929  // Check the DUChains for all the variables in the variable_block
                -
                930  // If variable is defined in complete_block don't add const quilifier in operator()
                -
                931  auto is_functor_const = true;
                -
                932  const auto& variables = collect_nodes(variable_block, {ast::AstNodeType::LOCAL_VAR});
                -
                933  for (const auto& variable: variables) {
                -
                934  const auto& chain = v.analyze(complete_block, variable->get_node_name());
                -
                935  is_functor_const = !(chain.eval() == DUState::D || chain.eval() == DUState::LD ||
                -
                936  chain.eval() == DUState::CD);
                -
                937  if (!is_functor_const) {
                -
                938  break;
                -
                939  }
                -
                940  }
                -
                941 
                -
                942  return is_functor_const;
                -
                943 }
                -
                944 
                -
                945 
                - -
                947  const ast::EigenNewtonSolverBlock& node) {
                -
                948  // functor that evaluates F(X) and J(X) for
                -
                949  // Newton solver
                -
                950  auto float_type = default_float_data_type();
                -
                951  int N = node.get_n_state_vars()->get_value();
                -
                952 
                -
                953  const auto functor_name = info.functor_names[&node];
                -
                954  printer->fmt_push_block("struct {0}", functor_name);
                -
                955  printer->add_line("NrnThread* nt;");
                -
                956  printer->add_line(instance_struct(), "* inst;");
                -
                957  printer->add_line("int id, pnodecount;");
                -
                958  printer->add_line("double v;");
                -
                959  printer->add_line("const Datum* indexes;");
                -
                960  printer->add_line("double* data;");
                -
                961  printer->add_line("ThreadDatum* thread;");
                -
                962 
                -
                963  if (ion_variable_struct_required()) {
                -
                964  print_ion_variable();
                -
                965  }
                -
                966 
                -
                967  print_statement_block(*node.get_variable_block(), false, false);
                +
                863  print_function_procedure_helper(node);
                +
                864 }
                +
                865 
                +
                866 
                + +
                868  auto name = node.get_node_name();
                +
                869  const auto& p = node.get_parameters();
                +
                870  auto params = internal_method_parameters();
                +
                871  for (const auto& i: p) {
                +
                872  params.emplace_back("", "double", "", i->get_node_name());
                +
                873  }
                +
                874  printer->fmt_line("double {}({})", method_name(name), get_parameter_str(params));
                +
                875  printer->push_block();
                +
                876  printer->fmt_line("double _arg[{}];", p.size());
                +
                877  for (size_t i = 0; i < p.size(); ++i) {
                +
                878  printer->fmt_line("_arg[{}] = {};", i, p[i]->get_node_name());
                +
                879  }
                +
                880  printer->fmt_line("return hoc_func_table({}, {}, _arg);",
                +
                881  get_variable_name(std::string("_ptable_" + name), true),
                +
                882  p.size());
                +
                883  printer->pop_block();
                +
                884 
                +
                885  printer->fmt_push_block("double table_{}()", method_name(name));
                +
                886  printer->fmt_line("hoc_spec_table(&{}, {});",
                +
                887  get_variable_name(std::string("_ptable_" + name)),
                +
                888  p.size());
                +
                889  printer->add_line("return 0.;");
                +
                890  printer->pop_block();
                +
                891 }
                +
                892 
                +
                893 
                +
                894 /**
                +
                895  * @brief Checks whether the functor_block generated by sympy solver modifies any variable outside
                +
                896  * its scope. If it does then return false, so that the operator() of the struct functor of the
                +
                897  * Eigen Newton solver doesn't have const qualifier.
                +
                898  *
                +
                899  * @param variable_block Statement Block of the variables declarations used in the functor struct of
                +
                900  * the solver
                +
                901  * @param functor_block Actual code being printed in the operator() of the functor struct of the
                +
                902  * solver
                +
                903  * @return True if operator() is const else False
                +
                904  */
                + +
                906  const ast::StatementBlock& functor_block) {
                +
                907  // Create complete_block with both variable declarations (done in variable_block) and solver
                +
                908  // part (done in functor_block) to be able to run the SymtabVisitor and DefUseAnalyzeVisitor
                +
                909  // then and get the proper DUChains for the variables defined in the variable_block
                +
                910  ast::StatementBlock complete_block(functor_block);
                +
                911  // Typically variable_block has only one statement, a statement containing the declaration
                +
                912  // of the local variables
                +
                913  for (const auto& statement: variable_block.get_statements()) {
                +
                914  complete_block.insert_statement(complete_block.get_statements().begin(), statement);
                +
                915  }
                +
                916 
                +
                917  // Create Symbol Table for complete_block
                +
                918  auto model_symbol_table = std::make_shared<symtab::ModelSymbolTable>();
                +
                919  SymtabVisitor(model_symbol_table.get()).visit_statement_block(complete_block);
                +
                920  // Initialize DefUseAnalyzeVisitor to generate the DUChains for the variables defined in the
                +
                921  // variable_block
                +
                922  DefUseAnalyzeVisitor v(*complete_block.get_symbol_table());
                +
                923 
                +
                924  // Check the DUChains for all the variables in the variable_block
                +
                925  // If variable is defined in complete_block don't add const quilifier in operator()
                +
                926  auto is_functor_const = true;
                +
                927  const auto& variables = collect_nodes(variable_block, {ast::AstNodeType::LOCAL_VAR});
                +
                928  for (const auto& variable: variables) {
                +
                929  const auto& chain = v.analyze(complete_block, variable->get_node_name());
                +
                930  is_functor_const = !(chain.eval() == DUState::D || chain.eval() == DUState::LD ||
                +
                931  chain.eval() == DUState::CD);
                +
                932  if (!is_functor_const) {
                +
                933  break;
                +
                934  }
                +
                935  }
                +
                936 
                +
                937  return is_functor_const;
                +
                938 }
                +
                939 
                +
                940 
                + +
                942  const ast::EigenNewtonSolverBlock& node) {
                +
                943  // functor that evaluates F(X) and J(X) for
                +
                944  // Newton solver
                +
                945  auto float_type = default_float_data_type();
                +
                946  int N = node.get_n_state_vars()->get_value();
                +
                947 
                +
                948  const auto functor_name = info.functor_names[&node];
                +
                949  printer->fmt_push_block("struct {0}", functor_name);
                +
                950  printer->add_line("NrnThread* nt;");
                +
                951  printer->add_line(instance_struct(), "* inst;");
                +
                952  printer->add_line("int id, pnodecount;");
                +
                953  printer->add_line("double v;");
                +
                954  printer->add_line("const Datum* indexes;");
                +
                955  printer->add_line("double* data;");
                +
                956  printer->add_line("ThreadDatum* thread;");
                +
                957 
                +
                958  if (ion_variable_struct_required()) {
                +
                959  print_ion_variable();
                +
                960  }
                +
                961 
                +
                962  print_statement_block(*node.get_variable_block(), false, false);
                +
                963  printer->add_newline();
                +
                964 
                +
                965  printer->push_block("void initialize()");
                +
                966  print_statement_block(*node.get_initialize_block(), false, false);
                +
                967  printer->pop_block();
                968  printer->add_newline();
                969 
                -
                970  printer->push_block("void initialize()");
                -
                971  print_statement_block(*node.get_initialize_block(), false, false);
                -
                972  printer->pop_block();
                -
                973  printer->add_newline();
                -
                974 
                -
                975  printer->fmt_line(
                -
                976  "{0}(NrnThread* nt, {1}* inst, int id, int pnodecount, double v, const Datum* indexes, "
                -
                977  "double* data, ThreadDatum* thread) : "
                -
                978  "nt{{nt}}, inst{{inst}}, id{{id}}, pnodecount{{pnodecount}}, v{{v}}, indexes{{indexes}}, "
                -
                979  "data{{data}}, thread{{thread}} "
                -
                980  "{{}}",
                -
                981  functor_name,
                -
                982  instance_struct());
                +
                970  printer->fmt_line(
                +
                971  "{0}(NrnThread* nt, {1}* inst, int id, int pnodecount, double v, const Datum* indexes, "
                +
                972  "double* data, ThreadDatum* thread) : "
                +
                973  "nt{{nt}}, inst{{inst}}, id{{id}}, pnodecount{{pnodecount}}, v{{v}}, indexes{{indexes}}, "
                +
                974  "data{{data}}, thread{{thread}} "
                +
                975  "{{}}",
                +
                976  functor_name,
                +
                977  instance_struct());
                +
                978 
                +
                979  printer->add_indent();
                +
                980 
                +
                981  const auto& variable_block = *node.get_variable_block();
                +
                982  const auto& functor_block = *node.get_functor_block();
                983 
                -
                984  printer->add_indent();
                -
                985 
                -
                986  const auto& variable_block = *node.get_variable_block();
                -
                987  const auto& functor_block = *node.get_functor_block();
                -
                988 
                -
                989  printer->fmt_text(
                -
                990  "void operator()(const Eigen::Matrix<{0}, {1}, 1>& nmodl_eigen_xm, Eigen::Matrix<{0}, {1}, "
                -
                991  "1>& nmodl_eigen_fm, "
                -
                992  "Eigen::Matrix<{0}, {1}, {1}>& nmodl_eigen_jm) {2}",
                -
                993  float_type,
                -
                994  N,
                -
                995  is_functor_const(variable_block, functor_block) ? "const " : "");
                -
                996  printer->push_block();
                -
                997  printer->fmt_line("const {}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                -
                998  printer->fmt_line("{}* nmodl_eigen_j = nmodl_eigen_jm.data();", float_type);
                -
                999  printer->fmt_line("{}* nmodl_eigen_f = nmodl_eigen_fm.data();", float_type);
                -
                1000  print_statement_block(functor_block, false, false);
                -
                1001  printer->pop_block();
                -
                1002  printer->add_newline();
                +
                984  printer->fmt_text(
                +
                985  "void operator()(const Eigen::Matrix<{0}, {1}, 1>& nmodl_eigen_xm, Eigen::Matrix<{0}, {1}, "
                +
                986  "1>& nmodl_eigen_fm, "
                +
                987  "Eigen::Matrix<{0}, {1}, {1}>& nmodl_eigen_jm) {2}",
                +
                988  float_type,
                +
                989  N,
                +
                990  is_functor_const(variable_block, functor_block) ? "const " : "");
                +
                991  printer->push_block();
                +
                992  printer->fmt_line("const {}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                +
                993  printer->fmt_line("{}* nmodl_eigen_j = nmodl_eigen_jm.data();", float_type);
                +
                994  printer->fmt_line("{}* nmodl_eigen_f = nmodl_eigen_fm.data();", float_type);
                +
                995  print_statement_block(functor_block, false, false);
                +
                996  printer->pop_block();
                +
                997  printer->add_newline();
                +
                998 
                +
                999  // assign newton solver results in matrix X to state vars
                +
                1000  printer->push_block("void finalize()");
                +
                1001  print_statement_block(*node.get_finalize_block(), false, false);
                +
                1002  printer->pop_block();
                1003 
                -
                1004  // assign newton solver results in matrix X to state vars
                -
                1005  printer->push_block("void finalize()");
                -
                1006  print_statement_block(*node.get_finalize_block(), false, false);
                -
                1007  printer->pop_block();
                -
                1008 
                -
                1009  printer->pop_block(";");
                -
                1010 }
                -
                1011 
                -
                1012 
                -
                1013 void CodegenCoreneuronCppVisitor::print_eigen_linear_solver(const std::string& float_type, int N) {
                -
                1014  if (N <= 4) {
                -
                1015  // Faster compared to LU, given the template specialization in Eigen.
                -
                1016  printer->add_multi_line(R"CODE(
                -
                1017  bool invertible;
                -
                1018  nmodl_eigen_jm.computeInverseWithCheck(nmodl_eigen_jm_inv,invertible);
                -
                1019  nmodl_eigen_xm = nmodl_eigen_jm_inv*nmodl_eigen_fm;
                -
                1020  if (!invertible) assert(false && "Singular or ill-conditioned matrix (Eigen::inverse)!");
                -
                1021  )CODE");
                -
                1022  } else {
                -
                1023  // In Eigen the default storage order is ColMajor.
                -
                1024  // Crout's implementation requires matrices stored in RowMajor order (C++-style arrays).
                -
                1025  // Therefore, the transposeInPlace is critical such that the data() method to give the rows
                -
                1026  // instead of the columns.
                -
                1027  printer->add_line("if (!nmodl_eigen_jm.IsRowMajor) nmodl_eigen_jm.transposeInPlace();");
                -
                1028 
                -
                1029  // pivot vector
                -
                1030  printer->fmt_line("Eigen::Matrix<int, {}, 1> pivot;", N);
                -
                1031  printer->fmt_line("Eigen::Matrix<{0}, {1}, 1> rowmax;", float_type, N);
                -
                1032 
                -
                1033  // In-place LU-Decomposition (Crout Algo) : Jm is replaced by its LU-decomposition
                -
                1034  printer->fmt_line(
                -
                1035  "if (nmodl::crout::Crout<{0}>({1}, nmodl_eigen_jm.data(), pivot.data(), rowmax.data()) "
                -
                1036  "< 0) assert(false && \"Singular or ill-conditioned matrix (nmodl::crout)!\");",
                -
                1037  float_type,
                -
                1038  N);
                -
                1039 
                -
                1040  // Solve the linear system : Forward/Backward substitution part
                -
                1041  printer->fmt_line(
                -
                1042  "nmodl::crout::solveCrout<{0}>({1}, nmodl_eigen_jm.data(), nmodl_eigen_fm.data(), "
                -
                1043  "nmodl_eigen_xm.data(), pivot.data());",
                -
                1044  float_type,
                -
                1045  N);
                -
                1046  }
                -
                1047 }
                +
                1004  printer->pop_block(";");
                +
                1005 }
                +
                1006 
                +
                1007 
                +
                1008 void CodegenCoreneuronCppVisitor::print_eigen_linear_solver(const std::string& float_type, int N) {
                +
                1009  if (N <= 4) {
                +
                1010  // Faster compared to LU, given the template specialization in Eigen.
                +
                1011  printer->add_multi_line(R"CODE(
                +
                1012  bool invertible;
                +
                1013  nmodl_eigen_jm.computeInverseWithCheck(nmodl_eigen_jm_inv,invertible);
                +
                1014  nmodl_eigen_xm = nmodl_eigen_jm_inv*nmodl_eigen_fm;
                +
                1015  if (!invertible) assert(false && "Singular or ill-conditioned matrix (Eigen::inverse)!");
                +
                1016  )CODE");
                +
                1017  } else {
                +
                1018  // In Eigen the default storage order is ColMajor.
                +
                1019  // Crout's implementation requires matrices stored in RowMajor order (C++-style arrays).
                +
                1020  // Therefore, the transposeInPlace is critical such that the data() method to give the rows
                +
                1021  // instead of the columns.
                +
                1022  printer->add_line("if (!nmodl_eigen_jm.IsRowMajor) nmodl_eigen_jm.transposeInPlace();");
                +
                1023 
                +
                1024  // pivot vector
                +
                1025  printer->fmt_line("Eigen::Matrix<int, {}, 1> pivot;", N);
                +
                1026  printer->fmt_line("Eigen::Matrix<{0}, {1}, 1> rowmax;", float_type, N);
                +
                1027 
                +
                1028  // In-place LU-Decomposition (Crout Algo) : Jm is replaced by its LU-decomposition
                +
                1029  printer->fmt_line(
                +
                1030  "if (nmodl::crout::Crout<{0}>({1}, nmodl_eigen_jm.data(), pivot.data(), rowmax.data()) "
                +
                1031  "< 0) assert(false && \"Singular or ill-conditioned matrix (nmodl::crout)!\");",
                +
                1032  float_type,
                +
                1033  N);
                +
                1034 
                +
                1035  // Solve the linear system : Forward/Backward substitution part
                +
                1036  printer->fmt_line(
                +
                1037  "nmodl::crout::solveCrout<{0}>({1}, nmodl_eigen_jm.data(), nmodl_eigen_fm.data(), "
                +
                1038  "nmodl_eigen_xm.data(), pivot.data());",
                +
                1039  float_type,
                +
                1040  N);
                +
                1041  }
                +
                1042 }
                +
                1043 
                +
                1044 
                +
                1045 /****************************************************************************************/
                +
                1046 /* Code-specific helper routines */
                +
                1047 /****************************************************************************************/
                1048 
                1049 
                -
                1050 /****************************************************************************************/
                -
                1051 /* Code-specific helper routines */
                -
                1052 /****************************************************************************************/
                -
                1053 
                -
                1054 
                - -
                1056  if (ion_variable_struct_required()) {
                -
                1057  return "id, pnodecount, inst, ionvar, data, indexes, thread, nt, v";
                -
                1058  }
                -
                1059  return "id, pnodecount, inst, data, indexes, thread, nt, v";
                -
                1060 }
                -
                1061 
                -
                1062 
                -
                1063 /**
                -
                1064  * @todo: figure out how to correctly handle qualifiers
                -
                1065  */
                - -
                1067  ParamVector params;
                -
                1068  params.emplace_back("", "int", "", "id");
                -
                1069  params.emplace_back("", "int", "", "pnodecount");
                -
                1070  params.emplace_back("", fmt::format("{}*", instance_struct()), "", "inst");
                -
                1071  if (ion_variable_struct_required()) {
                -
                1072  params.emplace_back("", "IonCurVar&", "", "ionvar");
                -
                1073  }
                -
                1074  params.emplace_back("", "double*", "", "data");
                -
                1075  params.emplace_back("const ", "Datum*", "", "indexes");
                -
                1076  params.emplace_back("", "ThreadDatum*", "", "thread");
                -
                1077  params.emplace_back("", "NrnThread*", "", "nt");
                -
                1078  params.emplace_back("", "double", "", "v");
                -
                1079  return params;
                + +
                1051  if (ion_variable_struct_required()) {
                +
                1052  return "id, pnodecount, inst, ionvar, data, indexes, thread, nt, v";
                +
                1053  }
                +
                1054  return "id, pnodecount, inst, data, indexes, thread, nt, v";
                +
                1055 }
                +
                1056 
                +
                1057 
                +
                1058 /**
                +
                1059  * @todo: figure out how to correctly handle qualifiers
                +
                1060  */
                + +
                1062  ParamVector params;
                +
                1063  params.emplace_back("", "int", "", "id");
                +
                1064  params.emplace_back("", "int", "", "pnodecount");
                +
                1065  params.emplace_back("", fmt::format("{}*", instance_struct()), "", "inst");
                +
                1066  if (ion_variable_struct_required()) {
                +
                1067  params.emplace_back("", "IonCurVar&", "", "ionvar");
                +
                1068  }
                +
                1069  params.emplace_back("", "double*", "", "data");
                +
                1070  params.emplace_back("const ", "Datum*", "", "indexes");
                +
                1071  params.emplace_back("", "ThreadDatum*", "", "thread");
                +
                1072  params.emplace_back("", "NrnThread*", "", "nt");
                +
                1073  params.emplace_back("", "double", "", "v");
                +
                1074  return params;
                +
                1075 }
                +
                1076 
                +
                1077 
                + +
                1079  return "id, pnodecount, data, indexes, thread, nt, ml, v";
                1080 }
                1081 
                1082 
                - -
                1084  return "id, pnodecount, data, indexes, thread, nt, ml, v";
                -
                1085 }
                -
                1086 
                -
                1087 
                - -
                1089  if (table) {
                -
                1090  return "int id, int pnodecount, double* data, Datum* indexes, "
                -
                1091  "ThreadDatum* thread, NrnThread* nt, Memb_list* ml, int tml_id";
                -
                1092  }
                -
                1093  return "int id, int pnodecount, double* data, Datum* indexes, "
                -
                1094  "ThreadDatum* thread, NrnThread* nt, Memb_list* ml, double v";
                -
                1095 }
                -
                1096 
                -
                1097 
                - -
                1099  if (ion_variable_struct_required()) {
                -
                1100  return "id, pnodecount, ionvar, data, indexes, thread, nt, ml, v";
                -
                1101  }
                -
                1102  return "id, pnodecount, data, indexes, thread, nt, ml, v";
                -
                1103 }
                -
                1104 
                -
                1105 
                -
                1106 /**
                -
                1107  * Function call arguments when function or procedure is defined in the
                -
                1108  * same mod file itself
                -
                1109  */
                - -
                1111  if (ion_variable_struct_required()) {
                -
                1112  return "id, pnodecount, inst, ionvar, data, indexes, thread, nt, v";
                -
                1113  }
                -
                1114  return "id, pnodecount, inst, data, indexes, thread, nt, v";
                -
                1115 }
                -
                1116 
                -
                1117 
                -
                1118 /**
                -
                1119  * Replace commonly used variables in the verbatim blocks into their corresponding
                -
                1120  * variable name in the new code generation backend.
                -
                1121  */
                - - -
                1124  name = naming::VERBATIM_VARIABLES_MAPPING.at(name);
                -
                1125  }
                -
                1126 
                -
                1127  /**
                -
                1128  * if function is defined the same mod file then the arguments must
                -
                1129  * contain mechanism instance as well.
                -
                1130  */
                -
                1131  if (name == naming::THREAD_ARGS) {
                -
                1132  if (internal_method_call_encountered) {
                -
                1133  name = nrn_thread_internal_arguments();
                -
                1134  internal_method_call_encountered = false;
                -
                1135  } else {
                -
                1136  name = nrn_thread_arguments();
                -
                1137  }
                -
                1138  }
                -
                1139  if (name == naming::THREAD_ARGS_PROTO) {
                -
                1140  name = external_method_parameters();
                -
                1141  }
                -
                1142  return name;
                -
                1143 }
                -
                1144 
                -
                1145 
                -
                1146 /**
                -
                1147  * Processing commonly used constructs in the verbatim blocks.
                -
                1148  * @todo : this is still ad-hoc and requires re-implementation to
                -
                1149  * handle it more elegantly.
                -
                1150  */
                -
                1151 std::string CodegenCoreneuronCppVisitor::process_verbatim_text(std::string const& text) {
                - -
                1153  driver.scan_string(text);
                -
                1154  auto tokens = driver.all_tokens();
                -
                1155  std::string result;
                -
                1156  for (size_t i = 0; i < tokens.size(); i++) {
                -
                1157  auto token = tokens[i];
                -
                1158 
                -
                1159  // check if we have function call in the verbatim block where
                -
                1160  // function is defined in the same mod file
                -
                1161  if (program_symtab->is_method_defined(token) && tokens[i + 1] == "(") {
                -
                1162  internal_method_call_encountered = true;
                + +
                1084  if (table) {
                +
                1085  return "int id, int pnodecount, double* data, Datum* indexes, "
                +
                1086  "ThreadDatum* thread, NrnThread* nt, Memb_list* ml, int tml_id";
                +
                1087  }
                +
                1088  return "int id, int pnodecount, double* data, Datum* indexes, "
                +
                1089  "ThreadDatum* thread, NrnThread* nt, Memb_list* ml, double v";
                +
                1090 }
                +
                1091 
                +
                1092 
                + +
                1094  if (ion_variable_struct_required()) {
                +
                1095  return "id, pnodecount, ionvar, data, indexes, thread, nt, ml, v";
                +
                1096  }
                +
                1097  return "id, pnodecount, data, indexes, thread, nt, ml, v";
                +
                1098 }
                +
                1099 
                +
                1100 
                +
                1101 /**
                +
                1102  * Function call arguments when function or procedure is defined in the
                +
                1103  * same mod file itself
                +
                1104  */
                + +
                1106  if (ion_variable_struct_required()) {
                +
                1107  return "id, pnodecount, inst, ionvar, data, indexes, thread, nt, v";
                +
                1108  }
                +
                1109  return "id, pnodecount, inst, data, indexes, thread, nt, v";
                +
                1110 }
                +
                1111 
                +
                1112 
                +
                1113 /**
                +
                1114  * Replace commonly used variables in the verbatim blocks into their corresponding
                +
                1115  * variable name in the new code generation backend.
                +
                1116  */
                + + +
                1119  name = naming::VERBATIM_VARIABLES_MAPPING.at(name);
                +
                1120  }
                +
                1121 
                +
                1122  /**
                +
                1123  * if function is defined the same mod file then the arguments must
                +
                1124  * contain mechanism instance as well.
                +
                1125  */
                +
                1126  if (name == naming::THREAD_ARGS) {
                +
                1127  if (internal_method_call_encountered) {
                +
                1128  name = nrn_thread_internal_arguments();
                +
                1129  internal_method_call_encountered = false;
                +
                1130  } else {
                +
                1131  name = nrn_thread_arguments();
                +
                1132  }
                +
                1133  }
                +
                1134  if (name == naming::THREAD_ARGS_PROTO) {
                +
                1135  name = external_method_parameters();
                +
                1136  }
                +
                1137  return name;
                +
                1138 }
                +
                1139 
                +
                1140 
                +
                1141 /**
                +
                1142  * Processing commonly used constructs in the verbatim blocks.
                +
                1143  * @todo : this is still ad-hoc and requires re-implementation to
                +
                1144  * handle it more elegantly.
                +
                1145  */
                +
                1146 std::string CodegenCoreneuronCppVisitor::process_verbatim_text(std::string const& text) {
                + +
                1148  driver.scan_string(text);
                +
                1149  auto tokens = driver.all_tokens();
                +
                1150  std::string result;
                +
                1151  for (size_t i = 0; i < tokens.size(); i++) {
                +
                1152  auto token = tokens[i];
                +
                1153 
                +
                1154  // check if we have function call in the verbatim block where
                +
                1155  // function is defined in the same mod file
                +
                1156  if (program_symtab->is_method_defined(token) && tokens[i + 1] == "(") {
                +
                1157  internal_method_call_encountered = true;
                +
                1158  }
                +
                1159  auto name = process_verbatim_token(token);
                +
                1160 
                +
                1161  if (token == (std::string("_") + naming::TQITEM_VARIABLE)) {
                +
                1162  name.insert(0, 1, '&');
                1163  }
                -
                1164  auto name = process_verbatim_token(token);
                -
                1165 
                -
                1166  if (token == (std::string("_") + naming::TQITEM_VARIABLE)) {
                -
                1167  name.insert(0, 1, '&');
                -
                1168  }
                -
                1169  if (token == "_STRIDE") {
                -
                1170  name = "pnodecount+id";
                -
                1171  }
                -
                1172  result += name;
                -
                1173  }
                -
                1174  return result;
                -
                1175 }
                -
                1176 
                -
                1177 
                - -
                1179  auto nrn_channel_info_var_name = get_channel_info_var_name();
                -
                1180  auto nrn_cur = nrn_cur_required() ? method_name(naming::NRN_CUR_METHOD) : "nullptr";
                -
                1181  auto nrn_state = nrn_state_required() ? method_name(naming::NRN_STATE_METHOD) : "nullptr";
                -
                1182  auto nrn_alloc = method_name(naming::NRN_ALLOC_METHOD);
                -
                1183  auto nrn_init = method_name(naming::NRN_INIT_METHOD);
                -
                1184  auto const nrn_private_constructor = method_name(naming::NRN_PRIVATE_CONSTRUCTOR_METHOD);
                -
                1185  auto const nrn_private_destructor = method_name(naming::NRN_PRIVATE_DESTRUCTOR_METHOD);
                -
                1186  return fmt::format("{}, {}, {}, nullptr, {}, {}, {}, {}, first_pointer_var_index()",
                -
                1187  nrn_channel_info_var_name,
                -
                1188  nrn_alloc,
                -
                1189  nrn_cur,
                -
                1190  nrn_state,
                -
                1191  nrn_init,
                -
                1192  nrn_private_constructor,
                -
                1193  nrn_private_destructor);
                -
                1194 }
                -
                1195 
                +
                1164  if (token == "_STRIDE") {
                +
                1165  name = "pnodecount+id";
                +
                1166  }
                +
                1167  result += name;
                +
                1168  }
                +
                1169  return result;
                +
                1170 }
                +
                1171 
                +
                1172 
                + +
                1174  auto nrn_channel_info_var_name = get_channel_info_var_name();
                +
                1175  auto nrn_cur = nrn_cur_required() ? method_name(naming::NRN_CUR_METHOD) : "nullptr";
                +
                1176  auto nrn_state = nrn_state_required() ? method_name(naming::NRN_STATE_METHOD) : "nullptr";
                +
                1177  auto nrn_alloc = method_name(naming::NRN_ALLOC_METHOD);
                +
                1178  auto nrn_init = method_name(naming::NRN_INIT_METHOD);
                +
                1179  auto const nrn_private_constructor = method_name(naming::NRN_PRIVATE_CONSTRUCTOR_METHOD);
                +
                1180  auto const nrn_private_destructor = method_name(naming::NRN_PRIVATE_DESTRUCTOR_METHOD);
                +
                1181  return fmt::format("{}, {}, {}, nullptr, {}, {}, {}, {}, first_pointer_var_index()",
                +
                1182  nrn_channel_info_var_name,
                +
                1183  nrn_alloc,
                +
                1184  nrn_cur,
                +
                1185  nrn_state,
                +
                1186  nrn_init,
                +
                1187  nrn_private_constructor,
                +
                1188  nrn_private_destructor);
                +
                1189 }
                +
                1190 
                +
                1191 
                +
                1192 std::pair<std::string, std::string> CodegenCoreneuronCppVisitor::read_ion_variable_name(
                +
                1193  const std::string& name) {
                +
                1194  return {name, naming::ION_VARNAME_PREFIX + name};
                +
                1195 }
                1196 
                -
                1197 std::pair<std::string, std::string> CodegenCoreneuronCppVisitor::read_ion_variable_name(
                -
                1198  const std::string& name) {
                -
                1199  return {name, naming::ION_VARNAME_PREFIX + name};
                -
                1200 }
                -
                1201 
                +
                1197 
                +
                1198 std::pair<std::string, std::string> CodegenCoreneuronCppVisitor::write_ion_variable_name(
                +
                1199  const std::string& name) {
                +
                1200  return {naming::ION_VARNAME_PREFIX + name, name};
                +
                1201 }
                1202 
                -
                1203 std::pair<std::string, std::string> CodegenCoreneuronCppVisitor::write_ion_variable_name(
                -
                1204  const std::string& name) {
                -
                1205  return {naming::ION_VARNAME_PREFIX + name, name};
                -
                1206 }
                -
                1207 
                -
                1208 
                -
                1209 std::string CodegenCoreneuronCppVisitor::conc_write_statement(const std::string& ion_name,
                -
                1210  const std::string& concentration,
                -
                1211  int index) {
                -
                1212  auto conc_var_name = get_variable_name(naming::ION_VARNAME_PREFIX + concentration);
                -
                1213  auto style_var_name = get_variable_name("style_" + ion_name);
                -
                1214  return fmt::format(
                -
                1215  "nrn_wrote_conc({}_type,"
                -
                1216  " &({}),"
                -
                1217  " {},"
                -
                1218  " {},"
                -
                1219  " nrn_ion_global_map,"
                -
                1220  " {},"
                -
                1221  " nt->_ml_list[{}_type]->_nodecount_padded)",
                -
                1222  ion_name,
                -
                1223  conc_var_name,
                -
                1224  index,
                -
                1225  style_var_name,
                -
                1226  get_variable_name(naming::CELSIUS_VARIABLE),
                -
                1227  ion_name);
                -
                1228 }
                -
                1229 
                -
                1230 
                -
                1231 /**
                -
                1232  * If mechanisms dependency level execution is enabled then certain updates
                -
                1233  * like ionic current contributions needs to be atomically updated. In this
                -
                1234  * case we first update current mechanism's shadow vector and then add statement
                -
                1235  * to queue that will be used in reduction queue.
                -
                1236  */
                - -
                1238  const ShadowUseStatement& statement,
                -
                1239  BlockType /* type */) {
                -
                1240  // when there is no operator or rhs then that statement doesn't need shadow update
                -
                1241  if (statement.op.empty() && statement.rhs.empty()) {
                -
                1242  auto text = statement.lhs + ";";
                -
                1243  return text;
                -
                1244  }
                -
                1245 
                -
                1246  // return regular statement
                -
                1247  auto lhs = get_variable_name(statement.lhs);
                -
                1248  auto text = fmt::format("{} {} {};", lhs, statement.op, statement.rhs);
                -
                1249  return text;
                -
                1250 }
                +
                1203 
                +
                1204 std::string CodegenCoreneuronCppVisitor::conc_write_statement(const std::string& ion_name,
                +
                1205  const std::string& concentration,
                +
                1206  int index) {
                +
                1207  auto conc_var_name = get_variable_name(naming::ION_VARNAME_PREFIX + concentration);
                +
                1208  auto style_var_name = get_variable_name("style_" + ion_name);
                +
                1209  return fmt::format(
                +
                1210  "nrn_wrote_conc({}_type,"
                +
                1211  " &({}),"
                +
                1212  " {},"
                +
                1213  " {},"
                +
                1214  " nrn_ion_global_map,"
                +
                1215  " {},"
                +
                1216  " nt->_ml_list[{}_type]->_nodecount_padded)",
                +
                1217  ion_name,
                +
                1218  conc_var_name,
                +
                1219  index,
                +
                1220  style_var_name,
                +
                1221  get_variable_name(naming::CELSIUS_VARIABLE),
                +
                1222  ion_name);
                +
                1223 }
                +
                1224 
                +
                1225 
                +
                1226 /**
                +
                1227  * If mechanisms dependency level execution is enabled then certain updates
                +
                1228  * like ionic current contributions needs to be atomically updated. In this
                +
                1229  * case we first update current mechanism's shadow vector and then add statement
                +
                1230  * to queue that will be used in reduction queue.
                +
                1231  */
                + +
                1233  const ShadowUseStatement& statement,
                +
                1234  BlockType /* type */) {
                +
                1235  // when there is no operator or rhs then that statement doesn't need shadow update
                +
                1236  if (statement.op.empty() && statement.rhs.empty()) {
                +
                1237  auto text = statement.lhs + ";";
                +
                1238  return text;
                +
                1239  }
                +
                1240 
                +
                1241  // return regular statement
                +
                1242  auto lhs = get_variable_name(statement.lhs);
                +
                1243  auto text = fmt::format("{} {} {};", lhs, statement.op, statement.rhs);
                +
                1244  return text;
                +
                1245 }
                +
                1246 
                +
                1247 
                +
                1248 /****************************************************************************************/
                +
                1249 /* Code-specific printing routines for code generation */
                +
                1250 /****************************************************************************************/
                1251 
                1252 
                -
                1253 /****************************************************************************************/
                -
                1254 /* Code-specific printing routines for code generation */
                -
                1255 /****************************************************************************************/
                -
                1256 
                -
                1257 
                - -
                1259  printer->add_newline(2);
                -
                1260  print_device_method_annotation();
                -
                1261  printer->push_block("static inline int first_pointer_var_index()");
                -
                1262  printer->fmt_line("return {};", info.first_pointer_var_index);
                -
                1263  printer->pop_block();
                -
                1264 }
                -
                1265 
                -
                1266 
                - -
                1268  printer->add_newline(2);
                -
                1269  print_device_method_annotation();
                -
                1270  printer->push_block("static inline int float_variables_size()");
                -
                1271  printer->fmt_line("return {};", float_variables_size());
                -
                1272  printer->pop_block();
                -
                1273 
                -
                1274  printer->add_newline(2);
                -
                1275  print_device_method_annotation();
                -
                1276  printer->push_block("static inline int int_variables_size()");
                -
                1277  printer->fmt_line("return {};", int_variables_size());
                -
                1278  printer->pop_block();
                -
                1279 }
                -
                1280 
                -
                1281 
                - -
                1283  if (!net_receive_exist()) {
                -
                1284  return;
                -
                1285  }
                -
                1286  printer->add_newline(2);
                -
                1287  print_device_method_annotation();
                -
                1288  printer->push_block("static inline int num_net_receive_args()");
                -
                1289  printer->fmt_line("return {};", info.num_net_receive_parameters);
                -
                1290  printer->pop_block();
                -
                1291 }
                -
                1292 
                -
                1293 
                - -
                1295  printer->add_newline(2);
                -
                1296  print_device_method_annotation();
                -
                1297  printer->push_block("static inline int get_mech_type()");
                -
                1298  // false => get it from the host-only global struct, not the instance structure
                -
                1299  printer->fmt_line("return {};", get_variable_name("mech_type", false));
                -
                1300  printer->pop_block();
                -
                1301 }
                -
                1302 
                -
                1303 
                - -
                1305  printer->add_newline(2);
                -
                1306  print_device_method_annotation();
                -
                1307  printer->push_block("static inline Memb_list* get_memb_list(NrnThread* nt)");
                -
                1308  printer->push_block("if (!nt->_ml_list)");
                -
                1309  printer->add_line("return nullptr;");
                -
                1310  printer->pop_block();
                -
                1311  printer->add_line("return nt->_ml_list[get_mech_type()];");
                -
                1312  printer->pop_block();
                -
                1313 }
                -
                1314 
                + +
                1254  printer->add_newline(2);
                +
                1255  print_device_method_annotation();
                +
                1256  printer->push_block("static inline int first_pointer_var_index()");
                +
                1257  printer->fmt_line("return {};", info.first_pointer_var_index);
                +
                1258  printer->pop_block();
                +
                1259 }
                +
                1260 
                +
                1261 
                + +
                1263  printer->add_newline(2);
                +
                1264  print_device_method_annotation();
                +
                1265  printer->push_block("static inline int float_variables_size()");
                +
                1266  printer->fmt_line("return {};", float_variables_size());
                +
                1267  printer->pop_block();
                +
                1268 
                +
                1269  printer->add_newline(2);
                +
                1270  print_device_method_annotation();
                +
                1271  printer->push_block("static inline int int_variables_size()");
                +
                1272  printer->fmt_line("return {};", int_variables_size());
                +
                1273  printer->pop_block();
                +
                1274 }
                +
                1275 
                +
                1276 
                + +
                1278  if (!net_receive_exist()) {
                +
                1279  return;
                +
                1280  }
                +
                1281  printer->add_newline(2);
                +
                1282  print_device_method_annotation();
                +
                1283  printer->push_block("static inline int num_net_receive_args()");
                +
                1284  printer->fmt_line("return {};", info.num_net_receive_parameters);
                +
                1285  printer->pop_block();
                +
                1286 }
                +
                1287 
                +
                1288 
                + +
                1290  printer->add_newline(2);
                +
                1291  print_device_method_annotation();
                +
                1292  printer->push_block("static inline int get_mech_type()");
                +
                1293  // false => get it from the host-only global struct, not the instance structure
                +
                1294  printer->fmt_line("return {};", get_variable_name("mech_type", false));
                +
                1295  printer->pop_block();
                +
                1296 }
                +
                1297 
                +
                1298 
                + +
                1300  printer->add_newline(2);
                +
                1301  print_device_method_annotation();
                +
                1302  printer->push_block("static inline Memb_list* get_memb_list(NrnThread* nt)");
                +
                1303  printer->push_block("if (!nt->_ml_list)");
                +
                1304  printer->add_line("return nullptr;");
                +
                1305  printer->pop_block();
                +
                1306  printer->add_line("return nt->_ml_list[get_mech_type()];");
                +
                1307  printer->pop_block();
                +
                1308 }
                +
                1309 
                +
                1310 
                + +
                1312  printer->add_newline(2);
                +
                1313  printer->push_block("namespace coreneuron");
                +
                1314 }
                1315 
                - -
                1317  printer->add_newline(2);
                -
                1318  printer->push_block("namespace coreneuron");
                +
                1316 
                + +
                1318  printer->pop_block();
                1319 }
                1320 
                -
                1321 
                - -
                1323  printer->pop_block();
                -
                1324 }
                -
                1325 
                -
                1326 
                -
                1327 /**
                -
                1328  * \details There are three types of thread variables currently considered:
                -
                1329  * - top local thread variables
                -
                1330  * - thread variables in the mod file
                -
                1331  * - thread variables for solver
                -
                1332  *
                -
                1333  * These variables are allocated into different thread structures and have
                -
                1334  * corresponding thread ids. Thread id start from 0. In mod2c implementation,
                -
                1335  * thread_data_index is increased at various places and it is used to
                -
                1336  * decide the index of thread.
                -
                1337  */
                - -
                1339  if (info.vectorize && info.derivimplicit_used()) {
                -
                1340  int tid = info.derivimplicit_var_thread_id;
                -
                1341  int list = info.derivimplicit_list_num;
                -
                1342 
                -
                1343  // clang-format off
                -
                1344  printer->add_newline(2);
                -
                1345  printer->add_line("/** thread specific helper routines for derivimplicit */");
                -
                1346 
                -
                1347  printer->add_newline(1);
                -
                1348  printer->fmt_push_block("static inline int* deriv{}_advance(ThreadDatum* thread)", list);
                -
                1349  printer->fmt_line("return &(thread[{}].i);", tid);
                +
                1321 
                +
                1322 /**
                +
                1323  * \details There are three types of thread variables currently considered:
                +
                1324  * - top local thread variables
                +
                1325  * - thread variables in the mod file
                +
                1326  * - thread variables for solver
                +
                1327  *
                +
                1328  * These variables are allocated into different thread structures and have
                +
                1329  * corresponding thread ids. Thread id start from 0. In mod2c implementation,
                +
                1330  * thread_data_index is increased at various places and it is used to
                +
                1331  * decide the index of thread.
                +
                1332  */
                + +
                1334  if (info.vectorize && info.derivimplicit_used()) {
                +
                1335  int tid = info.derivimplicit_var_thread_id;
                +
                1336  int list = info.derivimplicit_list_num;
                +
                1337 
                +
                1338  // clang-format off
                +
                1339  printer->add_newline(2);
                +
                1340  printer->add_line("/** thread specific helper routines for derivimplicit */");
                +
                1341 
                +
                1342  printer->add_newline(1);
                +
                1343  printer->fmt_push_block("static inline int* deriv{}_advance(ThreadDatum* thread)", list);
                +
                1344  printer->fmt_line("return &(thread[{}].i);", tid);
                +
                1345  printer->pop_block();
                +
                1346  printer->add_newline();
                +
                1347 
                +
                1348  printer->fmt_push_block("static inline int dith{}()", list);
                +
                1349  printer->fmt_line("return {};", tid+1);
                1350  printer->pop_block();
                1351  printer->add_newline();
                1352 
                -
                1353  printer->fmt_push_block("static inline int dith{}()", list);
                -
                1354  printer->fmt_line("return {};", tid+1);
                +
                1353  printer->fmt_push_block("static inline void** newtonspace{}(ThreadDatum* thread)", list);
                +
                1354  printer->fmt_line("return &(thread[{}]._pvoid);", tid+2);
                1355  printer->pop_block();
                -
                1356  printer->add_newline();
                +
                1356  }
                1357 
                -
                1358  printer->fmt_push_block("static inline void** newtonspace{}(ThreadDatum* thread)", list);
                -
                1359  printer->fmt_line("return &(thread[{}]._pvoid);", tid+2);
                -
                1360  printer->pop_block();
                -
                1361  }
                -
                1362 
                -
                1363  if (info.vectorize && !info.thread_variables.empty()) {
                -
                1364  printer->add_newline(2);
                -
                1365  printer->add_line("/** tid for thread variables */");
                -
                1366  printer->push_block("static inline int thread_var_tid()");
                -
                1367  printer->fmt_line("return {};", info.thread_var_thread_id);
                -
                1368  printer->pop_block();
                -
                1369  }
                -
                1370 
                -
                1371  if (info.vectorize && !info.top_local_variables.empty()) {
                -
                1372  printer->add_newline(2);
                -
                1373  printer->add_line("/** tid for top local tread variables */");
                -
                1374  printer->push_block("static inline int top_local_var_tid()");
                -
                1375  printer->fmt_line("return {};", info.top_local_thread_id);
                -
                1376  printer->pop_block();
                -
                1377  }
                -
                1378  // clang-format on
                -
                1379 }
                +
                1358  if (info.vectorize && !info.thread_variables.empty()) {
                +
                1359  printer->add_newline(2);
                +
                1360  printer->add_line("/** tid for thread variables */");
                +
                1361  printer->push_block("static inline int thread_var_tid()");
                +
                1362  printer->fmt_line("return {};", info.thread_var_thread_id);
                +
                1363  printer->pop_block();
                +
                1364  }
                +
                1365 
                +
                1366  if (info.vectorize && !info.top_local_variables.empty()) {
                +
                1367  printer->add_newline(2);
                +
                1368  printer->add_line("/** tid for top local tread variables */");
                +
                1369  printer->push_block("static inline int top_local_var_tid()");
                +
                1370  printer->fmt_line("return {};", info.top_local_thread_id);
                +
                1371  printer->pop_block();
                +
                1372  }
                +
                1373  // clang-format on
                +
                1374 }
                +
                1375 
                +
                1376 
                +
                1377 /****************************************************************************************/
                +
                1378 /* Routines for returning variable name */
                +
                1379 /****************************************************************************************/
                1380 
                1381 
                -
                1382 /****************************************************************************************/
                -
                1383 /* Routines for returning variable name */
                -
                1384 /****************************************************************************************/
                -
                1385 
                -
                1386 
                - -
                1388  bool use_instance) const {
                -
                1389  auto name = symbol->get_name();
                -
                1390  auto dimension = symbol->get_length();
                -
                1391  auto position = position_of_float_var(name);
                -
                1392  // clang-format off
                -
                1393  if (symbol->is_array()) {
                -
                1394  if (use_instance) {
                -
                1395  return fmt::format("(inst->{}+id*{})", name, dimension);
                -
                1396  }
                -
                1397  return fmt::format("(data + {}*pnodecount + id*{})", position, dimension);
                -
                1398  }
                -
                1399  if (use_instance) {
                -
                1400  return fmt::format("inst->{}[id]", name);
                -
                1401  }
                -
                1402  return fmt::format("data[{}*pnodecount + id]", position);
                -
                1403  // clang-format on
                -
                1404 }
                -
                1405 
                -
                1406 
                - -
                1408  const std::string& name,
                -
                1409  bool use_instance) const {
                -
                1410  auto position = position_of_int_var(name);
                -
                1411  // clang-format off
                -
                1412  if (symbol.is_index) {
                -
                1413  if (use_instance) {
                -
                1414  return fmt::format("inst->{}[{}]", name, position);
                -
                1415  }
                -
                1416  return fmt::format("indexes[{}]", position);
                -
                1417  }
                -
                1418  if (symbol.is_integer) {
                -
                1419  if (use_instance) {
                -
                1420  return fmt::format("inst->{}[{}*pnodecount+id]", name, position);
                -
                1421  }
                -
                1422  return fmt::format("indexes[{}*pnodecount+id]", position);
                -
                1423  }
                -
                1424  if (use_instance) {
                -
                1425  return fmt::format("inst->{}[indexes[{}*pnodecount + id]]", name, position);
                -
                1426  }
                -
                1427  auto data = symbol.is_vdata ? "_vdata" : "_data";
                -
                1428  return fmt::format("nt->{}[indexes[{}*pnodecount + id]]", data, position);
                -
                1429  // clang-format on
                -
                1430 }
                -
                1431 
                -
                1432 
                - -
                1434  bool use_instance) const {
                -
                1435  if (use_instance) {
                -
                1436  return fmt::format("inst->{}->{}", naming::INST_GLOBAL_MEMBER, symbol->get_name());
                -
                1437  } else {
                -
                1438  return fmt::format("{}.{}", global_struct_instance(), symbol->get_name());
                -
                1439  }
                -
                1440 }
                -
                1441 
                -
                1442 
                - -
                1444  const std::string& name) const {
                -
                1445  std::string result(name);
                -
                1446  if (ion_variable_struct_required()) {
                -
                1447  if (info.is_ion_read_variable(name)) {
                -
                1448  result = naming::ION_VARNAME_PREFIX + name;
                -
                1449  }
                -
                1450  if (info.is_ion_write_variable(name)) {
                -
                1451  result = "ionvar." + name;
                -
                1452  }
                -
                1453  if (info.is_current(name)) {
                -
                1454  result = "ionvar." + name;
                -
                1455  }
                -
                1456  }
                -
                1457  return result;
                -
                1458 }
                + +
                1383  bool use_instance) const {
                +
                1384  auto name = symbol->get_name();
                +
                1385  auto dimension = symbol->get_length();
                +
                1386  auto position = position_of_float_var(name);
                +
                1387  // clang-format off
                +
                1388  if (symbol->is_array()) {
                +
                1389  if (use_instance) {
                +
                1390  return fmt::format("(inst->{}+id*{})", name, dimension);
                +
                1391  }
                +
                1392  return fmt::format("(data + {}*pnodecount + id*{})", position, dimension);
                +
                1393  }
                +
                1394  if (use_instance) {
                +
                1395  return fmt::format("inst->{}[id]", name);
                +
                1396  }
                +
                1397  return fmt::format("data[{}*pnodecount + id]", position);
                +
                1398  // clang-format on
                +
                1399 }
                +
                1400 
                +
                1401 
                + +
                1403  const std::string& name,
                +
                1404  bool use_instance) const {
                +
                1405  auto position = position_of_int_var(name);
                +
                1406  // clang-format off
                +
                1407  if (symbol.is_index) {
                +
                1408  if (use_instance) {
                +
                1409  return fmt::format("inst->{}[{}]", name, position);
                +
                1410  }
                +
                1411  return fmt::format("indexes[{}]", position);
                +
                1412  }
                +
                1413  if (symbol.is_integer) {
                +
                1414  if (use_instance) {
                +
                1415  return fmt::format("inst->{}[{}*pnodecount+id]", name, position);
                +
                1416  }
                +
                1417  return fmt::format("indexes[{}*pnodecount+id]", position);
                +
                1418  }
                +
                1419  if (use_instance) {
                +
                1420  return fmt::format("inst->{}[indexes[{}*pnodecount + id]]", name, position);
                +
                1421  }
                +
                1422  auto data = symbol.is_vdata ? "_vdata" : "_data";
                +
                1423  return fmt::format("nt->{}[indexes[{}*pnodecount + id]]", data, position);
                +
                1424  // clang-format on
                +
                1425 }
                +
                1426 
                +
                1427 
                + +
                1429  bool use_instance) const {
                +
                1430  if (use_instance) {
                +
                1431  return fmt::format("inst->{}->{}", naming::INST_GLOBAL_MEMBER, symbol->get_name());
                +
                1432  } else {
                +
                1433  return fmt::format("{}.{}", global_struct_instance(), symbol->get_name());
                +
                1434  }
                +
                1435 }
                +
                1436 
                +
                1437 
                + +
                1439  const std::string& name) const {
                +
                1440  std::string result(name);
                +
                1441  if (ion_variable_struct_required()) {
                +
                1442  if (info.is_ion_read_variable(name)) {
                +
                1443  result = naming::ION_VARNAME_PREFIX + name;
                +
                1444  }
                +
                1445  if (info.is_ion_write_variable(name)) {
                +
                1446  result = "ionvar." + name;
                +
                1447  }
                +
                1448  if (info.is_current(name)) {
                +
                1449  result = "ionvar." + name;
                +
                1450  }
                +
                1451  }
                +
                1452  return result;
                +
                1453 }
                +
                1454 
                +
                1455 
                +
                1456 std::string CodegenCoreneuronCppVisitor::get_variable_name(const std::string& name,
                +
                1457  bool use_instance) const {
                +
                1458  const std::string& varname = update_if_ion_variable_name(name);
                1459 
                -
                1460 
                -
                1461 std::string CodegenCoreneuronCppVisitor::get_variable_name(const std::string& name,
                -
                1462  bool use_instance) const {
                -
                1463  const std::string& varname = update_if_ion_variable_name(name);
                +
                1460  // clang-format off
                +
                1461  auto symbol_comparator = [&varname](const SymbolType& sym) {
                +
                1462  return varname == sym->get_name();
                +
                1463  };
                1464 
                -
                1465  // clang-format off
                -
                1466  auto symbol_comparator = [&varname](const SymbolType& sym) {
                -
                1467  return varname == sym->get_name();
                -
                1468  };
                +
                1465  auto index_comparator = [&varname](const IndexVariableInfo& var) {
                +
                1466  return varname == var.symbol->get_name();
                +
                1467  };
                +
                1468  // clang-format on
                1469 
                -
                1470  auto index_comparator = [&varname](const IndexVariableInfo& var) {
                -
                1471  return varname == var.symbol->get_name();
                -
                1472  };
                -
                1473  // clang-format on
                -
                1474 
                -
                1475  // float variable
                -
                1476  auto f = std::find_if(codegen_float_variables.begin(),
                -
                1477  codegen_float_variables.end(),
                -
                1478  symbol_comparator);
                -
                1479  if (f != codegen_float_variables.end()) {
                -
                1480  return float_variable_name(*f, use_instance);
                -
                1481  }
                -
                1482 
                -
                1483  // integer variable
                -
                1484  auto i =
                -
                1485  std::find_if(codegen_int_variables.begin(), codegen_int_variables.end(), index_comparator);
                -
                1486  if (i != codegen_int_variables.end()) {
                -
                1487  return int_variable_name(*i, varname, use_instance);
                -
                1488  }
                -
                1489 
                -
                1490  // global variable
                -
                1491  auto g = std::find_if(codegen_global_variables.begin(),
                -
                1492  codegen_global_variables.end(),
                -
                1493  symbol_comparator);
                -
                1494  if (g != codegen_global_variables.end()) {
                -
                1495  return global_variable_name(*g, use_instance);
                -
                1496  }
                -
                1497 
                -
                1498  if (varname == naming::NTHREAD_DT_VARIABLE) {
                -
                1499  return std::string("nt->_") + naming::NTHREAD_DT_VARIABLE;
                -
                1500  }
                -
                1501 
                -
                1502  // t in net_receive method is an argument to function and hence it should
                -
                1503  // ne used instead of nt->_t which is current time of thread
                -
                1504  if (varname == naming::NTHREAD_T_VARIABLE && !printing_net_receive) {
                -
                1505  return std::string("nt->_") + naming::NTHREAD_T_VARIABLE;
                -
                1506  }
                -
                1507 
                -
                1508  auto const iter =
                -
                1509  std::find_if(info.neuron_global_variables.begin(),
                -
                1510  info.neuron_global_variables.end(),
                -
                1511  [&varname](auto const& entry) { return entry.first->get_name() == varname; });
                -
                1512  if (iter != info.neuron_global_variables.end()) {
                -
                1513  std::string ret;
                -
                1514  if (use_instance) {
                -
                1515  ret = "*(inst->";
                -
                1516  }
                -
                1517  ret.append(varname);
                -
                1518  if (use_instance) {
                -
                1519  ret.append(")");
                -
                1520  }
                -
                1521  return ret;
                -
                1522  }
                +
                1470  // float variable
                +
                1471  auto f = std::find_if(codegen_float_variables.begin(),
                +
                1472  codegen_float_variables.end(),
                +
                1473  symbol_comparator);
                +
                1474  if (f != codegen_float_variables.end()) {
                +
                1475  return float_variable_name(*f, use_instance);
                +
                1476  }
                +
                1477 
                +
                1478  // integer variable
                +
                1479  auto i =
                +
                1480  std::find_if(codegen_int_variables.begin(), codegen_int_variables.end(), index_comparator);
                +
                1481  if (i != codegen_int_variables.end()) {
                +
                1482  return int_variable_name(*i, varname, use_instance);
                +
                1483  }
                +
                1484 
                +
                1485  // global variable
                +
                1486  auto g = std::find_if(codegen_global_variables.begin(),
                +
                1487  codegen_global_variables.end(),
                +
                1488  symbol_comparator);
                +
                1489  if (g != codegen_global_variables.end()) {
                +
                1490  return global_variable_name(*g, use_instance);
                +
                1491  }
                +
                1492 
                +
                1493  if (varname == naming::NTHREAD_DT_VARIABLE) {
                +
                1494  return std::string("nt->_") + naming::NTHREAD_DT_VARIABLE;
                +
                1495  }
                +
                1496 
                +
                1497  // t in net_receive method is an argument to function and hence it should
                +
                1498  // ne used instead of nt->_t which is current time of thread
                +
                1499  if (varname == naming::NTHREAD_T_VARIABLE && !printing_net_receive) {
                +
                1500  return std::string("nt->_") + naming::NTHREAD_T_VARIABLE;
                +
                1501  }
                +
                1502 
                +
                1503  auto const iter =
                +
                1504  std::find_if(info.neuron_global_variables.begin(),
                +
                1505  info.neuron_global_variables.end(),
                +
                1506  [&varname](auto const& entry) { return entry.first->get_name() == varname; });
                +
                1507  if (iter != info.neuron_global_variables.end()) {
                +
                1508  std::string ret;
                +
                1509  if (use_instance) {
                +
                1510  ret = "*(inst->";
                +
                1511  }
                +
                1512  ret.append(varname);
                +
                1513  if (use_instance) {
                +
                1514  ret.append(")");
                +
                1515  }
                +
                1516  return ret;
                +
                1517  }
                +
                1518 
                +
                1519  // otherwise return original name
                +
                1520  return varname;
                +
                1521 }
                +
                1522 
                1523 
                -
                1524  // otherwise return original name
                -
                1525  return varname;
                -
                1526 }
                +
                1524 /****************************************************************************************/
                +
                1525 /* Main printing routines for code generation */
                +
                1526 /****************************************************************************************/
                1527 
                1528 
                -
                1529 /****************************************************************************************/
                -
                1530 /* Main printing routines for code generation */
                -
                1531 /****************************************************************************************/
                -
                1532 
                -
                1533 
                - -
                1535  time_t current_time{};
                -
                1536  time(&current_time);
                -
                1537  std::string data_time_str{std::ctime(&current_time)};
                -
                1538  auto version = nmodl::Version::NMODL_VERSION + " [" + nmodl::Version::GIT_REVISION + "]";
                -
                1539 
                -
                1540  printer->add_line("/*********************************************************");
                -
                1541  printer->add_line("Model Name : ", info.mod_suffix);
                -
                1542  printer->add_line("Filename : ", info.mod_file, ".mod");
                -
                1543  printer->add_line("NMODL Version : ", nmodl_version());
                -
                1544  printer->fmt_line("Vectorized : {}", info.vectorize);
                -
                1545  printer->fmt_line("Threadsafe : {}", info.thread_safe);
                -
                1546  printer->add_line("Created : ", stringutils::trim(data_time_str));
                -
                1547  printer->add_line("Simulator : ", simulator_name());
                -
                1548  printer->add_line("Backend : ", backend_name());
                -
                1549  printer->add_line("NMODL Compiler : ", version);
                -
                1550  printer->add_line("*********************************************************/");
                -
                1551 }
                -
                1552 
                -
                1553 
                - -
                1555  printer->add_newline();
                -
                1556  printer->add_multi_line(R"CODE(
                -
                1557  #include <math.h>
                -
                1558  #include <stdio.h>
                -
                1559  #include <stdlib.h>
                -
                1560  #include <string.h>
                -
                1561  )CODE");
                -
                1562 }
                -
                1563 
                -
                1564 
                - -
                1566  printer->add_newline();
                -
                1567  printer->add_multi_line(R"CODE(
                -
                1568  #include <coreneuron/gpu/nrn_acc_manager.hpp>
                -
                1569  #include <coreneuron/mechanism/mech/mod2c_core_thread.hpp>
                -
                1570  #include <coreneuron/mechanism/register_mech.hpp>
                -
                1571  #include <coreneuron/nrnconf.h>
                -
                1572  #include <coreneuron/nrniv/nrniv_decl.h>
                -
                1573  #include <coreneuron/sim/multicore.hpp>
                -
                1574  #include <coreneuron/sim/scopmath/newton_thread.hpp>
                -
                1575  #include <coreneuron/utils/ivocvect.hpp>
                -
                1576  #include <coreneuron/utils/nrnoc_aux.hpp>
                -
                1577  #include <coreneuron/utils/randoms/nrnran123.h>
                -
                1578  )CODE");
                -
                1579  if (info.eigen_newton_solver_exist) {
                -
                1580  printer->add_line("#include <newton/newton.hpp>");
                -
                1581  }
                -
                1582  if (info.eigen_linear_solver_exist) {
                -
                1583  if (std::accumulate(info.state_vars.begin(),
                -
                1584  info.state_vars.end(),
                -
                1585  0,
                -
                1586  [](int l, const SymbolType& variable) {
                -
                1587  return l += variable->get_length();
                -
                1588  }) > 4) {
                -
                1589  printer->add_line("#include <crout/crout.hpp>");
                -
                1590  } else {
                -
                1591  printer->add_line("#include <Eigen/Dense>");
                -
                1592  printer->add_line("#include <Eigen/LU>");
                -
                1593  }
                -
                1594  }
                -
                1595 }
                -
                1596 
                -
                1597 
                - -
                1599  if (info.primes_size == 0) {
                -
                1600  return;
                -
                1601  }
                -
                1602  const auto count_prime_variables = [](auto size, const SymbolType& symbol) {
                -
                1603  return size += symbol->get_length();
                -
                1604  };
                -
                1605  const auto prime_variables_by_order_size =
                -
                1606  std::accumulate(info.prime_variables_by_order.begin(),
                -
                1607  info.prime_variables_by_order.end(),
                -
                1608  0,
                -
                1609  count_prime_variables);
                -
                1610  if (info.primes_size != prime_variables_by_order_size) {
                -
                1611  throw std::runtime_error{
                -
                1612  fmt::format("primes_size = {} differs from prime_variables_by_order.size() = {}, "
                -
                1613  "this should not happen.",
                -
                1614  info.primes_size,
                -
                1615  info.prime_variables_by_order.size())};
                -
                1616  }
                -
                1617  auto const initializer_list = [&](auto const& primes, const char* prefix) -> std::string {
                -
                1618  if (!print_initializers) {
                -
                1619  return {};
                -
                1620  }
                -
                1621  std::string list{"{"};
                -
                1622  for (auto iter = primes.begin(); iter != primes.end(); ++iter) {
                -
                1623  auto const& prime = *iter;
                -
                1624  list.append(std::to_string(position_of_float_var(prefix + prime->get_name())));
                -
                1625  if (std::next(iter) != primes.end()) {
                -
                1626  list.append(", ");
                -
                1627  }
                -
                1628  }
                -
                1629  list.append("}");
                -
                1630  return list;
                -
                1631  };
                -
                1632  printer->fmt_line("int slist1[{}]{};",
                -
                1633  info.primes_size,
                -
                1634  initializer_list(info.prime_variables_by_order, ""));
                -
                1635  printer->fmt_line("int dlist1[{}]{};",
                -
                1636  info.primes_size,
                -
                1637  initializer_list(info.prime_variables_by_order, "D"));
                -
                1638  codegen_global_variables.push_back(make_symbol("slist1"));
                -
                1639  codegen_global_variables.push_back(make_symbol("dlist1"));
                -
                1640  // additional list for derivimplicit method
                -
                1641  if (info.derivimplicit_used()) {
                -
                1642  auto primes = program_symtab->get_variables_with_properties(NmodlType::prime_name);
                -
                1643  printer->fmt_line("int slist2[{}]{};", info.primes_size, initializer_list(primes, ""));
                -
                1644  codegen_global_variables.push_back(make_symbol("slist2"));
                -
                1645  }
                -
                1646 }
                -
                1647 
                -
                1648 
                -
                1649 /**
                -
                1650  * \details Variables required for type of ion, type of point process etc. are
                -
                1651  * of static int type. For the C++ backend type, it's ok to have
                -
                1652  * these variables as file scoped static variables.
                -
                1653  *
                -
                1654  * Initial values of state variables (h0) are also defined as static
                -
                1655  * variables. Note that the state could be ion variable and it could
                -
                1656  * be also range variable. Hence lookup into symbol table before.
                -
                1657  *
                -
                1658  * When model is not vectorized (shouldn't be the case in coreneuron)
                -
                1659  * the top local variables become static variables.
                -
                1660  *
                -
                1661  * Note that static variables are already initialized to 0. We do the
                -
                1662  * same for some variables to keep same code as neuron.
                -
                1663  */
                -
                1664 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
                - -
                1666  const auto value_initialize = print_initializers ? "{}" : "";
                + +
                1530  time_t current_time{};
                +
                1531  time(&current_time);
                +
                1532  std::string data_time_str{std::ctime(&current_time)};
                +
                1533  auto version = nmodl::Version::NMODL_VERSION + " [" + nmodl::Version::GIT_REVISION + "]";
                +
                1534 
                +
                1535  printer->add_line("/*********************************************************");
                +
                1536  printer->add_line("Model Name : ", info.mod_suffix);
                +
                1537  printer->add_line("Filename : ", info.mod_file, ".mod");
                +
                1538  printer->add_line("NMODL Version : ", nmodl_version());
                +
                1539  printer->fmt_line("Vectorized : {}", info.vectorize);
                +
                1540  printer->fmt_line("Threadsafe : {}", info.thread_safe);
                +
                1541  printer->add_line("Created : ", stringutils::trim(data_time_str));
                +
                1542  printer->add_line("Simulator : ", simulator_name());
                +
                1543  printer->add_line("Backend : ", backend_name());
                +
                1544  printer->add_line("NMODL Compiler : ", version);
                +
                1545  printer->add_line("*********************************************************/");
                +
                1546 }
                +
                1547 
                +
                1548 
                + +
                1550  printer->add_newline();
                +
                1551  printer->add_multi_line(R"CODE(
                +
                1552  #include <math.h>
                +
                1553  #include <stdio.h>
                +
                1554  #include <stdlib.h>
                +
                1555  #include <string.h>
                +
                1556  )CODE");
                +
                1557 }
                +
                1558 
                +
                1559 
                + +
                1561  printer->add_newline();
                +
                1562  printer->add_multi_line(R"CODE(
                +
                1563  #include <coreneuron/gpu/nrn_acc_manager.hpp>
                +
                1564  #include <coreneuron/mechanism/mech/mod2c_core_thread.hpp>
                +
                1565  #include <coreneuron/mechanism/register_mech.hpp>
                +
                1566  #include <coreneuron/nrnconf.h>
                +
                1567  #include <coreneuron/nrniv/nrniv_decl.h>
                +
                1568  #include <coreneuron/sim/multicore.hpp>
                +
                1569  #include <coreneuron/sim/scopmath/newton_thread.hpp>
                +
                1570  #include <coreneuron/utils/ivocvect.hpp>
                +
                1571  #include <coreneuron/utils/nrnoc_aux.hpp>
                +
                1572  #include <coreneuron/utils/randoms/nrnran123.h>
                +
                1573  )CODE");
                +
                1574  if (info.eigen_newton_solver_exist) {
                +
                1575  printer->add_line("#include <newton/newton.hpp>");
                +
                1576  }
                +
                1577  if (info.eigen_linear_solver_exist) {
                +
                1578  if (std::accumulate(info.state_vars.begin(),
                +
                1579  info.state_vars.end(),
                +
                1580  0,
                +
                1581  [](int l, const SymbolType& variable) {
                +
                1582  return l += variable->get_length();
                +
                1583  }) > 4) {
                +
                1584  printer->add_line("#include <crout/crout.hpp>");
                +
                1585  } else {
                +
                1586  printer->add_line("#include <Eigen/Dense>");
                +
                1587  printer->add_line("#include <Eigen/LU>");
                +
                1588  }
                +
                1589  }
                +
                1590 }
                +
                1591 
                +
                1592 
                + +
                1594  if (info.primes_size == 0) {
                +
                1595  return;
                +
                1596  }
                +
                1597  const auto count_prime_variables = [](auto size, const SymbolType& symbol) {
                +
                1598  return size += symbol->get_length();
                +
                1599  };
                +
                1600  const auto prime_variables_by_order_size =
                +
                1601  std::accumulate(info.prime_variables_by_order.begin(),
                +
                1602  info.prime_variables_by_order.end(),
                +
                1603  0,
                +
                1604  count_prime_variables);
                +
                1605  if (info.primes_size != prime_variables_by_order_size) {
                +
                1606  throw std::runtime_error{
                +
                1607  fmt::format("primes_size = {} differs from prime_variables_by_order.size() = {}, "
                +
                1608  "this should not happen.",
                +
                1609  info.primes_size,
                +
                1610  info.prime_variables_by_order.size())};
                +
                1611  }
                +
                1612  auto const initializer_list = [&](auto const& primes, const char* prefix) -> std::string {
                +
                1613  if (!print_initializers) {
                +
                1614  return {};
                +
                1615  }
                +
                1616  std::string list{"{"};
                +
                1617  for (auto iter = primes.begin(); iter != primes.end(); ++iter) {
                +
                1618  auto const& prime = *iter;
                +
                1619  list.append(std::to_string(position_of_float_var(prefix + prime->get_name())));
                +
                1620  if (std::next(iter) != primes.end()) {
                +
                1621  list.append(", ");
                +
                1622  }
                +
                1623  }
                +
                1624  list.append("}");
                +
                1625  return list;
                +
                1626  };
                +
                1627  printer->fmt_line("int slist1[{}]{};",
                +
                1628  info.primes_size,
                +
                1629  initializer_list(info.prime_variables_by_order, ""));
                +
                1630  printer->fmt_line("int dlist1[{}]{};",
                +
                1631  info.primes_size,
                +
                1632  initializer_list(info.prime_variables_by_order, "D"));
                +
                1633  codegen_global_variables.push_back(make_symbol("slist1"));
                +
                1634  codegen_global_variables.push_back(make_symbol("dlist1"));
                +
                1635  // additional list for derivimplicit method
                +
                1636  if (info.derivimplicit_used()) {
                +
                1637  auto primes = program_symtab->get_variables_with_properties(NmodlType::prime_name);
                +
                1638  printer->fmt_line("int slist2[{}]{};", info.primes_size, initializer_list(primes, ""));
                +
                1639  codegen_global_variables.push_back(make_symbol("slist2"));
                +
                1640  }
                +
                1641 }
                +
                1642 
                +
                1643 
                +
                1644 /**
                +
                1645  * \details Variables required for type of ion, type of point process etc. are
                +
                1646  * of static int type. For the C++ backend type, it's ok to have
                +
                1647  * these variables as file scoped static variables.
                +
                1648  *
                +
                1649  * Initial values of state variables (h0) are also defined as static
                +
                1650  * variables. Note that the state could be ion variable and it could
                +
                1651  * be also range variable. Hence lookup into symbol table before.
                +
                1652  *
                +
                1653  * When model is not vectorized (shouldn't be the case in coreneuron)
                +
                1654  * the top local variables become static variables.
                +
                1655  *
                +
                1656  * Note that static variables are already initialized to 0. We do the
                +
                1657  * same for some variables to keep same code as neuron.
                +
                1658  */
                +
                1659 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
                + +
                1661  const auto value_initialize = print_initializers ? "{}" : "";
                +
                1662 
                +
                1663  auto float_type = default_float_data_type();
                +
                1664  printer->add_newline(2);
                +
                1665  printer->add_line("/** all global variables */");
                +
                1666  printer->fmt_push_block("struct {}", global_struct());
                1667 
                -
                1668  auto float_type = default_float_data_type();
                -
                1669  printer->add_newline(2);
                -
                1670  printer->add_line("/** all global variables */");
                -
                1671  printer->fmt_push_block("struct {}", global_struct());
                -
                1672 
                -
                1673  for (const auto& ion: info.ions) {
                -
                1674  auto name = fmt::format("{}_type", ion.name);
                -
                1675  printer->fmt_line("int {}{};", name, value_initialize);
                -
                1676  codegen_global_variables.push_back(make_symbol(name));
                +
                1668  for (const auto& ion: info.ions) {
                +
                1669  auto name = fmt::format("{}_type", ion.name);
                +
                1670  printer->fmt_line("int {}{};", name, value_initialize);
                +
                1671  codegen_global_variables.push_back(make_symbol(name));
                +
                1672  }
                +
                1673 
                +
                1674  if (info.point_process) {
                +
                1675  printer->fmt_line("int point_type{};", value_initialize);
                +
                1676  codegen_global_variables.push_back(make_symbol("point_type"));
                1677  }
                1678 
                -
                1679  if (info.point_process) {
                -
                1680  printer->fmt_line("int point_type{};", value_initialize);
                -
                1681  codegen_global_variables.push_back(make_symbol("point_type"));
                -
                1682  }
                -
                1683 
                -
                1684  for (const auto& var: info.state_vars) {
                -
                1685  auto name = var->get_name() + "0";
                -
                1686  auto symbol = program_symtab->lookup(name);
                -
                1687  if (symbol == nullptr) {
                -
                1688  printer->fmt_line("{} {}{};", float_type, name, value_initialize);
                -
                1689  codegen_global_variables.push_back(make_symbol(name));
                -
                1690  }
                -
                1691  }
                -
                1692 
                -
                1693  // Neuron and Coreneuron adds "v" to global variables when vectorize
                -
                1694  // is false. But as v is always local variable and passed as argument,
                -
                1695  // we don't need to use global variable v
                -
                1696 
                -
                1697  auto& top_locals = info.top_local_variables;
                -
                1698  if (!info.vectorize && !top_locals.empty()) {
                -
                1699  for (const auto& var: top_locals) {
                -
                1700  auto name = var->get_name();
                -
                1701  auto length = var->get_length();
                -
                1702  if (var->is_array()) {
                -
                1703  printer->fmt_line("{} {}[{}] /* TODO init top-local-array */;",
                -
                1704  float_type,
                -
                1705  name,
                -
                1706  length);
                -
                1707  } else {
                -
                1708  printer->fmt_line("{} {} /* TODO init top-local */;", float_type, name);
                -
                1709  }
                -
                1710  codegen_global_variables.push_back(var);
                -
                1711  }
                -
                1712  }
                -
                1713 
                -
                1714  if (!info.thread_variables.empty()) {
                -
                1715  printer->fmt_line("int thread_data_in_use{};", value_initialize);
                -
                1716  printer->fmt_line("{} thread_data[{}] /* TODO init thread_data */;",
                -
                1717  float_type,
                -
                1718  info.thread_var_data_size);
                -
                1719  codegen_global_variables.push_back(make_symbol("thread_data_in_use"));
                -
                1720  auto symbol = make_symbol("thread_data");
                -
                1721  symbol->set_as_array(info.thread_var_data_size);
                -
                1722  codegen_global_variables.push_back(symbol);
                -
                1723  }
                -
                1724 
                -
                1725  // TODO: remove this entirely?
                -
                1726  printer->fmt_line("int reset{};", value_initialize);
                -
                1727  codegen_global_variables.push_back(make_symbol("reset"));
                -
                1728 
                -
                1729  printer->fmt_line("int mech_type{};", value_initialize);
                -
                1730  codegen_global_variables.push_back(make_symbol("mech_type"));
                -
                1731 
                -
                1732  for (const auto& var: info.global_variables) {
                -
                1733  auto name = var->get_name();
                -
                1734  auto length = var->get_length();
                -
                1735  if (var->is_array()) {
                -
                1736  printer->fmt_line("{} {}[{}] /* TODO init const-array */;", float_type, name, length);
                -
                1737  } else {
                -
                1738  double value{};
                -
                1739  if (auto const& value_ptr = var->get_value()) {
                -
                1740  value = *value_ptr;
                -
                1741  }
                -
                1742  printer->fmt_line("{} {}{};",
                -
                1743  float_type,
                -
                1744  name,
                -
                1745  print_initializers ? fmt::format("{{{:g}}}", value) : std::string{});
                -
                1746  }
                -
                1747  codegen_global_variables.push_back(var);
                -
                1748  }
                -
                1749 
                -
                1750  for (const auto& var: info.constant_variables) {
                -
                1751  auto const name = var->get_name();
                -
                1752  auto* const value_ptr = var->get_value().get();
                -
                1753  double const value{value_ptr ? *value_ptr : 0};
                -
                1754  printer->fmt_line("{} {}{};",
                -
                1755  float_type,
                -
                1756  name,
                -
                1757  print_initializers ? fmt::format("{{{:g}}}", value) : std::string{});
                -
                1758  codegen_global_variables.push_back(var);
                -
                1759  }
                -
                1760 
                -
                1761  print_sdlists_init(print_initializers);
                -
                1762 
                -
                1763  if (info.table_count > 0) {
                -
                1764  printer->fmt_line("double usetable{};", print_initializers ? "{1}" : "");
                -
                1765  codegen_global_variables.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
                -
                1766 
                -
                1767  for (const auto& block: info.functions_with_table) {
                -
                1768  const auto& name = block->get_node_name();
                -
                1769  printer->fmt_line("{} tmin_{}{};", float_type, name, value_initialize);
                -
                1770  printer->fmt_line("{} mfac_{}{};", float_type, name, value_initialize);
                -
                1771  codegen_global_variables.push_back(make_symbol("tmin_" + name));
                -
                1772  codegen_global_variables.push_back(make_symbol("mfac_" + name));
                -
                1773  }
                -
                1774 
                -
                1775  for (const auto& variable: info.table_statement_variables) {
                -
                1776  auto const name = "t_" + variable->get_name();
                -
                1777  auto const num_values = variable->get_num_values();
                -
                1778  if (variable->is_array()) {
                -
                1779  int array_len = variable->get_length();
                -
                1780  printer->fmt_line(
                -
                1781  "{} {}[{}][{}]{};", float_type, name, array_len, num_values, value_initialize);
                -
                1782  } else {
                -
                1783  printer->fmt_line("{} {}[{}]{};", float_type, name, num_values, value_initialize);
                -
                1784  }
                -
                1785  codegen_global_variables.push_back(make_symbol(name));
                -
                1786  }
                +
                1679  for (const auto& var: info.state_vars) {
                +
                1680  auto name = var->get_name() + "0";
                +
                1681  auto symbol = program_symtab->lookup(name);
                +
                1682  if (symbol == nullptr) {
                +
                1683  printer->fmt_line("{} {}{};", float_type, name, value_initialize);
                +
                1684  codegen_global_variables.push_back(make_symbol(name));
                +
                1685  }
                +
                1686  }
                +
                1687 
                +
                1688  // Neuron and Coreneuron adds "v" to global variables when vectorize
                +
                1689  // is false. But as v is always local variable and passed as argument,
                +
                1690  // we don't need to use global variable v
                +
                1691 
                +
                1692  auto& top_locals = info.top_local_variables;
                +
                1693  if (!info.vectorize && !top_locals.empty()) {
                +
                1694  for (const auto& var: top_locals) {
                +
                1695  auto name = var->get_name();
                +
                1696  auto length = var->get_length();
                +
                1697  if (var->is_array()) {
                +
                1698  printer->fmt_line("{} {}[{}] /* TODO init top-local-array */;",
                +
                1699  float_type,
                +
                1700  name,
                +
                1701  length);
                +
                1702  } else {
                +
                1703  printer->fmt_line("{} {} /* TODO init top-local */;", float_type, name);
                +
                1704  }
                +
                1705  codegen_global_variables.push_back(var);
                +
                1706  }
                +
                1707  }
                +
                1708 
                +
                1709  if (!info.thread_variables.empty()) {
                +
                1710  printer->fmt_line("int thread_data_in_use{};", value_initialize);
                +
                1711  printer->fmt_line("{} thread_data[{}] /* TODO init thread_data */;",
                +
                1712  float_type,
                +
                1713  info.thread_var_data_size);
                +
                1714  codegen_global_variables.push_back(make_symbol("thread_data_in_use"));
                +
                1715  auto symbol = make_symbol("thread_data");
                +
                1716  symbol->set_as_array(info.thread_var_data_size);
                +
                1717  codegen_global_variables.push_back(symbol);
                +
                1718  }
                +
                1719 
                +
                1720  // TODO: remove this entirely?
                +
                1721  printer->fmt_line("int reset{};", value_initialize);
                +
                1722  codegen_global_variables.push_back(make_symbol("reset"));
                +
                1723 
                +
                1724  printer->fmt_line("int mech_type{};", value_initialize);
                +
                1725  codegen_global_variables.push_back(make_symbol("mech_type"));
                +
                1726 
                +
                1727  for (const auto& var: info.global_variables) {
                +
                1728  auto name = var->get_name();
                +
                1729  auto length = var->get_length();
                +
                1730  if (var->is_array()) {
                +
                1731  printer->fmt_line("{} {}[{}] /* TODO init const-array */;", float_type, name, length);
                +
                1732  } else {
                +
                1733  double value{};
                +
                1734  if (auto const& value_ptr = var->get_value()) {
                +
                1735  value = *value_ptr;
                +
                1736  }
                +
                1737  printer->fmt_line("{} {}{};",
                +
                1738  float_type,
                +
                1739  name,
                +
                1740  print_initializers ? fmt::format("{{{:g}}}", value) : std::string{});
                +
                1741  }
                +
                1742  codegen_global_variables.push_back(var);
                +
                1743  }
                +
                1744 
                +
                1745  for (const auto& var: info.constant_variables) {
                +
                1746  auto const name = var->get_name();
                +
                1747  auto* const value_ptr = var->get_value().get();
                +
                1748  double const value{value_ptr ? *value_ptr : 0};
                +
                1749  printer->fmt_line("{} {}{};",
                +
                1750  float_type,
                +
                1751  name,
                +
                1752  print_initializers ? fmt::format("{{{:g}}}", value) : std::string{});
                +
                1753  codegen_global_variables.push_back(var);
                +
                1754  }
                +
                1755 
                +
                1756  print_sdlists_init(print_initializers);
                +
                1757 
                +
                1758  if (info.table_count > 0) {
                +
                1759  printer->fmt_line("double usetable{};", print_initializers ? "{1}" : "");
                +
                1760  codegen_global_variables.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
                +
                1761 
                +
                1762  for (const auto& block: info.functions_with_table) {
                +
                1763  const auto& name = block->get_node_name();
                +
                1764  printer->fmt_line("{} tmin_{}{};", float_type, name, value_initialize);
                +
                1765  printer->fmt_line("{} mfac_{}{};", float_type, name, value_initialize);
                +
                1766  codegen_global_variables.push_back(make_symbol("tmin_" + name));
                +
                1767  codegen_global_variables.push_back(make_symbol("mfac_" + name));
                +
                1768  }
                +
                1769 
                +
                1770  for (const auto& variable: info.table_statement_variables) {
                +
                1771  auto const name = "t_" + variable->get_name();
                +
                1772  auto const num_values = variable->get_num_values();
                +
                1773  if (variable->is_array()) {
                +
                1774  int array_len = variable->get_length();
                +
                1775  printer->fmt_line(
                +
                1776  "{} {}[{}][{}]{};", float_type, name, array_len, num_values, value_initialize);
                +
                1777  } else {
                +
                1778  printer->fmt_line("{} {}[{}]{};", float_type, name, num_values, value_initialize);
                +
                1779  }
                +
                1780  codegen_global_variables.push_back(make_symbol(name));
                +
                1781  }
                +
                1782  }
                +
                1783 
                +
                1784  for (const auto& f: info.function_tables) {
                +
                1785  printer->fmt_line("void* _ptable_{}{{}};", f->get_node_name());
                +
                1786  codegen_global_variables.push_back(make_symbol("_ptable_" + f->get_node_name()));
                1787  }
                1788 
                -
                1789  for (const auto& f: info.function_tables) {
                -
                1790  printer->fmt_line("void* _ptable_{}{{}};", f->get_node_name());
                -
                1791  codegen_global_variables.push_back(make_symbol("_ptable_" + f->get_node_name()));
                -
                1792  }
                -
                1793 
                -
                1794  if (info.vectorize && info.thread_data_index) {
                -
                1795  printer->fmt_line("ThreadDatum ext_call_thread[{}]{};",
                -
                1796  info.thread_data_index,
                -
                1797  value_initialize);
                -
                1798  codegen_global_variables.push_back(make_symbol("ext_call_thread"));
                -
                1799  }
                -
                1800 
                -
                1801  printer->pop_block(";");
                -
                1802 
                -
                1803  print_global_var_struct_assertions();
                -
                1804  print_global_var_struct_decl();
                -
                1805 }
                -
                1806 
                -
                1807 
                - -
                1809  // Assert some things that we assume when copying instances of this struct
                -
                1810  // to the GPU and so on.
                -
                1811  printer->fmt_line("static_assert(std::is_trivially_copy_constructible_v<{}>);",
                -
                1812  global_struct());
                -
                1813  printer->fmt_line("static_assert(std::is_trivially_move_constructible_v<{}>);",
                -
                1814  global_struct());
                -
                1815  printer->fmt_line("static_assert(std::is_trivially_copy_assignable_v<{}>);", global_struct());
                -
                1816  printer->fmt_line("static_assert(std::is_trivially_move_assignable_v<{}>);", global_struct());
                -
                1817  printer->fmt_line("static_assert(std::is_trivially_destructible_v<{}>);", global_struct());
                -
                1818 }
                -
                1819 
                -
                1820 
                -
                1821 /**
                -
                1822  * Print structs that encapsulate information about scalar and
                -
                1823  * vector elements of type global and thread variables.
                -
                1824  */
                - -
                1826  auto variable_printer =
                -
                1827  [&](const std::vector<SymbolType>& variables, bool if_array, bool if_vector) {
                -
                1828  for (const auto& variable: variables) {
                -
                1829  if (variable->is_array() == if_array) {
                -
                1830  // false => do not use the instance struct, which is not
                -
                1831  // defined in the global declaration that we are printing
                -
                1832  auto name = get_variable_name(variable->get_name(), false);
                -
                1833  auto ename = add_escape_quote(variable->get_name() + "_" + info.mod_suffix);
                -
                1834  auto length = variable->get_length();
                -
                1835  if (if_vector) {
                -
                1836  printer->fmt_line("{{{}, {}, {}}},", ename, name, length);
                -
                1837  } else {
                -
                1838  printer->fmt_line("{{{}, &{}}},", ename, name);
                -
                1839  }
                -
                1840  }
                -
                1841  }
                -
                1842  };
                -
                1843 
                -
                1844  auto globals = info.global_variables;
                -
                1845  auto thread_vars = info.thread_variables;
                -
                1846 
                -
                1847  if (info.table_count > 0) {
                -
                1848  globals.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
                -
                1849  }
                -
                1850 
                -
                1851  printer->add_newline(2);
                -
                1852  printer->add_line("/** connect global (scalar) variables to hoc -- */");
                -
                1853  printer->add_line("static DoubScal hoc_scalar_double[] = {");
                -
                1854  printer->increase_indent();
                -
                1855  variable_printer(globals, false, false);
                -
                1856  variable_printer(thread_vars, false, false);
                -
                1857  printer->add_line("{nullptr, nullptr}");
                -
                1858  printer->decrease_indent();
                -
                1859  printer->add_line("};");
                -
                1860 
                -
                1861  printer->add_newline(2);
                -
                1862  printer->add_line("/** connect global (array) variables to hoc -- */");
                -
                1863  printer->add_line("static DoubVec hoc_vector_double[] = {");
                -
                1864  printer->increase_indent();
                -
                1865  variable_printer(globals, true, true);
                -
                1866  variable_printer(thread_vars, true, true);
                -
                1867  printer->add_line("{nullptr, nullptr, 0}");
                -
                1868  printer->decrease_indent();
                -
                1869  printer->add_line("};");
                -
                1870 }
                -
                1871 
                -
                1872 
                -
                1873 /**
                -
                1874  * Return registration type for a given BEFORE/AFTER block
                -
                1875  * /param block A BEFORE/AFTER block being registered
                -
                1876  *
                -
                1877  * Depending on a block type i.e. BEFORE or AFTER and also type
                -
                1878  * of it's associated block i.e. BREAKPOINT, INITIAL, SOLVE and
                -
                1879  * STEP, the registration type (as an integer) is calculated.
                -
                1880  * These values are then interpreted by CoreNEURON internally.
                -
                1881  */
                -
                1882 static std::string get_register_type_for_ba_block(const ast::Block* block) {
                -
                1883  std::string register_type{};
                -
                1884  BAType ba_type{};
                -
                1885  /// before block have value 10 and after block 20
                -
                1886  if (block->is_before_block()) {
                -
                1887  // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
                -
                1888  register_type = "BAType::Before";
                -
                1889  ba_type =
                -
                1890  dynamic_cast<const ast::BeforeBlock*>(block)->get_bablock()->get_type()->get_value();
                -
                1891  } else {
                -
                1892  // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
                -
                1893  register_type = "BAType::After";
                -
                1894  ba_type =
                -
                1895  dynamic_cast<const ast::AfterBlock*>(block)->get_bablock()->get_type()->get_value();
                -
                1896  }
                -
                1897 
                -
                1898  /// associated blocks have different values (1 to 4) based on type.
                -
                1899  /// These values are based on neuron/coreneuron implementation details.
                -
                1900  if (ba_type == BATYPE_BREAKPOINT) {
                -
                1901  register_type += " + BAType::Breakpoint";
                -
                1902  } else if (ba_type == BATYPE_SOLVE) {
                -
                1903  register_type += " + BAType::Solve";
                -
                1904  } else if (ba_type == BATYPE_INITIAL) {
                -
                1905  register_type += " + BAType::Initial";
                -
                1906  } else if (ba_type == BATYPE_STEP) {
                -
                1907  register_type += " + BAType::Step";
                -
                1908  } else {
                -
                1909  throw std::runtime_error("Unhandled Before/After type encountered during code generation");
                -
                1910  }
                -
                1911  return register_type;
                -
                1912 }
                -
                1913 
                -
                1914 
                -
                1915 /**
                -
                1916  * \details Every mod file has register function to connect with the simulator.
                -
                1917  * Various information about mechanism and callbacks get registered with
                -
                1918  * the simulator using suffix_reg() function.
                -
                1919  *
                -
                1920  * Here are details:
                -
                1921  * - We should exclude that callback based on the solver, watch statements.
                -
                1922  * - If nrn_get_mechtype is < -1 means that mechanism is not used in the
                -
                1923  * context of neuron execution and hence could be ignored in coreneuron
                -
                1924  * execution.
                -
                1925  * - Ions are internally defined and their types can be queried similar to
                -
                1926  * other mechanisms.
                -
                1927  * - hoc_register_var may not be needed in the context of coreneuron
                -
                1928  * - We assume net receive buffer is on. This is because generated code is
                -
                1929  * compatible for cpu as well as gpu target.
                -
                1930  */
                -
                1931 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
                - -
                1933  printer->add_newline(2);
                -
                1934  printer->add_line("/** register channel with the simulator */");
                -
                1935  printer->fmt_push_block("void _{}_reg()", info.mod_file);
                -
                1936 
                -
                1937  // type related information
                -
                1938  auto suffix = add_escape_quote(info.mod_suffix);
                -
                1939  printer->add_newline();
                -
                1940  printer->fmt_line("int mech_type = nrn_get_mechtype({});", suffix);
                -
                1941  printer->fmt_line("{} = mech_type;", get_variable_name("mech_type", false));
                -
                1942  printer->push_block("if (mech_type == -1)");
                -
                1943  printer->add_line("return;");
                -
                1944  printer->pop_block();
                -
                1945 
                -
                1946  printer->add_newline();
                -
                1947  printer->add_line("_nrn_layout_reg(mech_type, 0);"); // 0 for SoA
                -
                1948 
                -
                1949  // register mechanism
                -
                1950  const auto mech_arguments = register_mechanism_arguments();
                -
                1951  const auto number_of_thread_objects = num_thread_objects();
                -
                1952  if (info.point_process) {
                -
                1953  printer->fmt_line("point_register_mech({}, {}, {}, {});",
                -
                1954  mech_arguments,
                -
                1955  info.constructor_node ? method_name(naming::NRN_CONSTRUCTOR_METHOD)
                -
                1956  : "nullptr",
                -
                1957  info.destructor_node ? method_name(naming::NRN_DESTRUCTOR_METHOD)
                -
                1958  : "nullptr",
                -
                1959  number_of_thread_objects);
                -
                1960  } else {
                -
                1961  printer->fmt_line("register_mech({}, {});", mech_arguments, number_of_thread_objects);
                -
                1962  if (info.constructor_node) {
                -
                1963  printer->fmt_line("register_constructor({});",
                -
                1964  method_name(naming::NRN_CONSTRUCTOR_METHOD));
                -
                1965  }
                -
                1966  }
                -
                1967 
                -
                1968  // types for ion
                -
                1969  for (const auto& ion: info.ions) {
                -
                1970  printer->fmt_line("{} = nrn_get_mechtype({});",
                -
                1971  get_variable_name(ion.name + "_type", false),
                -
                1972  add_escape_quote(ion.name + "_ion"));
                -
                1973  }
                -
                1974  printer->add_newline();
                +
                1789  if (info.vectorize && info.thread_data_index) {
                +
                1790  printer->fmt_line("ThreadDatum ext_call_thread[{}]{};",
                +
                1791  info.thread_data_index,
                +
                1792  value_initialize);
                +
                1793  codegen_global_variables.push_back(make_symbol("ext_call_thread"));
                +
                1794  }
                +
                1795 
                +
                1796  printer->pop_block(";");
                +
                1797 
                +
                1798  print_global_var_struct_assertions();
                +
                1799  print_global_var_struct_decl();
                +
                1800 }
                +
                1801 
                +
                1802 
                +
                1803 /**
                +
                1804  * Print structs that encapsulate information about scalar and
                +
                1805  * vector elements of type global and thread variables.
                +
                1806  */
                + +
                1808  auto variable_printer =
                +
                1809  [&](const std::vector<SymbolType>& variables, bool if_array, bool if_vector) {
                +
                1810  for (const auto& variable: variables) {
                +
                1811  if (variable->is_array() == if_array) {
                +
                1812  // false => do not use the instance struct, which is not
                +
                1813  // defined in the global declaration that we are printing
                +
                1814  auto name = get_variable_name(variable->get_name(), false);
                +
                1815  auto ename = add_escape_quote(variable->get_name() + "_" + info.mod_suffix);
                +
                1816  auto length = variable->get_length();
                +
                1817  if (if_vector) {
                +
                1818  printer->fmt_line("{{{}, {}, {}}},", ename, name, length);
                +
                1819  } else {
                +
                1820  printer->fmt_line("{{{}, &{}}},", ename, name);
                +
                1821  }
                +
                1822  }
                +
                1823  }
                +
                1824  };
                +
                1825 
                +
                1826  auto globals = info.global_variables;
                +
                1827  auto thread_vars = info.thread_variables;
                +
                1828 
                +
                1829  if (info.table_count > 0) {
                +
                1830  globals.push_back(make_symbol(naming::USE_TABLE_VARIABLE));
                +
                1831  }
                +
                1832 
                +
                1833  printer->add_newline(2);
                +
                1834  printer->add_line("/** connect global (scalar) variables to hoc -- */");
                +
                1835  printer->add_line("static DoubScal hoc_scalar_double[] = {");
                +
                1836  printer->increase_indent();
                +
                1837  variable_printer(globals, false, false);
                +
                1838  variable_printer(thread_vars, false, false);
                +
                1839  printer->add_line("{nullptr, nullptr}");
                +
                1840  printer->decrease_indent();
                +
                1841  printer->add_line("};");
                +
                1842 
                +
                1843  printer->add_newline(2);
                +
                1844  printer->add_line("/** connect global (array) variables to hoc -- */");
                +
                1845  printer->add_line("static DoubVec hoc_vector_double[] = {");
                +
                1846  printer->increase_indent();
                +
                1847  variable_printer(globals, true, true);
                +
                1848  variable_printer(thread_vars, true, true);
                +
                1849  printer->add_line("{nullptr, nullptr, 0}");
                +
                1850  printer->decrease_indent();
                +
                1851  printer->add_line("};");
                +
                1852 }
                +
                1853 
                +
                1854 
                +
                1855 /**
                +
                1856  * Return registration type for a given BEFORE/AFTER block
                +
                1857  * /param block A BEFORE/AFTER block being registered
                +
                1858  *
                +
                1859  * Depending on a block type i.e. BEFORE or AFTER and also type
                +
                1860  * of it's associated block i.e. BREAKPOINT, INITIAL, SOLVE and
                +
                1861  * STEP, the registration type (as an integer) is calculated.
                +
                1862  * These values are then interpreted by CoreNEURON internally.
                +
                1863  */
                +
                1864 static std::string get_register_type_for_ba_block(const ast::Block* block) {
                +
                1865  std::string register_type{};
                +
                1866  BAType ba_type{};
                +
                1867  /// before block have value 10 and after block 20
                +
                1868  if (block->is_before_block()) {
                +
                1869  // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
                +
                1870  register_type = "BAType::Before";
                +
                1871  ba_type =
                +
                1872  dynamic_cast<const ast::BeforeBlock*>(block)->get_bablock()->get_type()->get_value();
                +
                1873  } else {
                +
                1874  // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
                +
                1875  register_type = "BAType::After";
                +
                1876  ba_type =
                +
                1877  dynamic_cast<const ast::AfterBlock*>(block)->get_bablock()->get_type()->get_value();
                +
                1878  }
                +
                1879 
                +
                1880  /// associated blocks have different values (1 to 4) based on type.
                +
                1881  /// These values are based on neuron/coreneuron implementation details.
                +
                1882  if (ba_type == BATYPE_BREAKPOINT) {
                +
                1883  register_type += " + BAType::Breakpoint";
                +
                1884  } else if (ba_type == BATYPE_SOLVE) {
                +
                1885  register_type += " + BAType::Solve";
                +
                1886  } else if (ba_type == BATYPE_INITIAL) {
                +
                1887  register_type += " + BAType::Initial";
                +
                1888  } else if (ba_type == BATYPE_STEP) {
                +
                1889  register_type += " + BAType::Step";
                +
                1890  } else {
                +
                1891  throw std::runtime_error("Unhandled Before/After type encountered during code generation");
                +
                1892  }
                +
                1893  return register_type;
                +
                1894 }
                +
                1895 
                +
                1896 
                +
                1897 /**
                +
                1898  * \details Every mod file has register function to connect with the simulator.
                +
                1899  * Various information about mechanism and callbacks get registered with
                +
                1900  * the simulator using suffix_reg() function.
                +
                1901  *
                +
                1902  * Here are details:
                +
                1903  * - We should exclude that callback based on the solver, watch statements.
                +
                1904  * - If nrn_get_mechtype is < -1 means that mechanism is not used in the
                +
                1905  * context of neuron execution and hence could be ignored in coreneuron
                +
                1906  * execution.
                +
                1907  * - Ions are internally defined and their types can be queried similar to
                +
                1908  * other mechanisms.
                +
                1909  * - hoc_register_var may not be needed in the context of coreneuron
                +
                1910  * - We assume net receive buffer is on. This is because generated code is
                +
                1911  * compatible for cpu as well as gpu target.
                +
                1912  */
                +
                1913 // NOLINTNEXTLINE(readability-function-cognitive-complexity)
                + +
                1915  printer->add_newline(2);
                +
                1916  printer->add_line("/** register channel with the simulator */");
                +
                1917  printer->fmt_push_block("void _{}_reg()", info.mod_file);
                +
                1918 
                +
                1919  // type related information
                +
                1920  auto suffix = add_escape_quote(info.mod_suffix);
                +
                1921  printer->add_newline();
                +
                1922  printer->fmt_line("int mech_type = nrn_get_mechtype({});", suffix);
                +
                1923  printer->fmt_line("{} = mech_type;", get_variable_name("mech_type", false));
                +
                1924  printer->push_block("if (mech_type == -1)");
                +
                1925  printer->add_line("return;");
                +
                1926  printer->pop_block();
                +
                1927 
                +
                1928  printer->add_newline();
                +
                1929  printer->add_line("_nrn_layout_reg(mech_type, 0);"); // 0 for SoA
                +
                1930 
                +
                1931  // register mechanism
                +
                1932  const auto mech_arguments = register_mechanism_arguments();
                +
                1933  const auto number_of_thread_objects = num_thread_objects();
                +
                1934  if (info.point_process) {
                +
                1935  printer->fmt_line("point_register_mech({}, {}, {}, {});",
                +
                1936  mech_arguments,
                +
                1937  info.constructor_node ? method_name(naming::NRN_CONSTRUCTOR_METHOD)
                +
                1938  : "nullptr",
                +
                1939  info.destructor_node ? method_name(naming::NRN_DESTRUCTOR_METHOD)
                +
                1940  : "nullptr",
                +
                1941  number_of_thread_objects);
                +
                1942  } else {
                +
                1943  printer->fmt_line("register_mech({}, {});", mech_arguments, number_of_thread_objects);
                +
                1944  if (info.constructor_node) {
                +
                1945  printer->fmt_line("register_constructor({});",
                +
                1946  method_name(naming::NRN_CONSTRUCTOR_METHOD));
                +
                1947  }
                +
                1948  }
                +
                1949 
                +
                1950  // types for ion
                +
                1951  for (const auto& ion: info.ions) {
                +
                1952  printer->fmt_line("{} = nrn_get_mechtype({});",
                +
                1953  get_variable_name(ion.name + "_type", false),
                +
                1954  add_escape_quote(ion.name + "_ion"));
                +
                1955  }
                +
                1956  printer->add_newline();
                +
                1957 
                +
                1958  /*
                +
                1959  * Register callbacks for thread allocation and cleanup. Note that thread_data_index
                +
                1960  * represent total number of thread used minus 1 (i.e. index of last thread).
                +
                1961  */
                +
                1962  if (info.vectorize && (info.thread_data_index != 0)) {
                +
                1963  // false to avoid getting the copy from the instance structure
                +
                1964  printer->fmt_line("thread_mem_init({});", get_variable_name("ext_call_thread", false));
                +
                1965  }
                +
                1966 
                +
                1967  if (!info.thread_variables.empty()) {
                +
                1968  printer->fmt_line("{} = 0;", get_variable_name("thread_data_in_use"));
                +
                1969  }
                +
                1970 
                +
                1971  if (info.thread_callback_register) {
                +
                1972  printer->add_line("_nrn_thread_reg0(mech_type, thread_mem_cleanup);");
                +
                1973  printer->add_line("_nrn_thread_reg1(mech_type, thread_mem_init);");
                +
                1974  }
                1975 
                -
                1976  /*
                -
                1977  * Register callbacks for thread allocation and cleanup. Note that thread_data_index
                -
                1978  * represent total number of thread used minus 1 (i.e. index of last thread).
                -
                1979  */
                -
                1980  if (info.vectorize && (info.thread_data_index != 0)) {
                -
                1981  // false to avoid getting the copy from the instance structure
                -
                1982  printer->fmt_line("thread_mem_init({});", get_variable_name("ext_call_thread", false));
                -
                1983  }
                -
                1984 
                -
                1985  if (!info.thread_variables.empty()) {
                -
                1986  printer->fmt_line("{} = 0;", get_variable_name("thread_data_in_use"));
                -
                1987  }
                -
                1988 
                -
                1989  if (info.thread_callback_register) {
                -
                1990  printer->add_line("_nrn_thread_reg0(mech_type, thread_mem_cleanup);");
                -
                1991  printer->add_line("_nrn_thread_reg1(mech_type, thread_mem_init);");
                -
                1992  }
                -
                1993 
                -
                1994  if (info.emit_table_thread()) {
                -
                1995  auto name = method_name("check_table_thread");
                -
                1996  printer->fmt_line("_nrn_thread_table_reg(mech_type, {});", name);
                +
                1976  if (info.emit_table_thread()) {
                +
                1977  auto name = method_name("check_table_thread");
                +
                1978  printer->fmt_line("_nrn_thread_table_reg(mech_type, {});", name);
                +
                1979  }
                +
                1980 
                +
                1981  // register read/write callbacks for pointers
                +
                1982  if (info.bbcore_pointer_used) {
                +
                1983  printer->add_line("hoc_reg_bbcore_read(mech_type, bbcore_read);");
                +
                1984  printer->add_line("hoc_reg_bbcore_write(mech_type, bbcore_write);");
                +
                1985  }
                +
                1986 
                +
                1987  // register size of double and int elements
                +
                1988  // clang-format off
                +
                1989  printer->add_line("hoc_register_prop_size(mech_type, float_variables_size(), int_variables_size());");
                +
                1990  // clang-format on
                +
                1991 
                +
                1992  // register semantics for index variables
                +
                1993  for (auto& semantic: info.semantics) {
                +
                1994  auto args =
                +
                1995  fmt::format("mech_type, {}, {}", semantic.index, add_escape_quote(semantic.name));
                +
                1996  printer->fmt_line("hoc_register_dparam_semantics({});", args);
                1997  }
                1998 
                -
                1999  // register read/write callbacks for pointers
                -
                2000  if (info.bbcore_pointer_used) {
                -
                2001  printer->add_line("hoc_reg_bbcore_read(mech_type, bbcore_read);");
                -
                2002  printer->add_line("hoc_reg_bbcore_write(mech_type, bbcore_write);");
                -
                2003  }
                -
                2004 
                -
                2005  // register size of double and int elements
                -
                2006  // clang-format off
                -
                2007  printer->add_line("hoc_register_prop_size(mech_type, float_variables_size(), int_variables_size());");
                -
                2008  // clang-format on
                -
                2009 
                -
                2010  // register semantics for index variables
                -
                2011  for (auto& semantic: info.semantics) {
                -
                2012  auto args =
                -
                2013  fmt::format("mech_type, {}, {}", semantic.index, add_escape_quote(semantic.name));
                -
                2014  printer->fmt_line("hoc_register_dparam_semantics({});", args);
                -
                2015  }
                -
                2016 
                -
                2017  if (info.is_watch_used()) {
                -
                2018  auto watch_fun = compute_method_name(BlockType::Watch);
                -
                2019  printer->fmt_line("hoc_register_watch_check({}, mech_type);", watch_fun);
                -
                2020  }
                -
                2021 
                -
                2022  if (info.write_concentration) {
                -
                2023  printer->add_line("nrn_writes_conc(mech_type, 0);");
                -
                2024  }
                -
                2025 
                -
                2026  // register various information for point process type
                -
                2027  if (info.net_event_used) {
                -
                2028  printer->add_line("add_nrn_has_net_event(mech_type);");
                -
                2029  }
                -
                2030  if (info.artificial_cell) {
                -
                2031  printer->fmt_line("add_nrn_artcell(mech_type, {});", info.tqitem_index);
                -
                2032  }
                -
                2033  if (net_receive_buffering_required()) {
                -
                2034  printer->fmt_line("hoc_register_net_receive_buffering({}, mech_type);",
                -
                2035  method_name("net_buf_receive"));
                -
                2036  }
                -
                2037  if (info.num_net_receive_parameters != 0) {
                -
                2038  auto net_recv_init_arg = "nullptr";
                -
                2039  if (info.net_receive_initial_node != nullptr) {
                -
                2040  net_recv_init_arg = "net_init";
                -
                2041  }
                -
                2042  printer->fmt_line("set_pnt_receive(mech_type, {}, {}, num_net_receive_args());",
                -
                2043  method_name("net_receive"),
                -
                2044  net_recv_init_arg);
                -
                2045  }
                -
                2046  if (info.for_netcon_used) {
                -
                2047  // index where information about FOR_NETCON is stored in the integer array
                -
                2048  const auto index =
                -
                2049  std::find_if(info.semantics.begin(), info.semantics.end(), [](const IndexSemantics& a) {
                -
                2050  return a.name == naming::FOR_NETCON_SEMANTIC;
                -
                2051  })->index;
                -
                2052  printer->fmt_line("add_nrn_fornetcons(mech_type, {});", index);
                -
                2053  }
                +
                1999  if (info.is_watch_used()) {
                +
                2000  auto watch_fun = compute_method_name(BlockType::Watch);
                +
                2001  printer->fmt_line("hoc_register_watch_check({}, mech_type);", watch_fun);
                +
                2002  }
                +
                2003 
                +
                2004  if (info.write_concentration) {
                +
                2005  printer->add_line("nrn_writes_conc(mech_type, 0);");
                +
                2006  }
                +
                2007 
                +
                2008  // register various information for point process type
                +
                2009  if (info.net_event_used) {
                +
                2010  printer->add_line("add_nrn_has_net_event(mech_type);");
                +
                2011  }
                +
                2012  if (info.artificial_cell) {
                +
                2013  printer->fmt_line("add_nrn_artcell(mech_type, {});", info.tqitem_index);
                +
                2014  }
                +
                2015  if (net_receive_buffering_required()) {
                +
                2016  printer->fmt_line("hoc_register_net_receive_buffering({}, mech_type);",
                +
                2017  method_name("net_buf_receive"));
                +
                2018  }
                +
                2019  if (info.num_net_receive_parameters != 0) {
                +
                2020  auto net_recv_init_arg = "nullptr";
                +
                2021  if (info.net_receive_initial_node != nullptr) {
                +
                2022  net_recv_init_arg = "net_init";
                +
                2023  }
                +
                2024  printer->fmt_line("set_pnt_receive(mech_type, {}, {}, num_net_receive_args());",
                +
                2025  method_name("net_receive"),
                +
                2026  net_recv_init_arg);
                +
                2027  }
                +
                2028  if (info.for_netcon_used) {
                +
                2029  // index where information about FOR_NETCON is stored in the integer array
                +
                2030  const auto index =
                +
                2031  std::find_if(info.semantics.begin(), info.semantics.end(), [](const IndexSemantics& a) {
                +
                2032  return a.name == naming::FOR_NETCON_SEMANTIC;
                +
                2033  })->index;
                +
                2034  printer->fmt_line("add_nrn_fornetcons(mech_type, {});", index);
                +
                2035  }
                +
                2036 
                +
                2037  if (info.net_event_used || info.net_send_used) {
                +
                2038  printer->add_line("hoc_register_net_send_buffering(mech_type);");
                +
                2039  }
                +
                2040 
                +
                2041  /// register all before/after blocks
                +
                2042  for (size_t i = 0; i < info.before_after_blocks.size(); i++) {
                +
                2043  // register type and associated function name for the block
                +
                2044  const auto& block = info.before_after_blocks[i];
                +
                2045  std::string register_type = get_register_type_for_ba_block(block);
                +
                2046  std::string function_name = method_name(fmt::format("nrn_before_after_{}", i));
                +
                2047  printer->fmt_line("hoc_reg_ba(mech_type, {}, {});", function_name, register_type);
                +
                2048  }
                +
                2049 
                +
                2050  // register variables for hoc
                +
                2051  printer->add_line("hoc_register_var(hoc_scalar_double, hoc_vector_double, NULL);");
                +
                2052  printer->pop_block();
                +
                2053 }
                2054 
                -
                2055  if (info.net_event_used || info.net_send_used) {
                -
                2056  printer->add_line("hoc_register_net_send_buffering(mech_type);");
                -
                2057  }
                -
                2058 
                -
                2059  /// register all before/after blocks
                -
                2060  for (size_t i = 0; i < info.before_after_blocks.size(); i++) {
                -
                2061  // register type and associated function name for the block
                -
                2062  const auto& block = info.before_after_blocks[i];
                -
                2063  std::string register_type = get_register_type_for_ba_block(block);
                -
                2064  std::string function_name = method_name(fmt::format("nrn_before_after_{}", i));
                -
                2065  printer->fmt_line("hoc_reg_ba(mech_type, {}, {});", function_name, register_type);
                -
                2066  }
                -
                2067 
                -
                2068  // register variables for hoc
                -
                2069  printer->add_line("hoc_register_var(hoc_scalar_double, hoc_vector_double, NULL);");
                -
                2070  printer->pop_block();
                -
                2071 }
                -
                2072 
                -
                2073 
                - -
                2075  if (!info.thread_callback_register) {
                -
                2076  return;
                -
                2077  }
                -
                2078 
                -
                2079  // thread_mem_init callback
                -
                2080  printer->add_newline(2);
                -
                2081  printer->add_line("/** thread memory allocation callback */");
                -
                2082  printer->push_block("static void thread_mem_init(ThreadDatum* thread) ");
                -
                2083 
                -
                2084  if (info.vectorize && info.derivimplicit_used()) {
                -
                2085  printer->fmt_line("thread[dith{}()].pval = nullptr;", info.derivimplicit_list_num);
                -
                2086  }
                -
                2087  if (info.vectorize && (info.top_local_thread_size != 0)) {
                -
                2088  auto length = info.top_local_thread_size;
                -
                2089  auto allocation = fmt::format("(double*)mem_alloc({}, sizeof(double))", length);
                -
                2090  printer->fmt_line("thread[top_local_var_tid()].pval = {};", allocation);
                -
                2091  }
                -
                2092  if (info.thread_var_data_size != 0) {
                -
                2093  auto length = info.thread_var_data_size;
                -
                2094  auto thread_data = get_variable_name("thread_data");
                -
                2095  auto thread_data_in_use = get_variable_name("thread_data_in_use");
                -
                2096  auto allocation = fmt::format("(double*)mem_alloc({}, sizeof(double))", length);
                -
                2097  printer->fmt_push_block("if ({})", thread_data_in_use);
                -
                2098  printer->fmt_line("thread[thread_var_tid()].pval = {};", allocation);
                -
                2099  printer->chain_block("else");
                -
                2100  printer->fmt_line("thread[thread_var_tid()].pval = {};", thread_data);
                -
                2101  printer->fmt_line("{} = 1;", thread_data_in_use);
                -
                2102  printer->pop_block();
                -
                2103  }
                -
                2104  printer->pop_block();
                -
                2105  printer->add_newline(2);
                -
                2106 
                -
                2107 
                -
                2108  // thread_mem_cleanup callback
                -
                2109  printer->add_line("/** thread memory cleanup callback */");
                -
                2110  printer->push_block("static void thread_mem_cleanup(ThreadDatum* thread) ");
                -
                2111 
                -
                2112  // clang-format off
                -
                2113  if (info.vectorize && info.derivimplicit_used()) {
                -
                2114  int n = info.derivimplicit_list_num;
                -
                2115  printer->fmt_line("free(thread[dith{}()].pval);", n);
                -
                2116  printer->fmt_line("nrn_destroy_newtonspace(static_cast<NewtonSpace*>(*newtonspace{}(thread)));", n);
                -
                2117  }
                -
                2118  // clang-format on
                -
                2119 
                -
                2120  if (info.top_local_thread_size != 0) {
                -
                2121  auto line = "free(thread[top_local_var_tid()].pval);";
                -
                2122  printer->add_line(line);
                -
                2123  }
                -
                2124  if (info.thread_var_data_size != 0) {
                -
                2125  auto thread_data = get_variable_name("thread_data");
                -
                2126  auto thread_data_in_use = get_variable_name("thread_data_in_use");
                -
                2127  printer->fmt_push_block("if (thread[thread_var_tid()].pval == {})", thread_data);
                -
                2128  printer->fmt_line("{} = 0;", thread_data_in_use);
                -
                2129  printer->chain_block("else");
                -
                2130  printer->add_line("free(thread[thread_var_tid()].pval);");
                -
                2131  printer->pop_block();
                -
                2132  }
                -
                2133  printer->pop_block();
                -
                2134 }
                -
                2135 
                -
                2136 
                - -
                2138  auto const value_initialize = print_initializers ? "{}" : "";
                -
                2139  auto int_type = default_int_data_type();
                -
                2140  printer->add_newline(2);
                -
                2141  printer->add_line("/** all mechanism instance variables and global variables */");
                -
                2142  printer->fmt_push_block("struct {} ", instance_struct());
                -
                2143 
                -
                2144  for (auto const& [var, type]: info.neuron_global_variables) {
                -
                2145  auto const name = var->get_name();
                -
                2146  printer->fmt_line("{}* {}{};",
                -
                2147  type,
                -
                2148  name,
                -
                2149  print_initializers ? fmt::format("{{&coreneuron::{}}}", name)
                -
                2150  : std::string{});
                -
                2151  }
                -
                2152  for (auto& var: codegen_float_variables) {
                -
                2153  const auto& name = var->get_name();
                -
                2154  auto type = get_range_var_float_type(var);
                -
                2155  auto qualifier = is_constant_variable(name) ? "const " : "";
                -
                2156  printer->fmt_line("{}{}* {}{};", qualifier, type, name, value_initialize);
                -
                2157  }
                -
                2158  for (auto& var: codegen_int_variables) {
                -
                2159  const auto& name = var.symbol->get_name();
                -
                2160  if (var.is_index || var.is_integer) {
                -
                2161  auto qualifier = var.is_constant ? "const " : "";
                -
                2162  printer->fmt_line("{}{}* {}{};", qualifier, int_type, name, value_initialize);
                -
                2163  } else {
                -
                2164  auto qualifier = var.is_constant ? "const " : "";
                -
                2165  auto type = var.is_vdata ? "void*" : default_float_data_type();
                -
                2166  printer->fmt_line("{}{}* {}{};", qualifier, type, name, value_initialize);
                -
                2167  }
                -
                2168  }
                -
                2169 
                -
                2170  printer->fmt_line("{}* {}{};",
                -
                2171  global_struct(),
                - -
                2173  print_initializers ? fmt::format("{{&{}}}", global_struct_instance())
                -
                2174  : std::string{});
                -
                2175  printer->pop_block(";");
                -
                2176 }
                -
                2177 
                -
                2178 
                - -
                2180  if (!ion_variable_struct_required()) {
                -
                2181  return;
                -
                2182  }
                -
                2183  printer->add_newline(2);
                -
                2184  printer->add_line("/** ion write variables */");
                -
                2185  printer->push_block("struct IonCurVar");
                +
                2055 
                + +
                2057  if (!info.thread_callback_register) {
                +
                2058  return;
                +
                2059  }
                +
                2060 
                +
                2061  // thread_mem_init callback
                +
                2062  printer->add_newline(2);
                +
                2063  printer->add_line("/** thread memory allocation callback */");
                +
                2064  printer->push_block("static void thread_mem_init(ThreadDatum* thread) ");
                +
                2065 
                +
                2066  if (info.vectorize && info.derivimplicit_used()) {
                +
                2067  printer->fmt_line("thread[dith{}()].pval = nullptr;", info.derivimplicit_list_num);
                +
                2068  }
                +
                2069  if (info.vectorize && (info.top_local_thread_size != 0)) {
                +
                2070  auto length = info.top_local_thread_size;
                +
                2071  auto allocation = fmt::format("(double*)mem_alloc({}, sizeof(double))", length);
                +
                2072  printer->fmt_line("thread[top_local_var_tid()].pval = {};", allocation);
                +
                2073  }
                +
                2074  if (info.thread_var_data_size != 0) {
                +
                2075  auto length = info.thread_var_data_size;
                +
                2076  auto thread_data = get_variable_name("thread_data");
                +
                2077  auto thread_data_in_use = get_variable_name("thread_data_in_use");
                +
                2078  auto allocation = fmt::format("(double*)mem_alloc({}, sizeof(double))", length);
                +
                2079  printer->fmt_push_block("if ({})", thread_data_in_use);
                +
                2080  printer->fmt_line("thread[thread_var_tid()].pval = {};", allocation);
                +
                2081  printer->chain_block("else");
                +
                2082  printer->fmt_line("thread[thread_var_tid()].pval = {};", thread_data);
                +
                2083  printer->fmt_line("{} = 1;", thread_data_in_use);
                +
                2084  printer->pop_block();
                +
                2085  }
                +
                2086  printer->pop_block();
                +
                2087  printer->add_newline(2);
                +
                2088 
                +
                2089 
                +
                2090  // thread_mem_cleanup callback
                +
                2091  printer->add_line("/** thread memory cleanup callback */");
                +
                2092  printer->push_block("static void thread_mem_cleanup(ThreadDatum* thread) ");
                +
                2093 
                +
                2094  // clang-format off
                +
                2095  if (info.vectorize && info.derivimplicit_used()) {
                +
                2096  int n = info.derivimplicit_list_num;
                +
                2097  printer->fmt_line("free(thread[dith{}()].pval);", n);
                +
                2098  printer->fmt_line("nrn_destroy_newtonspace(static_cast<NewtonSpace*>(*newtonspace{}(thread)));", n);
                +
                2099  }
                +
                2100  // clang-format on
                +
                2101 
                +
                2102  if (info.top_local_thread_size != 0) {
                +
                2103  auto line = "free(thread[top_local_var_tid()].pval);";
                +
                2104  printer->add_line(line);
                +
                2105  }
                +
                2106  if (info.thread_var_data_size != 0) {
                +
                2107  auto thread_data = get_variable_name("thread_data");
                +
                2108  auto thread_data_in_use = get_variable_name("thread_data_in_use");
                +
                2109  printer->fmt_push_block("if (thread[thread_var_tid()].pval == {})", thread_data);
                +
                2110  printer->fmt_line("{} = 0;", thread_data_in_use);
                +
                2111  printer->chain_block("else");
                +
                2112  printer->add_line("free(thread[thread_var_tid()].pval);");
                +
                2113  printer->pop_block();
                +
                2114  }
                +
                2115  printer->pop_block();
                +
                2116 }
                +
                2117 
                +
                2118 
                + +
                2120  auto const value_initialize = print_initializers ? "{}" : "";
                +
                2121  auto int_type = default_int_data_type();
                +
                2122  printer->add_newline(2);
                +
                2123  printer->add_line("/** all mechanism instance variables and global variables */");
                +
                2124  printer->fmt_push_block("struct {} ", instance_struct());
                +
                2125 
                +
                2126  for (auto const& [var, type]: info.neuron_global_variables) {
                +
                2127  auto const name = var->get_name();
                +
                2128  printer->fmt_line("{}* {}{};",
                +
                2129  type,
                +
                2130  name,
                +
                2131  print_initializers ? fmt::format("{{&coreneuron::{}}}", name)
                +
                2132  : std::string{});
                +
                2133  }
                +
                2134  for (auto& var: codegen_float_variables) {
                +
                2135  const auto& name = var->get_name();
                +
                2136  auto type = get_range_var_float_type(var);
                +
                2137  auto qualifier = is_constant_variable(name) ? "const " : "";
                +
                2138  printer->fmt_line("{}{}* {}{};", qualifier, type, name, value_initialize);
                +
                2139  }
                +
                2140  for (auto& var: codegen_int_variables) {
                +
                2141  const auto& name = var.symbol->get_name();
                +
                2142  if (var.is_index || var.is_integer) {
                +
                2143  auto qualifier = var.is_constant ? "const " : "";
                +
                2144  printer->fmt_line("{}{}* {}{};", qualifier, int_type, name, value_initialize);
                +
                2145  } else {
                +
                2146  auto qualifier = var.is_constant ? "const " : "";
                +
                2147  auto type = var.is_vdata ? "void*" : default_float_data_type();
                +
                2148  printer->fmt_line("{}{}* {}{};", qualifier, type, name, value_initialize);
                +
                2149  }
                +
                2150  }
                +
                2151 
                +
                2152  printer->fmt_line("{}* {}{};",
                +
                2153  global_struct(),
                + +
                2155  print_initializers ? fmt::format("{{&{}}}", global_struct_instance())
                +
                2156  : std::string{});
                +
                2157  printer->pop_block(";");
                +
                2158 }
                +
                2159 
                +
                2160 
                + +
                2162  if (!ion_variable_struct_required()) {
                +
                2163  return;
                +
                2164  }
                +
                2165  printer->add_newline(2);
                +
                2166  printer->add_line("/** ion write variables */");
                +
                2167  printer->push_block("struct IonCurVar");
                +
                2168 
                +
                2169  std::string float_type = default_float_data_type();
                +
                2170  std::vector<std::string> members;
                +
                2171 
                +
                2172  for (auto& ion: info.ions) {
                +
                2173  for (auto& var: ion.writes) {
                +
                2174  printer->fmt_line("{} {};", float_type, var);
                +
                2175  members.push_back(var);
                +
                2176  }
                +
                2177  }
                +
                2178  for (auto& var: info.currents) {
                +
                2179  if (!info.is_ion_variable(var)) {
                +
                2180  printer->fmt_line("{} {};", float_type, var);
                +
                2181  members.push_back(var);
                +
                2182  }
                +
                2183  }
                +
                2184 
                +
                2185  print_ion_var_constructor(members);
                2186 
                -
                2187  std::string float_type = default_float_data_type();
                -
                2188  std::vector<std::string> members;
                +
                2187  printer->pop_block(";");
                +
                2188 }
                2189 
                -
                2190  for (auto& ion: info.ions) {
                -
                2191  for (auto& var: ion.writes) {
                -
                2192  printer->fmt_line("{} {};", float_type, var);
                -
                2193  members.push_back(var);
                -
                2194  }
                -
                2195  }
                -
                2196  for (auto& var: info.currents) {
                -
                2197  if (!info.is_ion_variable(var)) {
                -
                2198  printer->fmt_line("{} {};", float_type, var);
                -
                2199  members.push_back(var);
                -
                2200  }
                -
                2201  }
                -
                2202 
                -
                2203  print_ion_var_constructor(members);
                -
                2204 
                -
                2205  printer->pop_block(";");
                -
                2206 }
                +
                2190 
                + +
                2192  const std::vector<std::string>& members) {
                +
                2193  // constructor
                +
                2194  printer->add_newline();
                +
                2195  printer->add_indent();
                +
                2196  printer->add_text("IonCurVar() : ");
                +
                2197  for (int i = 0; i < members.size(); i++) {
                +
                2198  printer->fmt_text("{}(0)", members[i]);
                +
                2199  if (i + 1 < members.size()) {
                +
                2200  printer->add_text(", ");
                +
                2201  }
                +
                2202  }
                +
                2203  printer->add_text(" {}");
                +
                2204  printer->add_newline();
                +
                2205 }
                +
                2206 
                2207 
                -
                2208 
                - -
                2210  const std::vector<std::string>& members) {
                -
                2211  // constructor
                -
                2212  printer->add_newline();
                -
                2213  printer->add_indent();
                -
                2214  printer->add_text("IonCurVar() : ");
                -
                2215  for (int i = 0; i < members.size(); i++) {
                -
                2216  printer->fmt_text("{}(0)", members[i]);
                -
                2217  if (i + 1 < members.size()) {
                -
                2218  printer->add_text(", ");
                -
                2219  }
                -
                2220  }
                -
                2221  printer->add_text(" {}");
                -
                2222  printer->add_newline();
                -
                2223 }
                -
                2224 
                -
                2225 
                - -
                2227  printer->add_line("IonCurVar ionvar;");
                -
                2228 }
                -
                2229 
                -
                2230 
                - -
                2232  // nothing for cpu
                -
                2233 }
                -
                2234 
                -
                2235 
                - -
                2237  auto type = float_data_type();
                -
                2238  printer->add_newline(2);
                -
                2239  printer->add_line("/** allocate and setup array for range variable */");
                -
                2240  printer->fmt_push_block("static inline {}* setup_range_variable(double* variable, int n)",
                -
                2241  type);
                -
                2242  printer->fmt_line("{0}* data = ({0}*) mem_alloc(n, sizeof({0}));", type);
                -
                2243  printer->push_block("for(size_t i = 0; i < n; i++)");
                -
                2244  printer->add_line("data[i] = variable[i];");
                -
                2245  printer->pop_block();
                -
                2246  printer->add_line("return data;");
                -
                2247  printer->pop_block();
                -
                2248 }
                -
                2249 
                -
                2250 
                -
                2251 /**
                -
                2252  * \details If floating point type like "float" is specified on command line then
                -
                2253  * we can't turn all variables to new type. This is because certain variables
                -
                2254  * are pointers to internal variables (e.g. ions). Hence, we check if given
                -
                2255  * variable can be safely converted to new type. If so, return new type.
                -
                2256  */
                - -
                2258  // clang-format off
                -
                2259  auto with = NmodlType::read_ion_var
                -
                2260  | NmodlType::write_ion_var
                -
                2261  | NmodlType::pointer_var
                -
                2262  | NmodlType::bbcore_pointer_var
                -
                2263  | NmodlType::extern_neuron_variable;
                -
                2264  // clang-format on
                -
                2265  bool need_default_type = symbol->has_any_property(with);
                -
                2266  if (need_default_type) {
                -
                2267  return default_float_data_type();
                -
                2268  }
                -
                2269  return float_data_type();
                -
                2270 }
                -
                2271 
                -
                2272 
                - -
                2274  if (range_variable_setup_required()) {
                -
                2275  print_setup_range_variable();
                -
                2276  }
                -
                2277 
                -
                2278  printer->add_newline();
                -
                2279  printer->add_line("// Allocate instance structure");
                -
                2280  printer->fmt_push_block("static void {}(NrnThread* nt, Memb_list* ml, int type)",
                - -
                2282  printer->add_line("assert(!ml->instance);");
                -
                2283  printer->add_line("assert(!ml->global_variables);");
                -
                2284  printer->add_line("assert(ml->global_variables_size == 0);");
                -
                2285  printer->fmt_line("auto* const inst = new {}{{}};", instance_struct());
                -
                2286  printer->fmt_line("assert(inst->{} == &{});",
                - -
                2288  global_struct_instance());
                -
                2289  printer->add_line("ml->instance = inst;");
                -
                2290  printer->fmt_line("ml->global_variables = inst->{};", naming::INST_GLOBAL_MEMBER);
                -
                2291  printer->fmt_line("ml->global_variables_size = sizeof({});", global_struct());
                -
                2292  printer->pop_block();
                -
                2293  printer->add_newline();
                -
                2294 
                -
                2295  auto const cast_inst_and_assert_validity = [&]() {
                -
                2296  printer->fmt_line("auto* const inst = static_cast<{}*>(ml->instance);", instance_struct());
                -
                2297  printer->add_line("assert(inst);");
                -
                2298  printer->fmt_line("assert(inst->{});", naming::INST_GLOBAL_MEMBER);
                -
                2299  printer->fmt_line("assert(inst->{} == &{});",
                - -
                2301  global_struct_instance());
                -
                2302  printer->fmt_line("assert(inst->{} == ml->global_variables);", naming::INST_GLOBAL_MEMBER);
                -
                2303  printer->fmt_line("assert(ml->global_variables_size == sizeof({}));", global_struct());
                -
                2304  };
                -
                2305 
                -
                2306  // Must come before print_instance_struct_copy_to_device and
                -
                2307  // print_instance_struct_delete_from_device
                -
                2308  print_instance_struct_transfer_routine_declarations();
                -
                2309 
                -
                2310  printer->add_line("// Deallocate the instance structure");
                -
                2311  printer->fmt_push_block("static void {}(NrnThread* nt, Memb_list* ml, int type)",
                - -
                2313  cast_inst_and_assert_validity();
                -
                2314  print_instance_struct_delete_from_device();
                -
                2315  printer->add_multi_line(R"CODE(
                -
                2316  delete inst;
                -
                2317  ml->instance = nullptr;
                -
                2318  ml->global_variables = nullptr;
                -
                2319  ml->global_variables_size = 0;
                -
                2320  )CODE");
                -
                2321  printer->pop_block();
                -
                2322  printer->add_newline();
                -
                2323 
                -
                2324 
                -
                2325  printer->add_line("/** initialize mechanism instance variables */");
                -
                2326  printer->push_block("static inline void setup_instance(NrnThread* nt, Memb_list* ml)");
                -
                2327  cast_inst_and_assert_validity();
                -
                2328 
                -
                2329  std::string stride;
                -
                2330  printer->add_line("int pnodecount = ml->_nodecount_padded;");
                -
                2331  stride = "*pnodecount";
                -
                2332 
                -
                2333  printer->add_line("Datum* indexes = ml->pdata;");
                -
                2334 
                -
                2335  auto const float_type = default_float_data_type();
                -
                2336 
                -
                2337  int id = 0;
                -
                2338  std::vector<std::string> ptr_members{naming::INST_GLOBAL_MEMBER};
                -
                2339  for (auto const& [var, type]: info.neuron_global_variables) {
                -
                2340  ptr_members.push_back(var->get_name());
                + +
                2209  printer->add_line("IonCurVar ionvar;");
                +
                2210 }
                +
                2211 
                +
                2212 
                + +
                2214  // nothing for cpu
                +
                2215 }
                +
                2216 
                +
                2217 
                + +
                2219  auto type = float_data_type();
                +
                2220  printer->add_newline(2);
                +
                2221  printer->add_line("/** allocate and setup array for range variable */");
                +
                2222  printer->fmt_push_block("static inline {}* setup_range_variable(double* variable, int n)",
                +
                2223  type);
                +
                2224  printer->fmt_line("{0}* data = ({0}*) mem_alloc(n, sizeof({0}));", type);
                +
                2225  printer->push_block("for(size_t i = 0; i < n; i++)");
                +
                2226  printer->add_line("data[i] = variable[i];");
                +
                2227  printer->pop_block();
                +
                2228  printer->add_line("return data;");
                +
                2229  printer->pop_block();
                +
                2230 }
                +
                2231 
                +
                2232 
                +
                2233 /**
                +
                2234  * \details If floating point type like "float" is specified on command line then
                +
                2235  * we can't turn all variables to new type. This is because certain variables
                +
                2236  * are pointers to internal variables (e.g. ions). Hence, we check if given
                +
                2237  * variable can be safely converted to new type. If so, return new type.
                +
                2238  */
                + +
                2240  // clang-format off
                +
                2241  auto with = NmodlType::read_ion_var
                +
                2242  | NmodlType::write_ion_var
                +
                2243  | NmodlType::pointer_var
                +
                2244  | NmodlType::bbcore_pointer_var
                +
                2245  | NmodlType::extern_neuron_variable;
                +
                2246  // clang-format on
                +
                2247  bool need_default_type = symbol->has_any_property(with);
                +
                2248  if (need_default_type) {
                +
                2249  return default_float_data_type();
                +
                2250  }
                +
                2251  return float_data_type();
                +
                2252 }
                +
                2253 
                +
                2254 
                + +
                2256  if (range_variable_setup_required()) {
                +
                2257  print_setup_range_variable();
                +
                2258  }
                +
                2259 
                +
                2260  printer->add_newline();
                +
                2261  printer->add_line("// Allocate instance structure");
                +
                2262  printer->fmt_push_block("static void {}(NrnThread* nt, Memb_list* ml, int type)",
                + +
                2264  printer->add_line("assert(!ml->instance);");
                +
                2265  printer->add_line("assert(!ml->global_variables);");
                +
                2266  printer->add_line("assert(ml->global_variables_size == 0);");
                +
                2267  printer->fmt_line("auto* const inst = new {}{{}};", instance_struct());
                +
                2268  printer->fmt_line("assert(inst->{} == &{});",
                + +
                2270  global_struct_instance());
                +
                2271  printer->add_line("ml->instance = inst;");
                +
                2272  printer->fmt_line("ml->global_variables = inst->{};", naming::INST_GLOBAL_MEMBER);
                +
                2273  printer->fmt_line("ml->global_variables_size = sizeof({});", global_struct());
                +
                2274  printer->pop_block();
                +
                2275  printer->add_newline();
                +
                2276 
                +
                2277  auto const cast_inst_and_assert_validity = [&]() {
                +
                2278  printer->fmt_line("auto* const inst = static_cast<{}*>(ml->instance);", instance_struct());
                +
                2279  printer->add_line("assert(inst);");
                +
                2280  printer->fmt_line("assert(inst->{});", naming::INST_GLOBAL_MEMBER);
                +
                2281  printer->fmt_line("assert(inst->{} == &{});",
                + +
                2283  global_struct_instance());
                +
                2284  printer->fmt_line("assert(inst->{} == ml->global_variables);", naming::INST_GLOBAL_MEMBER);
                +
                2285  printer->fmt_line("assert(ml->global_variables_size == sizeof({}));", global_struct());
                +
                2286  };
                +
                2287 
                +
                2288  // Must come before print_instance_struct_copy_to_device and
                +
                2289  // print_instance_struct_delete_from_device
                +
                2290  print_instance_struct_transfer_routine_declarations();
                +
                2291 
                +
                2292  printer->add_line("// Deallocate the instance structure");
                +
                2293  printer->fmt_push_block("static void {}(NrnThread* nt, Memb_list* ml, int type)",
                + +
                2295  cast_inst_and_assert_validity();
                +
                2296  print_instance_struct_delete_from_device();
                +
                2297  printer->add_multi_line(R"CODE(
                +
                2298  delete inst;
                +
                2299  ml->instance = nullptr;
                +
                2300  ml->global_variables = nullptr;
                +
                2301  ml->global_variables_size = 0;
                +
                2302  )CODE");
                +
                2303  printer->pop_block();
                +
                2304  printer->add_newline();
                +
                2305 
                +
                2306 
                +
                2307  printer->add_line("/** initialize mechanism instance variables */");
                +
                2308  printer->push_block("static inline void setup_instance(NrnThread* nt, Memb_list* ml)");
                +
                2309  cast_inst_and_assert_validity();
                +
                2310 
                +
                2311  std::string stride;
                +
                2312  printer->add_line("int pnodecount = ml->_nodecount_padded;");
                +
                2313  stride = "*pnodecount";
                +
                2314 
                +
                2315  printer->add_line("Datum* indexes = ml->pdata;");
                +
                2316 
                +
                2317  auto const float_type = default_float_data_type();
                +
                2318 
                +
                2319  int id = 0;
                +
                2320  std::vector<std::string> ptr_members{naming::INST_GLOBAL_MEMBER};
                +
                2321  for (auto const& [var, type]: info.neuron_global_variables) {
                +
                2322  ptr_members.push_back(var->get_name());
                +
                2323  }
                +
                2324  ptr_members.reserve(ptr_members.size() + codegen_float_variables.size() +
                +
                2325  codegen_int_variables.size());
                +
                2326  for (auto& var: codegen_float_variables) {
                +
                2327  auto name = var->get_name();
                +
                2328  auto range_var_type = get_range_var_float_type(var);
                +
                2329  if (float_type == range_var_type) {
                +
                2330  auto const variable = fmt::format("ml->data+{}{}", id, stride);
                +
                2331  printer->fmt_line("inst->{} = {};", name, variable);
                +
                2332  } else {
                +
                2333  // TODO what MOD file exercises this?
                +
                2334  printer->fmt_line("inst->{} = setup_range_variable(ml->data+{}{}, pnodecount);",
                +
                2335  name,
                +
                2336  id,
                +
                2337  stride);
                +
                2338  }
                +
                2339  ptr_members.push_back(std::move(name));
                +
                2340  id += var->get_length();
                2341  }
                -
                2342  ptr_members.reserve(ptr_members.size() + codegen_float_variables.size() +
                -
                2343  codegen_int_variables.size());
                -
                2344  for (auto& var: codegen_float_variables) {
                -
                2345  auto name = var->get_name();
                -
                2346  auto range_var_type = get_range_var_float_type(var);
                -
                2347  if (float_type == range_var_type) {
                -
                2348  auto const variable = fmt::format("ml->data+{}{}", id, stride);
                -
                2349  printer->fmt_line("inst->{} = {};", name, variable);
                -
                2350  } else {
                -
                2351  // TODO what MOD file exercises this?
                -
                2352  printer->fmt_line("inst->{} = setup_range_variable(ml->data+{}{}, pnodecount);",
                -
                2353  name,
                -
                2354  id,
                -
                2355  stride);
                -
                2356  }
                -
                2357  ptr_members.push_back(std::move(name));
                -
                2358  id += var->get_length();
                -
                2359  }
                +
                2342 
                +
                2343  for (auto& var: codegen_int_variables) {
                +
                2344  auto name = var.symbol->get_name();
                +
                2345  auto const variable = [&var]() {
                +
                2346  if (var.is_index || var.is_integer) {
                +
                2347  return "ml->pdata";
                +
                2348  } else if (var.is_vdata) {
                +
                2349  return "nt->_vdata";
                +
                2350  } else {
                +
                2351  return "nt->_data";
                +
                2352  }
                +
                2353  }();
                +
                2354  printer->fmt_line("inst->{} = {};", name, variable);
                +
                2355  ptr_members.push_back(std::move(name));
                +
                2356  }
                +
                2357  print_instance_struct_copy_to_device();
                +
                2358  printer->pop_block(); // setup_instance
                +
                2359  printer->add_newline();
                2360 
                -
                2361  for (auto& var: codegen_int_variables) {
                -
                2362  auto name = var.symbol->get_name();
                -
                2363  auto const variable = [&var]() {
                -
                2364  if (var.is_index || var.is_integer) {
                -
                2365  return "ml->pdata";
                -
                2366  } else if (var.is_vdata) {
                -
                2367  return "nt->_vdata";
                -
                2368  } else {
                -
                2369  return "nt->_data";
                -
                2370  }
                -
                2371  }();
                -
                2372  printer->fmt_line("inst->{} = {};", name, variable);
                -
                2373  ptr_members.push_back(std::move(name));
                -
                2374  }
                -
                2375  print_instance_struct_copy_to_device();
                -
                2376  printer->pop_block(); // setup_instance
                -
                2377  printer->add_newline();
                -
                2378 
                -
                2379  print_instance_struct_transfer_routines(ptr_members);
                -
                2380 }
                -
                2381 
                -
                2382 
                - -
                2384  if (info.artificial_cell) {
                -
                2385  printer->add_line("double v = 0.0;");
                -
                2386  } else {
                -
                2387  printer->add_line("int node_id = node_index[id];");
                -
                2388  printer->add_line("double v = voltage[node_id];");
                -
                2389  print_v_unused();
                -
                2390  }
                -
                2391 
                -
                2392  if (ion_variable_struct_required()) {
                -
                2393  printer->add_line("IonCurVar ionvar;");
                -
                2394  }
                -
                2395 
                -
                2396  // read ion statements
                -
                2397  auto read_statements = ion_read_statements(BlockType::Initial);
                -
                2398  for (auto& statement: read_statements) {
                -
                2399  printer->add_line(statement);
                -
                2400  }
                -
                2401 
                -
                2402  // initialize state variables (excluding ion state)
                -
                2403  for (auto& var: info.state_vars) {
                -
                2404  auto name = var->get_name();
                -
                2405  if (!info.is_ionic_conc(name)) {
                -
                2406  auto lhs = get_variable_name(name);
                -
                2407  auto rhs = get_variable_name(name + "0");
                -
                2408  if (var->is_array()) {
                -
                2409  for (int i = 0; i < var->get_length(); ++i) {
                -
                2410  printer->fmt_line("{}[{}] = {};", lhs, i, rhs);
                -
                2411  }
                -
                2412  } else {
                -
                2413  printer->fmt_line("{} = {};", lhs, rhs);
                -
                2414  }
                -
                2415  }
                -
                2416  }
                -
                2417 
                -
                2418  // initial block
                -
                2419  if (node != nullptr) {
                -
                2420  const auto& block = node->get_statement_block();
                -
                2421  print_statement_block(*block, false, false);
                -
                2422  }
                -
                2423 
                -
                2424  // write ion statements
                -
                2425  auto write_statements = ion_write_statements(BlockType::Initial);
                -
                2426  for (auto& statement: write_statements) {
                -
                2427  auto text = process_shadow_update_statement(statement, BlockType::Initial);
                -
                2428  printer->add_line(text);
                +
                2361  print_instance_struct_transfer_routines(ptr_members);
                +
                2362 }
                +
                2363 
                +
                2364 
                + +
                2366  if (info.artificial_cell) {
                +
                2367  printer->add_line("double v = 0.0;");
                +
                2368  } else {
                +
                2369  printer->add_line("int node_id = node_index[id];");
                +
                2370  printer->add_line("double v = voltage[node_id];");
                +
                2371  print_v_unused();
                +
                2372  }
                +
                2373 
                +
                2374  if (ion_variable_struct_required()) {
                +
                2375  printer->add_line("IonCurVar ionvar;");
                +
                2376  }
                +
                2377 
                +
                2378  // read ion statements
                +
                2379  auto read_statements = ion_read_statements(BlockType::Initial);
                +
                2380  for (auto& statement: read_statements) {
                +
                2381  printer->add_line(statement);
                +
                2382  }
                +
                2383 
                +
                2384  // initialize state variables (excluding ion state)
                +
                2385  for (auto& var: info.state_vars) {
                +
                2386  auto name = var->get_name();
                +
                2387  if (!info.is_ionic_conc(name)) {
                +
                2388  auto lhs = get_variable_name(name);
                +
                2389  auto rhs = get_variable_name(name + "0");
                +
                2390  if (var->is_array()) {
                +
                2391  for (int i = 0; i < var->get_length(); ++i) {
                +
                2392  printer->fmt_line("{}[{}] = {};", lhs, i, rhs);
                +
                2393  }
                +
                2394  } else {
                +
                2395  printer->fmt_line("{} = {};", lhs, rhs);
                +
                2396  }
                +
                2397  }
                +
                2398  }
                +
                2399 
                +
                2400  // initial block
                +
                2401  if (node != nullptr) {
                +
                2402  const auto& block = node->get_statement_block();
                +
                2403  print_statement_block(*block, false, false);
                +
                2404  }
                +
                2405 
                +
                2406  // write ion statements
                +
                2407  auto write_statements = ion_write_statements(BlockType::Initial);
                +
                2408  for (auto& statement: write_statements) {
                +
                2409  auto text = process_shadow_update_statement(statement, BlockType::Initial);
                +
                2410  printer->add_line(text);
                +
                2411  }
                +
                2412 }
                +
                2413 
                +
                2414 
                + +
                2416  BlockType type,
                +
                2417  const std::string& function_name) {
                +
                2418  std::string method;
                +
                2419  if (function_name.empty()) {
                +
                2420  method = compute_method_name(type);
                +
                2421  } else {
                +
                2422  method = function_name;
                +
                2423  }
                +
                2424  auto args = "NrnThread* nt, Memb_list* ml, int type";
                +
                2425 
                +
                2426  // watch statement function doesn't have type argument
                +
                2427  if (type == BlockType::Watch) {
                +
                2428  args = "NrnThread* nt, Memb_list* ml";
                2429  }
                -
                2430 }
                -
                2431 
                -
                2432 
                - -
                2434  BlockType type,
                -
                2435  const std::string& function_name) {
                -
                2436  std::string method;
                -
                2437  if (function_name.empty()) {
                -
                2438  method = compute_method_name(type);
                -
                2439  } else {
                -
                2440  method = function_name;
                +
                2430 
                +
                2431  print_global_method_annotation();
                +
                2432  printer->fmt_push_block("void {}({})", method, args);
                +
                2433  if (type != BlockType::Destructor && type != BlockType::Constructor) {
                +
                2434  // We do not (currently) support DESTRUCTOR and CONSTRUCTOR blocks
                +
                2435  // running anything on the GPU.
                +
                2436  print_kernel_data_present_annotation_block_begin();
                +
                2437  } else {
                +
                2438  /// TODO: Remove this when the code generation is propery done
                +
                2439  /// Related to https://github.com/BlueBrain/nmodl/issues/692
                +
                2440  printer->add_line("#ifndef CORENEURON_BUILD");
                2441  }
                -
                2442  auto args = "NrnThread* nt, Memb_list* ml, int type";
                -
                2443 
                -
                2444  // watch statement function doesn't have type argument
                -
                2445  if (type == BlockType::Watch) {
                -
                2446  args = "NrnThread* nt, Memb_list* ml";
                -
                2447  }
                -
                2448 
                -
                2449  print_global_method_annotation();
                -
                2450  printer->fmt_push_block("void {}({})", method, args);
                -
                2451  if (type != BlockType::Destructor && type != BlockType::Constructor) {
                -
                2452  // We do not (currently) support DESTRUCTOR and CONSTRUCTOR blocks
                -
                2453  // running anything on the GPU.
                -
                2454  print_kernel_data_present_annotation_block_begin();
                -
                2455  } else {
                -
                2456  /// TODO: Remove this when the code generation is propery done
                -
                2457  /// Related to https://github.com/BlueBrain/nmodl/issues/692
                -
                2458  printer->add_line("#ifndef CORENEURON_BUILD");
                -
                2459  }
                -
                2460  printer->add_multi_line(R"CODE(
                -
                2461  int nodecount = ml->nodecount;
                -
                2462  int pnodecount = ml->_nodecount_padded;
                -
                2463  const int* node_index = ml->nodeindices;
                -
                2464  double* data = ml->data;
                -
                2465  const double* voltage = nt->_actual_v;
                -
                2466  )CODE");
                -
                2467 
                -
                2468  if (type == BlockType::Equation) {
                -
                2469  printer->add_line("double* vec_rhs = nt->_actual_rhs;");
                -
                2470  printer->add_line("double* vec_d = nt->_actual_d;");
                -
                2471  print_rhs_d_shadow_variables();
                -
                2472  }
                -
                2473  printer->add_line("Datum* indexes = ml->pdata;");
                -
                2474  printer->add_line("ThreadDatum* thread = ml->_thread;");
                -
                2475 
                -
                2476  if (type == BlockType::Initial) {
                -
                2477  printer->add_newline();
                -
                2478  printer->add_line("setup_instance(nt, ml);");
                -
                2479  }
                -
                2480  printer->fmt_line("auto* const inst = static_cast<{}*>(ml->instance);", instance_struct());
                -
                2481  printer->add_newline(1);
                -
                2482 }
                -
                2483 
                - -
                2485  printer->add_newline(2);
                -
                2486  printer->add_line("/** initialize channel */");
                -
                2487 
                -
                2488  print_global_function_common_code(BlockType::Initial);
                -
                2489  if (info.derivimplicit_used()) {
                -
                2490  printer->add_newline();
                -
                2491  int nequation = info.num_equations;
                -
                2492  int list_num = info.derivimplicit_list_num;
                -
                2493  // clang-format off
                -
                2494  printer->fmt_line("int& deriv_advance_flag = *deriv{}_advance(thread);", list_num);
                -
                2495  printer->add_line("deriv_advance_flag = 0;");
                -
                2496  print_deriv_advance_flag_transfer_to_device();
                -
                2497  printer->fmt_line("auto ns = newtonspace{}(thread);", list_num);
                -
                2498  printer->fmt_line("auto& th = thread[dith{}()];", list_num);
                -
                2499  printer->push_block("if (*ns == nullptr)");
                -
                2500  printer->fmt_line("int vec_size = 2*{}*pnodecount*sizeof(double);", nequation);
                -
                2501  printer->fmt_line("double* vec = makevector(vec_size);", nequation);
                -
                2502  printer->fmt_line("th.pval = vec;", list_num);
                -
                2503  printer->fmt_line("*ns = nrn_cons_newtonspace({}, pnodecount);", nequation);
                -
                2504  print_newtonspace_transfer_to_device();
                -
                2505  printer->pop_block();
                -
                2506  // clang-format on
                +
                2442  printer->add_multi_line(R"CODE(
                +
                2443  int nodecount = ml->nodecount;
                +
                2444  int pnodecount = ml->_nodecount_padded;
                +
                2445  const int* node_index = ml->nodeindices;
                +
                2446  double* data = ml->data;
                +
                2447  const double* voltage = nt->_actual_v;
                +
                2448  )CODE");
                +
                2449 
                +
                2450  if (type == BlockType::Equation) {
                +
                2451  printer->add_line("double* vec_rhs = nt->_actual_rhs;");
                +
                2452  printer->add_line("double* vec_d = nt->_actual_d;");
                +
                2453  print_rhs_d_shadow_variables();
                +
                2454  }
                +
                2455  printer->add_line("Datum* indexes = ml->pdata;");
                +
                2456  printer->add_line("ThreadDatum* thread = ml->_thread;");
                +
                2457 
                +
                2458  if (type == BlockType::Initial) {
                +
                2459  printer->add_newline();
                +
                2460  printer->add_line("setup_instance(nt, ml);");
                +
                2461  }
                +
                2462  printer->fmt_line("auto* const inst = static_cast<{}*>(ml->instance);", instance_struct());
                +
                2463  printer->add_newline(1);
                +
                2464 }
                +
                2465 
                + +
                2467  printer->add_newline(2);
                +
                2468  printer->add_line("/** initialize channel */");
                +
                2469 
                +
                2470  print_global_function_common_code(BlockType::Initial);
                +
                2471  if (info.derivimplicit_used()) {
                +
                2472  printer->add_newline();
                +
                2473  int nequation = info.num_equations;
                +
                2474  int list_num = info.derivimplicit_list_num;
                +
                2475  // clang-format off
                +
                2476  printer->fmt_line("int& deriv_advance_flag = *deriv{}_advance(thread);", list_num);
                +
                2477  printer->add_line("deriv_advance_flag = 0;");
                +
                2478  print_deriv_advance_flag_transfer_to_device();
                +
                2479  printer->fmt_line("auto ns = newtonspace{}(thread);", list_num);
                +
                2480  printer->fmt_line("auto& th = thread[dith{}()];", list_num);
                +
                2481  printer->push_block("if (*ns == nullptr)");
                +
                2482  printer->fmt_line("int vec_size = 2*{}*pnodecount*sizeof(double);", nequation);
                +
                2483  printer->fmt_line("double* vec = makevector(vec_size);", nequation);
                +
                2484  printer->fmt_line("th.pval = vec;", list_num);
                +
                2485  printer->fmt_line("*ns = nrn_cons_newtonspace({}, pnodecount);", nequation);
                +
                2486  print_newtonspace_transfer_to_device();
                +
                2487  printer->pop_block();
                +
                2488  // clang-format on
                +
                2489  }
                +
                2490 
                +
                2491  // update global variable as those might be updated via python/hoc API
                +
                2492  // NOTE: CoreNEURON has enough information to do this on its own, which
                +
                2493  // would be neater.
                +
                2494  print_global_variable_device_update_annotation();
                +
                2495 
                +
                2496  if (skip_init_check) {
                +
                2497  printer->push_block("if (_nrn_skip_initmodel == 0)");
                +
                2498  }
                +
                2499 
                +
                2500  if (!info.changed_dt.empty()) {
                +
                2501  printer->fmt_line("double _save_prev_dt = {};",
                +
                2502  get_variable_name(naming::NTHREAD_DT_VARIABLE));
                +
                2503  printer->fmt_line("{} = {};",
                +
                2504  get_variable_name(naming::NTHREAD_DT_VARIABLE),
                +
                2505  info.changed_dt);
                +
                2506  print_dt_update_to_device();
                2507  }
                2508 
                -
                2509  // update global variable as those might be updated via python/hoc API
                -
                2510  // NOTE: CoreNEURON has enough information to do this on its own, which
                -
                2511  // would be neater.
                -
                2512  print_global_variable_device_update_annotation();
                -
                2513 
                -
                2514  if (skip_init_check) {
                -
                2515  printer->push_block("if (_nrn_skip_initmodel == 0)");
                -
                2516  }
                -
                2517 
                -
                2518  if (!info.changed_dt.empty()) {
                -
                2519  printer->fmt_line("double _save_prev_dt = {};",
                -
                2520  get_variable_name(naming::NTHREAD_DT_VARIABLE));
                -
                2521  printer->fmt_line("{} = {};",
                -
                2522  get_variable_name(naming::NTHREAD_DT_VARIABLE),
                -
                2523  info.changed_dt);
                -
                2524  print_dt_update_to_device();
                -
                2525  }
                -
                2526 
                -
                2527  print_channel_iteration_block_parallel_hint(BlockType::Initial, info.initial_node);
                -
                2528  printer->push_block("for (int id = 0; id < nodecount; id++)");
                -
                2529 
                -
                2530  if (info.net_receive_node != nullptr) {
                -
                2531  printer->fmt_line("{} = -1e20;", get_variable_name("tsave"));
                -
                2532  }
                -
                2533 
                -
                2534  print_initial_block(info.initial_node);
                -
                2535  printer->pop_block();
                -
                2536 
                -
                2537  if (!info.changed_dt.empty()) {
                -
                2538  printer->fmt_line("{} = _save_prev_dt;", get_variable_name(naming::NTHREAD_DT_VARIABLE));
                -
                2539  print_dt_update_to_device();
                -
                2540  }
                -
                2541 
                -
                2542  printer->pop_block();
                -
                2543 
                -
                2544  if (info.derivimplicit_used()) {
                -
                2545  printer->add_line("deriv_advance_flag = 1;");
                -
                2546  print_deriv_advance_flag_transfer_to_device();
                -
                2547  }
                -
                2548 
                -
                2549  if (info.net_send_used && !info.artificial_cell) {
                -
                2550  print_send_event_move();
                -
                2551  }
                -
                2552 
                -
                2553  print_kernel_data_present_annotation_block_end();
                -
                2554  if (skip_init_check) {
                -
                2555  printer->pop_block();
                -
                2556  }
                -
                2557 }
                -
                2558 
                - -
                2560  size_t block_id) {
                -
                2561  std::string ba_type;
                -
                2562  std::shared_ptr<ast::BABlock> ba_block;
                +
                2509  print_channel_iteration_block_parallel_hint(BlockType::Initial, info.initial_node);
                +
                2510  printer->push_block("for (int id = 0; id < nodecount; id++)");
                +
                2511 
                +
                2512  if (info.net_receive_node != nullptr) {
                +
                2513  printer->fmt_line("{} = -1e20;", get_variable_name("tsave"));
                +
                2514  }
                +
                2515 
                +
                2516  print_initial_block(info.initial_node);
                +
                2517  printer->pop_block();
                +
                2518 
                +
                2519  if (!info.changed_dt.empty()) {
                +
                2520  printer->fmt_line("{} = _save_prev_dt;", get_variable_name(naming::NTHREAD_DT_VARIABLE));
                +
                2521  print_dt_update_to_device();
                +
                2522  }
                +
                2523 
                +
                2524  printer->pop_block();
                +
                2525 
                +
                2526  if (info.derivimplicit_used()) {
                +
                2527  printer->add_line("deriv_advance_flag = 1;");
                +
                2528  print_deriv_advance_flag_transfer_to_device();
                +
                2529  }
                +
                2530 
                +
                2531  if (info.net_send_used && !info.artificial_cell) {
                +
                2532  print_send_event_move();
                +
                2533  }
                +
                2534 
                +
                2535  print_kernel_data_present_annotation_block_end();
                +
                2536  if (skip_init_check) {
                +
                2537  printer->pop_block();
                +
                2538  }
                +
                2539 }
                +
                2540 
                + +
                2542  size_t block_id) {
                +
                2543  std::string ba_type;
                +
                2544  std::shared_ptr<ast::BABlock> ba_block;
                +
                2545 
                +
                2546  if (node->is_before_block()) {
                +
                2547  ba_block = dynamic_cast<const ast::BeforeBlock*>(node)->get_bablock();
                +
                2548  ba_type = "BEFORE";
                +
                2549  } else {
                +
                2550  ba_block = dynamic_cast<const ast::AfterBlock*>(node)->get_bablock();
                +
                2551  ba_type = "AFTER";
                +
                2552  }
                +
                2553 
                +
                2554  std::string ba_block_type = ba_block->get_type()->eval();
                +
                2555 
                +
                2556  /// name of the before/after function
                +
                2557  std::string function_name = method_name(fmt::format("nrn_before_after_{}", block_id));
                +
                2558 
                +
                2559  /// print common function code like init/state/current
                +
                2560  printer->add_newline(2);
                +
                2561  printer->fmt_line("/** {} of block type {} # {} */", ba_type, ba_block_type, block_id);
                +
                2562  print_global_function_common_code(BlockType::BeforeAfter, function_name);
                2563 
                -
                2564  if (node->is_before_block()) {
                -
                2565  ba_block = dynamic_cast<const ast::BeforeBlock*>(node)->get_bablock();
                -
                2566  ba_type = "BEFORE";
                -
                2567  } else {
                -
                2568  ba_block = dynamic_cast<const ast::AfterBlock*>(node)->get_bablock();
                -
                2569  ba_type = "AFTER";
                -
                2570  }
                -
                2571 
                -
                2572  std::string ba_block_type = ba_block->get_type()->eval();
                -
                2573 
                -
                2574  /// name of the before/after function
                -
                2575  std::string function_name = method_name(fmt::format("nrn_before_after_{}", block_id));
                +
                2564  print_channel_iteration_block_parallel_hint(BlockType::BeforeAfter, node);
                +
                2565  printer->push_block("for (int id = 0; id < nodecount; id++)");
                +
                2566 
                +
                2567  printer->add_line("int node_id = node_index[id];");
                +
                2568  printer->add_line("double v = voltage[node_id];");
                +
                2569  print_v_unused();
                +
                2570 
                +
                2571  // read ion statements
                +
                2572  const auto& read_statements = ion_read_statements(BlockType::Equation);
                +
                2573  for (auto& statement: read_statements) {
                +
                2574  printer->add_line(statement);
                +
                2575  }
                2576 
                -
                2577  /// print common function code like init/state/current
                -
                2578  printer->add_newline(2);
                -
                2579  printer->fmt_line("/** {} of block type {} # {} */", ba_type, ba_block_type, block_id);
                -
                2580  print_global_function_common_code(BlockType::BeforeAfter, function_name);
                +
                2577  /// print main body
                +
                2578  printer->add_indent();
                +
                2579  print_statement_block(*ba_block->get_statement_block());
                +
                2580  printer->add_newline();
                2581 
                -
                2582  print_channel_iteration_block_parallel_hint(BlockType::BeforeAfter, node);
                -
                2583  printer->push_block("for (int id = 0; id < nodecount; id++)");
                -
                2584 
                -
                2585  printer->add_line("int node_id = node_index[id];");
                -
                2586  printer->add_line("double v = voltage[node_id];");
                -
                2587  print_v_unused();
                -
                2588 
                -
                2589  // read ion statements
                -
                2590  const auto& read_statements = ion_read_statements(BlockType::Equation);
                -
                2591  for (auto& statement: read_statements) {
                -
                2592  printer->add_line(statement);
                -
                2593  }
                -
                2594 
                -
                2595  /// print main body
                -
                2596  printer->add_indent();
                -
                2597  print_statement_block(*ba_block->get_statement_block());
                -
                2598  printer->add_newline();
                -
                2599 
                -
                2600  // write ion statements
                -
                2601  const auto& write_statements = ion_write_statements(BlockType::Equation);
                -
                2602  for (auto& statement: write_statements) {
                -
                2603  auto text = process_shadow_update_statement(statement, BlockType::Equation);
                -
                2604  printer->add_line(text);
                -
                2605  }
                -
                2606 
                -
                2607  /// loop end including data annotation block
                -
                2608  printer->pop_block();
                -
                2609  printer->pop_block();
                -
                2610  print_kernel_data_present_annotation_block_end();
                -
                2611 }
                -
                2612 
                - -
                2614  printer->add_newline(2);
                -
                2615  print_global_function_common_code(BlockType::Constructor);
                -
                2616  if (info.constructor_node != nullptr) {
                -
                2617  const auto& block = info.constructor_node->get_statement_block();
                -
                2618  print_statement_block(*block, false, false);
                -
                2619  }
                -
                2620  printer->add_line("#endif");
                -
                2621  printer->pop_block();
                -
                2622 }
                -
                2623 
                -
                2624 
                - -
                2626  printer->add_newline(2);
                -
                2627  print_global_function_common_code(BlockType::Destructor);
                -
                2628  if (info.destructor_node != nullptr) {
                -
                2629  const auto& block = info.destructor_node->get_statement_block();
                -
                2630  print_statement_block(*block, false, false);
                -
                2631  }
                -
                2632  printer->add_line("#endif");
                -
                2633  printer->pop_block();
                -
                2634 }
                -
                2635 
                -
                2636 
                - -
                2638  for (const auto& functor_name: info.functor_names) {
                -
                2639  printer->add_newline(2);
                -
                2640  print_functor_definition(*functor_name.first);
                -
                2641  }
                -
                2642 }
                -
                2643 
                +
                2582  // write ion statements
                +
                2583  const auto& write_statements = ion_write_statements(BlockType::Equation);
                +
                2584  for (auto& statement: write_statements) {
                +
                2585  auto text = process_shadow_update_statement(statement, BlockType::Equation);
                +
                2586  printer->add_line(text);
                +
                2587  }
                +
                2588 
                +
                2589  /// loop end including data annotation block
                +
                2590  printer->pop_block();
                +
                2591  printer->pop_block();
                +
                2592  print_kernel_data_present_annotation_block_end();
                +
                2593 }
                +
                2594 
                + +
                2596  printer->add_newline(2);
                +
                2597  print_global_function_common_code(BlockType::Constructor);
                +
                2598  if (info.constructor_node != nullptr) {
                +
                2599  const auto& block = info.constructor_node->get_statement_block();
                +
                2600  print_statement_block(*block, false, false);
                +
                2601  }
                +
                2602  printer->add_line("#endif");
                +
                2603  printer->pop_block();
                +
                2604 }
                +
                2605 
                +
                2606 
                + +
                2608  printer->add_newline(2);
                +
                2609  print_global_function_common_code(BlockType::Destructor);
                +
                2610  if (info.destructor_node != nullptr) {
                +
                2611  const auto& block = info.destructor_node->get_statement_block();
                +
                2612  print_statement_block(*block, false, false);
                +
                2613  }
                +
                2614  printer->add_line("#endif");
                +
                2615  printer->pop_block();
                +
                2616 }
                +
                2617 
                +
                2618 
                + +
                2620  for (const auto& functor_name: info.functor_names) {
                +
                2621  printer->add_newline(2);
                +
                2622  print_functor_definition(*functor_name.first);
                +
                2623  }
                +
                2624 }
                +
                2625 
                +
                2626 
                + +
                2628  printer->add_newline(2);
                +
                2629  auto method = method_name(naming::NRN_ALLOC_METHOD);
                +
                2630  printer->fmt_push_block("static void {}(double* data, Datum* indexes, int type)", method);
                +
                2631  printer->add_line("// do nothing");
                +
                2632  printer->pop_block();
                +
                2633 }
                +
                2634 
                +
                2635 /**
                +
                2636  * \todo Number of watch could be more than number of statements
                +
                2637  * according to grammar. Check if this is correctly handled in neuron
                +
                2638  * and coreneuron.
                +
                2639  */
                + +
                2641  if (info.watch_statements.empty()) {
                +
                2642  return;
                +
                2643  }
                2644 
                - -
                2646  printer->add_newline(2);
                -
                2647  auto method = method_name(naming::NRN_ALLOC_METHOD);
                -
                2648  printer->fmt_push_block("static void {}(double* data, Datum* indexes, int type)", method);
                -
                2649  printer->add_line("// do nothing");
                -
                2650  printer->pop_block();
                -
                2651 }
                -
                2652 
                -
                2653 /**
                -
                2654  * \todo Number of watch could be more than number of statements
                -
                2655  * according to grammar. Check if this is correctly handled in neuron
                -
                2656  * and coreneuron.
                -
                2657  */
                - -
                2659  if (info.watch_statements.empty()) {
                -
                2660  return;
                -
                2661  }
                -
                2662 
                -
                2663  printer->add_newline(2);
                -
                2664  auto inst = fmt::format("{}* inst", instance_struct());
                -
                2665 
                -
                2666  printer->fmt_push_block(
                -
                2667  "static void nrn_watch_activate({}, int id, int pnodecount, int watch_id, "
                -
                2668  "double v, bool &watch_remove)",
                -
                2669  inst);
                -
                2670 
                -
                2671  // initialize all variables only during first watch statement
                -
                2672  printer->push_block("if (watch_remove == false)");
                -
                2673  for (int i = 0; i < info.watch_count; i++) {
                -
                2674  auto name = get_variable_name(fmt::format("watch{}", i + 1));
                -
                2675  printer->fmt_line("{} = 0;", name);
                -
                2676  }
                -
                2677  printer->add_line("watch_remove = true;");
                -
                2678  printer->pop_block();
                -
                2679 
                -
                2680  /**
                -
                2681  * \todo Similar to neuron/coreneuron we are using
                -
                2682  * first watch and ignoring rest.
                -
                2683  */
                -
                2684  for (int i = 0; i < info.watch_statements.size(); i++) {
                -
                2685  auto statement = info.watch_statements[i];
                -
                2686  printer->fmt_push_block("if (watch_id == {})", i);
                -
                2687 
                -
                2688  auto varname = get_variable_name(fmt::format("watch{}", i + 1));
                -
                2689  printer->add_indent();
                -
                2690  printer->fmt_text("{} = 2 + (", varname);
                -
                2691  auto watch = statement->get_statements().front();
                -
                2692  watch->get_expression()->visit_children(*this);
                -
                2693  printer->add_text(");");
                -
                2694  printer->add_newline();
                -
                2695 
                -
                2696  printer->pop_block();
                -
                2697  }
                -
                2698  printer->pop_block();
                -
                2699 }
                -
                2700 
                -
                2701 
                -
                2702 /**
                -
                2703  * \todo Similar to print_watch_activate, we are using only
                -
                2704  * first watch. need to verify with neuron/coreneuron about rest.
                -
                2705  */
                - -
                2707  if (info.watch_statements.empty()) {
                -
                2708  return;
                +
                2645  printer->add_newline(2);
                +
                2646  auto inst = fmt::format("{}* inst", instance_struct());
                +
                2647 
                +
                2648  printer->fmt_push_block(
                +
                2649  "static void nrn_watch_activate({}, int id, int pnodecount, int watch_id, "
                +
                2650  "double v, bool &watch_remove)",
                +
                2651  inst);
                +
                2652 
                +
                2653  // initialize all variables only during first watch statement
                +
                2654  printer->push_block("if (watch_remove == false)");
                +
                2655  for (int i = 0; i < info.watch_count; i++) {
                +
                2656  auto name = get_variable_name(fmt::format("watch{}", i + 1));
                +
                2657  printer->fmt_line("{} = 0;", name);
                +
                2658  }
                +
                2659  printer->add_line("watch_remove = true;");
                +
                2660  printer->pop_block();
                +
                2661 
                +
                2662  /**
                +
                2663  * \todo Similar to neuron/coreneuron we are using
                +
                2664  * first watch and ignoring rest.
                +
                2665  */
                +
                2666  for (int i = 0; i < info.watch_statements.size(); i++) {
                +
                2667  auto statement = info.watch_statements[i];
                +
                2668  printer->fmt_push_block("if (watch_id == {})", i);
                +
                2669 
                +
                2670  auto varname = get_variable_name(fmt::format("watch{}", i + 1));
                +
                2671  printer->add_indent();
                +
                2672  printer->fmt_text("{} = 2 + (", varname);
                +
                2673  auto watch = statement->get_statements().front();
                +
                2674  watch->get_expression()->visit_children(*this);
                +
                2675  printer->add_text(");");
                +
                2676  printer->add_newline();
                +
                2677 
                +
                2678  printer->pop_block();
                +
                2679  }
                +
                2680  printer->pop_block();
                +
                2681 }
                +
                2682 
                +
                2683 
                +
                2684 /**
                +
                2685  * \todo Similar to print_watch_activate, we are using only
                +
                2686  * first watch. need to verify with neuron/coreneuron about rest.
                +
                2687  */
                + +
                2689  if (info.watch_statements.empty()) {
                +
                2690  return;
                +
                2691  }
                +
                2692 
                +
                2693  printer->add_newline(2);
                +
                2694  printer->add_line("/** routine to check watch activation */");
                +
                2695  print_global_function_common_code(BlockType::Watch);
                +
                2696 
                +
                2697  // WATCH statements appears in NET_RECEIVE block and while printing
                +
                2698  // net_receive function we already check if it contains any MUTEX/PROTECT
                +
                2699  // constructs. As WATCH is not a top level block but list of statements,
                +
                2700  // we don't need to have ivdep pragma related check
                +
                2701  print_channel_iteration_block_parallel_hint(BlockType::Watch, nullptr);
                +
                2702 
                +
                2703  printer->push_block("for (int id = 0; id < nodecount; id++)");
                +
                2704 
                +
                2705  if (info.is_voltage_used_by_watch_statements()) {
                +
                2706  printer->add_line("int node_id = node_index[id];");
                +
                2707  printer->add_line("double v = voltage[node_id];");
                +
                2708  print_v_unused();
                2709  }
                2710 
                -
                2711  printer->add_newline(2);
                -
                2712  printer->add_line("/** routine to check watch activation */");
                -
                2713  print_global_function_common_code(BlockType::Watch);
                -
                2714 
                -
                2715  // WATCH statements appears in NET_RECEIVE block and while printing
                -
                2716  // net_receive function we already check if it contains any MUTEX/PROTECT
                -
                2717  // constructs. As WATCH is not a top level block but list of statements,
                -
                2718  // we don't need to have ivdep pragma related check
                -
                2719  print_channel_iteration_block_parallel_hint(BlockType::Watch, nullptr);
                -
                2720 
                -
                2721  printer->push_block("for (int id = 0; id < nodecount; id++)");
                -
                2722 
                -
                2723  if (info.is_voltage_used_by_watch_statements()) {
                -
                2724  printer->add_line("int node_id = node_index[id];");
                -
                2725  printer->add_line("double v = voltage[node_id];");
                -
                2726  print_v_unused();
                -
                2727  }
                -
                2728 
                -
                2729  // flat to make sure only one WATCH statement can be triggered at a time
                -
                2730  printer->add_line("bool watch_untriggered = true;");
                -
                2731 
                -
                2732  for (int i = 0; i < info.watch_statements.size(); i++) {
                -
                2733  auto statement = info.watch_statements[i];
                -
                2734  const auto& watch = statement->get_statements().front();
                -
                2735  const auto& varname = get_variable_name(fmt::format("watch{}", i + 1));
                -
                2736 
                -
                2737  // start block 1
                -
                2738  printer->fmt_push_block("if ({}&2 && watch_untriggered)", varname);
                -
                2739 
                -
                2740  // start block 2
                -
                2741  printer->add_indent();
                -
                2742  printer->add_text("if (");
                -
                2743  watch->get_expression()->accept(*this);
                -
                2744  printer->add_text(") {");
                -
                2745  printer->add_newline();
                -
                2746  printer->increase_indent();
                -
                2747 
                -
                2748  // start block 3
                -
                2749  printer->fmt_push_block("if (({}&1) == 0)", varname);
                -
                2750 
                -
                2751  printer->add_line("watch_untriggered = false;");
                -
                2752 
                -
                2753  const auto& tqitem = get_variable_name("tqitem");
                -
                2754  const auto& point_process = get_variable_name("point_process");
                -
                2755  printer->add_indent();
                -
                2756  printer->add_text("net_send_buffering(");
                -
                2757  const auto& t = get_variable_name("t");
                -
                2758  printer->fmt_text("nt, ml->_net_send_buffer, 0, {}, -1, {}, {}+0.0, ",
                -
                2759  tqitem,
                -
                2760  point_process,
                -
                2761  t);
                -
                2762  watch->get_value()->accept(*this);
                -
                2763  printer->add_text(");");
                -
                2764  printer->add_newline();
                -
                2765  printer->pop_block();
                -
                2766 
                -
                2767  printer->add_line(varname, " = 3;");
                -
                2768  // end block 3
                +
                2711  // flat to make sure only one WATCH statement can be triggered at a time
                +
                2712  printer->add_line("bool watch_untriggered = true;");
                +
                2713 
                +
                2714  for (int i = 0; i < info.watch_statements.size(); i++) {
                +
                2715  auto statement = info.watch_statements[i];
                +
                2716  const auto& watch = statement->get_statements().front();
                +
                2717  const auto& varname = get_variable_name(fmt::format("watch{}", i + 1));
                +
                2718 
                +
                2719  // start block 1
                +
                2720  printer->fmt_push_block("if ({}&2 && watch_untriggered)", varname);
                +
                2721 
                +
                2722  // start block 2
                +
                2723  printer->add_indent();
                +
                2724  printer->add_text("if (");
                +
                2725  watch->get_expression()->accept(*this);
                +
                2726  printer->add_text(") {");
                +
                2727  printer->add_newline();
                +
                2728  printer->increase_indent();
                +
                2729 
                +
                2730  // start block 3
                +
                2731  printer->fmt_push_block("if (({}&1) == 0)", varname);
                +
                2732 
                +
                2733  printer->add_line("watch_untriggered = false;");
                +
                2734 
                +
                2735  const auto& tqitem = get_variable_name("tqitem");
                +
                2736  const auto& point_process = get_variable_name("point_process");
                +
                2737  printer->add_indent();
                +
                2738  printer->add_text("net_send_buffering(");
                +
                2739  const auto& t = get_variable_name("t");
                +
                2740  printer->fmt_text("nt, ml->_net_send_buffer, 0, {}, -1, {}, {}+0.0, ",
                +
                2741  tqitem,
                +
                2742  point_process,
                +
                2743  t);
                +
                2744  watch->get_value()->accept(*this);
                +
                2745  printer->add_text(");");
                +
                2746  printer->add_newline();
                +
                2747  printer->pop_block();
                +
                2748 
                +
                2749  printer->add_line(varname, " = 3;");
                +
                2750  // end block 3
                +
                2751 
                +
                2752  // start block 3
                +
                2753  printer->decrease_indent();
                +
                2754  printer->push_block("} else");
                +
                2755  printer->add_line(varname, " = 2;");
                +
                2756  printer->pop_block();
                +
                2757  // end block 3
                +
                2758 
                +
                2759  printer->pop_block();
                +
                2760  // end block 1
                +
                2761  }
                +
                2762 
                +
                2763  printer->pop_block();
                +
                2764  print_send_event_move();
                +
                2765  print_kernel_data_present_annotation_block_end();
                +
                2766  printer->pop_block();
                +
                2767 }
                +
                2768 
                2769 
                -
                2770  // start block 3
                -
                2771  printer->decrease_indent();
                -
                2772  printer->push_block("} else");
                -
                2773  printer->add_line(varname, " = 2;");
                -
                2774  printer->pop_block();
                -
                2775  // end block 3
                -
                2776 
                -
                2777  printer->pop_block();
                -
                2778  // end block 1
                -
                2779  }
                -
                2780 
                -
                2781  printer->pop_block();
                -
                2782  print_send_event_move();
                -
                2783  print_kernel_data_present_annotation_block_end();
                -
                2784  printer->pop_block();
                -
                2785 }
                -
                2786 
                -
                2787 
                - -
                2789  bool need_mech_inst) {
                -
                2790  printer->add_multi_line(R"CODE(
                -
                2791  int tid = pnt->_tid;
                -
                2792  int id = pnt->_i_instance;
                -
                2793  double v = 0;
                -
                2794  )CODE");
                -
                2795 
                -
                2796  if (info.artificial_cell || node.is_initial_block()) {
                -
                2797  printer->add_line("NrnThread* nt = nrn_threads + tid;");
                -
                2798  printer->add_line("Memb_list* ml = nt->_ml_list[pnt->_type];");
                -
                2799  }
                -
                2800  if (node.is_initial_block()) {
                -
                2801  print_kernel_data_present_annotation_block_begin();
                -
                2802  }
                -
                2803 
                -
                2804  printer->add_multi_line(R"CODE(
                -
                2805  int nodecount = ml->nodecount;
                -
                2806  int pnodecount = ml->_nodecount_padded;
                -
                2807  double* data = ml->data;
                -
                2808  double* weights = nt->weights;
                -
                2809  Datum* indexes = ml->pdata;
                -
                2810  ThreadDatum* thread = ml->_thread;
                -
                2811  )CODE");
                -
                2812  if (need_mech_inst) {
                -
                2813  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                -
                2814  }
                -
                2815 
                -
                2816  if (node.is_initial_block()) {
                -
                2817  print_net_init_acc_serial_annotation_block_begin();
                -
                2818  }
                + +
                2771  bool need_mech_inst) {
                +
                2772  printer->add_multi_line(R"CODE(
                +
                2773  int tid = pnt->_tid;
                +
                2774  int id = pnt->_i_instance;
                +
                2775  double v = 0;
                +
                2776  )CODE");
                +
                2777 
                +
                2778  if (info.artificial_cell || node.is_initial_block()) {
                +
                2779  printer->add_line("NrnThread* nt = nrn_threads + tid;");
                +
                2780  printer->add_line("Memb_list* ml = nt->_ml_list[pnt->_type];");
                +
                2781  }
                +
                2782  if (node.is_initial_block()) {
                +
                2783  print_kernel_data_present_annotation_block_begin();
                +
                2784  }
                +
                2785 
                +
                2786  printer->add_multi_line(R"CODE(
                +
                2787  int nodecount = ml->nodecount;
                +
                2788  int pnodecount = ml->_nodecount_padded;
                +
                2789  double* data = ml->data;
                +
                2790  double* weights = nt->weights;
                +
                2791  Datum* indexes = ml->pdata;
                +
                2792  ThreadDatum* thread = ml->_thread;
                +
                2793  )CODE");
                +
                2794  if (need_mech_inst) {
                +
                2795  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                +
                2796  }
                +
                2797 
                +
                2798  if (node.is_initial_block()) {
                +
                2799  print_net_init_acc_serial_annotation_block_begin();
                +
                2800  }
                +
                2801 
                +
                2802  // rename variables but need to see if they are actually used
                +
                2803  auto parameters = info.net_receive_node->get_parameters();
                +
                2804  if (!parameters.empty()) {
                +
                2805  int i = 0;
                +
                2806  printer->add_newline();
                +
                2807  for (auto& parameter: parameters) {
                +
                2808  auto name = parameter->get_node_name();
                +
                2809  bool var_used = VarUsageVisitor().variable_used(node, "(*" + name + ")");
                +
                2810  if (var_used) {
                +
                2811  printer->fmt_line("double* {} = weights + weight_index + {};", name, i);
                +
                2812  RenameVisitor vr(name, "*" + name);
                +
                2813  node.visit_children(vr);
                +
                2814  }
                +
                2815  i++;
                +
                2816  }
                +
                2817  }
                +
                2818 }
                2819 
                -
                2820  // rename variables but need to see if they are actually used
                -
                2821  auto parameters = info.net_receive_node->get_parameters();
                -
                2822  if (!parameters.empty()) {
                -
                2823  int i = 0;
                -
                2824  printer->add_newline();
                -
                2825  for (auto& parameter: parameters) {
                -
                2826  auto name = parameter->get_node_name();
                -
                2827  bool var_used = VarUsageVisitor().variable_used(node, "(*" + name + ")");
                -
                2828  if (var_used) {
                -
                2829  printer->fmt_line("double* {} = weights + weight_index + {};", name, i);
                -
                2830  RenameVisitor vr(name, "*" + name);
                -
                2831  node.visit_children(vr);
                -
                2832  }
                -
                2833  i++;
                +
                2820 
                + +
                2822  auto const& arguments = node.get_arguments();
                +
                2823  const auto& tqitem = get_variable_name("tqitem");
                +
                2824  std::string weight_index = "weight_index";
                +
                2825  std::string pnt = "pnt";
                +
                2826 
                +
                2827  // for functions not generated from NET_RECEIVE blocks (i.e. top level INITIAL block)
                +
                2828  // the weight_index argument is 0.
                +
                2829  if (!printing_net_receive && !printing_net_init) {
                +
                2830  weight_index = "0";
                +
                2831  auto var = get_variable_name("point_process");
                +
                2832  if (info.artificial_cell) {
                +
                2833  pnt = "(Point_process*)" + var;
                2834  }
                2835  }
                -
                2836 }
                -
                2837 
                -
                2838 
                - -
                2840  auto const& arguments = node.get_arguments();
                -
                2841  const auto& tqitem = get_variable_name("tqitem");
                -
                2842  std::string weight_index = "weight_index";
                -
                2843  std::string pnt = "pnt";
                -
                2844 
                -
                2845  // for functions not generated from NET_RECEIVE blocks (i.e. top level INITIAL block)
                -
                2846  // the weight_index argument is 0.
                -
                2847  if (!printing_net_receive && !printing_net_init) {
                -
                2848  weight_index = "0";
                -
                2849  auto var = get_variable_name("point_process");
                -
                2850  if (info.artificial_cell) {
                -
                2851  pnt = "(Point_process*)" + var;
                -
                2852  }
                -
                2853  }
                -
                2854 
                -
                2855  // artificial cells don't use spike buffering
                -
                2856  // clang-format off
                -
                2857  if (info.artificial_cell) {
                -
                2858  printer->fmt_text("artcell_net_send(&{}, {}, {}, nt->_t+", tqitem, weight_index, pnt);
                -
                2859  } else {
                -
                2860  const auto& point_process = get_variable_name("point_process");
                -
                2861  const auto& t = get_variable_name("t");
                -
                2862  printer->add_text("net_send_buffering(");
                -
                2863  printer->fmt_text("nt, ml->_net_send_buffer, 0, {}, {}, {}, {}+", tqitem, weight_index, point_process, t);
                -
                2864  }
                -
                2865  // clang-format off
                -
                2866  print_vector_elements(arguments, ", ");
                -
                2867  printer->add_text(')');
                -
                2868 }
                -
                2869 
                -
                2870 
                - -
                2872  if (!printing_net_receive && !printing_net_init) {
                -
                2873  throw std::runtime_error("Error : net_move only allowed in NET_RECEIVE block");
                -
                2874  }
                -
                2875 
                -
                2876  auto const& arguments = node.get_arguments();
                -
                2877  const auto& tqitem = get_variable_name("tqitem");
                -
                2878  std::string weight_index = "-1";
                -
                2879  std::string pnt = "pnt";
                -
                2880 
                -
                2881  // artificial cells don't use spike buffering
                -
                2882  // clang-format off
                -
                2883  if (info.artificial_cell) {
                -
                2884  printer->fmt_text("artcell_net_move(&{}, {}, ", tqitem, pnt);
                -
                2885  print_vector_elements(arguments, ", ");
                -
                2886  printer->add_text(")");
                -
                2887  } else {
                -
                2888  const auto& point_process = get_variable_name("point_process");
                -
                2889  printer->add_text("net_send_buffering(");
                -
                2890  printer->fmt_text("nt, ml->_net_send_buffer, 2, {}, {}, {}, ", tqitem, weight_index, point_process);
                -
                2891  print_vector_elements(arguments, ", ");
                -
                2892  printer->add_text(", 0.0");
                -
                2893  printer->add_text(")");
                -
                2894  }
                -
                2895 }
                -
                2896 
                -
                2897 
                - -
                2899  const auto& arguments = node.get_arguments();
                -
                2900  if (info.artificial_cell) {
                -
                2901  printer->add_text("net_event(pnt, ");
                -
                2902  print_vector_elements(arguments, ", ");
                -
                2903  } else {
                -
                2904  const auto& point_process = get_variable_name("point_process");
                -
                2905  printer->add_text("net_send_buffering(");
                -
                2906  printer->fmt_text("nt, ml->_net_send_buffer, 1, -1, -1, {}, ", point_process);
                -
                2907  print_vector_elements(arguments, ", ");
                -
                2908  printer->add_text(", 0.0");
                -
                2909  }
                -
                2910  printer->add_text(")");
                -
                2911 }
                -
                2912 
                -
                2913 /**
                -
                2914  * Rename arguments to NET_RECEIVE block with corresponding pointer variable
                -
                2915  *
                -
                2916  * Arguments to NET_RECEIVE block are packed and passed via weight vector. These
                -
                2917  * variables need to be replaced with corresponding pointer variable. For example,
                -
                2918  * if mod file is like
                -
                2919  *
                -
                2920  * \code{.mod}
                -
                2921  * NET_RECEIVE (weight, R){
                -
                2922  * INITIAL {
                -
                2923  * R=1
                -
                2924  * }
                -
                2925  * }
                -
                2926  * \endcode
                -
                2927  *
                -
                2928  * then generated code for initial block should be:
                -
                2929  *
                -
                2930  * \code{.cpp}
                -
                2931  * double* R = weights + weight_index + 0;
                -
                2932  * (*R) = 1.0;
                -
                2933  * \endcode
                -
                2934  *
                -
                2935  * So, the `R` in AST needs to be renamed with `(*R)`.
                -
                2936  */
                -
                2937 static void rename_net_receive_arguments(const ast::NetReceiveBlock& net_receive_node, const ast::Node& node) {
                -
                2938  const auto& parameters = net_receive_node.get_parameters();
                -
                2939  for (auto& parameter: parameters) {
                -
                2940  const auto& name = parameter->get_node_name();
                -
                2941  auto var_used = VarUsageVisitor().variable_used(node, name);
                -
                2942  if (var_used) {
                -
                2943  RenameVisitor vr(name, "(*" + name + ")");
                -
                2944  node.get_statement_block()->visit_children(vr);
                -
                2945  }
                -
                2946  }
                -
                2947 }
                -
                2948 
                -
                2949 
                - -
                2951  const auto node = info.net_receive_initial_node;
                -
                2952  if (node == nullptr) {
                -
                2953  return;
                -
                2954  }
                -
                2955 
                -
                2956  // rename net_receive arguments used in the initial block of net_receive
                -
                2957  rename_net_receive_arguments(*info.net_receive_node, *node);
                -
                2958 
                -
                2959  printing_net_init = true;
                -
                2960  auto args = "Point_process* pnt, int weight_index, double flag";
                -
                2961  printer->add_newline(2);
                -
                2962  printer->add_line("/** initialize block for net receive */");
                -
                2963  printer->fmt_push_block("static void net_init({})", args);
                -
                2964  auto block = node->get_statement_block().get();
                -
                2965  if (block->get_statements().empty()) {
                -
                2966  printer->add_line("// do nothing");
                -
                2967  } else {
                -
                2968  print_net_receive_common_code(*node);
                -
                2969  print_statement_block(*block, false, false);
                -
                2970  if (node->is_initial_block()) {
                -
                2971  print_net_init_acc_serial_annotation_block_end();
                -
                2972  print_kernel_data_present_annotation_block_end();
                -
                2973  printer->add_line("auto& nsb = ml->_net_send_buffer;");
                -
                2974  print_net_send_buf_update_to_host();
                -
                2975  }
                -
                2976  }
                -
                2977  printer->pop_block();
                -
                2978  printing_net_init = false;
                -
                2979 }
                -
                2980 
                -
                2981 
                - -
                2983  printer->add_newline();
                -
                2984  printer->add_line("NetSendBuffer_t* nsb = ml->_net_send_buffer;");
                -
                2985  print_net_send_buf_update_to_host();
                -
                2986  printer->push_block("for (int i=0; i < nsb->_cnt; i++)");
                -
                2987  printer->add_multi_line(R"CODE(
                -
                2988  int type = nsb->_sendtype[i];
                -
                2989  int tid = nt->id;
                -
                2990  double t = nsb->_nsb_t[i];
                -
                2991  double flag = nsb->_nsb_flag[i];
                -
                2992  int vdata_index = nsb->_vdata_index[i];
                -
                2993  int weight_index = nsb->_weight_index[i];
                -
                2994  int point_index = nsb->_pnt_index[i];
                -
                2995  net_sem_from_gpu(type, vdata_index, weight_index, tid, point_index, t, flag);
                -
                2996  )CODE");
                -
                2997  printer->pop_block();
                -
                2998  printer->add_line("nsb->_cnt = 0;");
                -
                2999  print_net_send_buf_count_update_to_device();
                -
                3000 }
                -
                3001 
                -
                3002 
                - -
                3004  return fmt::format("void {}(NrnThread* nt)", method_name("net_buf_receive"));
                -
                3005 }
                -
                3006 
                -
                3007 
                - -
                3009  printer->add_line("Memb_list* ml = get_memb_list(nt);");
                -
                3010  printer->push_block("if (!ml)");
                -
                3011  printer->add_line("return;");
                -
                3012  printer->pop_block();
                -
                3013  printer->add_newline();
                -
                3014 }
                -
                3015 
                -
                3016 
                - -
                3018  printer->add_line("int count = nrb->_displ_cnt;");
                -
                3019  print_channel_iteration_block_parallel_hint(BlockType::NetReceive, info.net_receive_node);
                -
                3020  printer->push_block("for (int i = 0; i < count; i++)");
                -
                3021 }
                -
                3022 
                +
                2836 
                +
                2837  // artificial cells don't use spike buffering
                +
                2838  // clang-format off
                +
                2839  if (info.artificial_cell) {
                +
                2840  printer->fmt_text("artcell_net_send(&{}, {}, {}, nt->_t+", tqitem, weight_index, pnt);
                +
                2841  } else {
                +
                2842  const auto& point_process = get_variable_name("point_process");
                +
                2843  const auto& t = get_variable_name("t");
                +
                2844  printer->add_text("net_send_buffering(");
                +
                2845  printer->fmt_text("nt, ml->_net_send_buffer, 0, {}, {}, {}, {}+", tqitem, weight_index, point_process, t);
                +
                2846  }
                +
                2847  // clang-format off
                +
                2848  print_vector_elements(arguments, ", ");
                +
                2849  printer->add_text(')');
                +
                2850 }
                +
                2851 
                +
                2852 
                + +
                2854  if (!printing_net_receive && !printing_net_init) {
                +
                2855  throw std::runtime_error("Error : net_move only allowed in NET_RECEIVE block");
                +
                2856  }
                +
                2857 
                +
                2858  auto const& arguments = node.get_arguments();
                +
                2859  const auto& tqitem = get_variable_name("tqitem");
                +
                2860  std::string weight_index = "-1";
                +
                2861  std::string pnt = "pnt";
                +
                2862 
                +
                2863  // artificial cells don't use spike buffering
                +
                2864  // clang-format off
                +
                2865  if (info.artificial_cell) {
                +
                2866  printer->fmt_text("artcell_net_move(&{}, {}, ", tqitem, pnt);
                +
                2867  print_vector_elements(arguments, ", ");
                +
                2868  printer->add_text(")");
                +
                2869  } else {
                +
                2870  const auto& point_process = get_variable_name("point_process");
                +
                2871  printer->add_text("net_send_buffering(");
                +
                2872  printer->fmt_text("nt, ml->_net_send_buffer, 2, {}, {}, {}, ", tqitem, weight_index, point_process);
                +
                2873  print_vector_elements(arguments, ", ");
                +
                2874  printer->add_text(", 0.0");
                +
                2875  printer->add_text(")");
                +
                2876  }
                +
                2877 }
                +
                2878 
                +
                2879 
                + +
                2881  const auto& arguments = node.get_arguments();
                +
                2882  if (info.artificial_cell) {
                +
                2883  printer->add_text("net_event(pnt, ");
                +
                2884  print_vector_elements(arguments, ", ");
                +
                2885  } else {
                +
                2886  const auto& point_process = get_variable_name("point_process");
                +
                2887  printer->add_text("net_send_buffering(");
                +
                2888  printer->fmt_text("nt, ml->_net_send_buffer, 1, -1, -1, {}, ", point_process);
                +
                2889  print_vector_elements(arguments, ", ");
                +
                2890  printer->add_text(", 0.0");
                +
                2891  }
                +
                2892  printer->add_text(")");
                +
                2893 }
                +
                2894 
                +
                2895 /**
                +
                2896  * Rename arguments to NET_RECEIVE block with corresponding pointer variable
                +
                2897  *
                +
                2898  * Arguments to NET_RECEIVE block are packed and passed via weight vector. These
                +
                2899  * variables need to be replaced with corresponding pointer variable. For example,
                +
                2900  * if mod file is like
                +
                2901  *
                +
                2902  * \code{.mod}
                +
                2903  * NET_RECEIVE (weight, R){
                +
                2904  * INITIAL {
                +
                2905  * R=1
                +
                2906  * }
                +
                2907  * }
                +
                2908  * \endcode
                +
                2909  *
                +
                2910  * then generated code for initial block should be:
                +
                2911  *
                +
                2912  * \code{.cpp}
                +
                2913  * double* R = weights + weight_index + 0;
                +
                2914  * (*R) = 1.0;
                +
                2915  * \endcode
                +
                2916  *
                +
                2917  * So, the `R` in AST needs to be renamed with `(*R)`.
                +
                2918  */
                +
                2919 static void rename_net_receive_arguments(const ast::NetReceiveBlock& net_receive_node, const ast::Node& node) {
                +
                2920  const auto& parameters = net_receive_node.get_parameters();
                +
                2921  for (auto& parameter: parameters) {
                +
                2922  const auto& name = parameter->get_node_name();
                +
                2923  auto var_used = VarUsageVisitor().variable_used(node, name);
                +
                2924  if (var_used) {
                +
                2925  RenameVisitor vr(name, "(*" + name + ")");
                +
                2926  node.get_statement_block()->visit_children(vr);
                +
                2927  }
                +
                2928  }
                +
                2929 }
                +
                2930 
                +
                2931 
                + +
                2933  const auto node = info.net_receive_initial_node;
                +
                2934  if (node == nullptr) {
                +
                2935  return;
                +
                2936  }
                +
                2937 
                +
                2938  // rename net_receive arguments used in the initial block of net_receive
                +
                2939  rename_net_receive_arguments(*info.net_receive_node, *node);
                +
                2940 
                +
                2941  printing_net_init = true;
                +
                2942  auto args = "Point_process* pnt, int weight_index, double flag";
                +
                2943  printer->add_newline(2);
                +
                2944  printer->add_line("/** initialize block for net receive */");
                +
                2945  printer->fmt_push_block("static void net_init({})", args);
                +
                2946  auto block = node->get_statement_block().get();
                +
                2947  if (block->get_statements().empty()) {
                +
                2948  printer->add_line("// do nothing");
                +
                2949  } else {
                +
                2950  print_net_receive_common_code(*node);
                +
                2951  print_statement_block(*block, false, false);
                +
                2952  if (node->is_initial_block()) {
                +
                2953  print_net_init_acc_serial_annotation_block_end();
                +
                2954  print_kernel_data_present_annotation_block_end();
                +
                2955  printer->add_line("auto& nsb = ml->_net_send_buffer;");
                +
                2956  print_net_send_buf_update_to_host();
                +
                2957  }
                +
                2958  }
                +
                2959  printer->pop_block();
                +
                2960  printing_net_init = false;
                +
                2961 }
                +
                2962 
                +
                2963 
                + +
                2965  printer->add_newline();
                +
                2966  printer->add_line("NetSendBuffer_t* nsb = ml->_net_send_buffer;");
                +
                2967  print_net_send_buf_update_to_host();
                +
                2968  printer->push_block("for (int i=0; i < nsb->_cnt; i++)");
                +
                2969  printer->add_multi_line(R"CODE(
                +
                2970  int type = nsb->_sendtype[i];
                +
                2971  int tid = nt->id;
                +
                2972  double t = nsb->_nsb_t[i];
                +
                2973  double flag = nsb->_nsb_flag[i];
                +
                2974  int vdata_index = nsb->_vdata_index[i];
                +
                2975  int weight_index = nsb->_weight_index[i];
                +
                2976  int point_index = nsb->_pnt_index[i];
                +
                2977  net_sem_from_gpu(type, vdata_index, weight_index, tid, point_index, t, flag);
                +
                2978  )CODE");
                +
                2979  printer->pop_block();
                +
                2980  printer->add_line("nsb->_cnt = 0;");
                +
                2981  print_net_send_buf_count_update_to_device();
                +
                2982 }
                +
                2983 
                +
                2984 
                + +
                2986  return fmt::format("void {}(NrnThread* nt)", method_name("net_buf_receive"));
                +
                2987 }
                +
                2988 
                +
                2989 
                + +
                2991  printer->add_line("Memb_list* ml = get_memb_list(nt);");
                +
                2992  printer->push_block("if (!ml)");
                +
                2993  printer->add_line("return;");
                +
                2994  printer->pop_block();
                +
                2995  printer->add_newline();
                +
                2996 }
                +
                2997 
                +
                2998 
                + +
                3000  printer->add_line("int count = nrb->_displ_cnt;");
                +
                3001  print_channel_iteration_block_parallel_hint(BlockType::NetReceive, info.net_receive_node);
                +
                3002  printer->push_block("for (int i = 0; i < count; i++)");
                +
                3003 }
                +
                3004 
                +
                3005 
                + +
                3007  printer->pop_block();
                +
                3008 }
                +
                3009 
                +
                3010 
                + +
                3012  if (!net_receive_required() || info.artificial_cell) {
                +
                3013  return;
                +
                3014  }
                +
                3015  printer->add_newline(2);
                +
                3016  printer->push_block(net_receive_buffering_declaration());
                +
                3017 
                +
                3018  print_get_memb_list();
                +
                3019 
                +
                3020  const auto& net_receive = method_name("net_receive_kernel");
                +
                3021 
                +
                3022  print_kernel_data_present_annotation_block_begin();
                3023 
                - -
                3025  printer->pop_block();
                -
                3026 }
                -
                3027 
                -
                3028 
                - -
                3030  if (!net_receive_required() || info.artificial_cell) {
                -
                3031  return;
                -
                3032  }
                -
                3033  printer->add_newline(2);
                -
                3034  printer->push_block(net_receive_buffering_declaration());
                -
                3035 
                -
                3036  print_get_memb_list();
                -
                3037 
                -
                3038  const auto& net_receive = method_name("net_receive_kernel");
                -
                3039 
                -
                3040  print_kernel_data_present_annotation_block_begin();
                -
                3041 
                -
                3042  printer->add_line("NetReceiveBuffer_t* nrb = ml->_net_receive_buffer;");
                -
                3043  if (need_mech_inst) {
                -
                3044  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                -
                3045  }
                -
                3046  print_net_receive_loop_begin();
                -
                3047  printer->add_line("int start = nrb->_displ[i];");
                -
                3048  printer->add_line("int end = nrb->_displ[i+1];");
                -
                3049  printer->push_block("for (int j = start; j < end; j++)");
                -
                3050  printer->add_multi_line(R"CODE(
                -
                3051  int index = nrb->_nrb_index[j];
                -
                3052  int offset = nrb->_pnt_index[index];
                -
                3053  double t = nrb->_nrb_t[index];
                -
                3054  int weight_index = nrb->_weight_index[index];
                -
                3055  double flag = nrb->_nrb_flag[index];
                -
                3056  Point_process* point_process = nt->pntprocs + offset;
                -
                3057  )CODE");
                -
                3058  printer->add_line(net_receive, "(t, point_process, inst, nt, ml, weight_index, flag);");
                -
                3059  printer->pop_block();
                -
                3060  print_net_receive_loop_end();
                +
                3024  printer->add_line("NetReceiveBuffer_t* nrb = ml->_net_receive_buffer;");
                +
                3025  if (need_mech_inst) {
                +
                3026  printer->fmt_line("auto* const inst = static_cast<{0}*>(ml->instance);", instance_struct());
                +
                3027  }
                +
                3028  print_net_receive_loop_begin();
                +
                3029  printer->add_line("int start = nrb->_displ[i];");
                +
                3030  printer->add_line("int end = nrb->_displ[i+1];");
                +
                3031  printer->push_block("for (int j = start; j < end; j++)");
                +
                3032  printer->add_multi_line(R"CODE(
                +
                3033  int index = nrb->_nrb_index[j];
                +
                3034  int offset = nrb->_pnt_index[index];
                +
                3035  double t = nrb->_nrb_t[index];
                +
                3036  int weight_index = nrb->_weight_index[index];
                +
                3037  double flag = nrb->_nrb_flag[index];
                +
                3038  Point_process* point_process = nt->pntprocs + offset;
                +
                3039  )CODE");
                +
                3040  printer->add_line(net_receive, "(t, point_process, inst, nt, ml, weight_index, flag);");
                +
                3041  printer->pop_block();
                +
                3042  print_net_receive_loop_end();
                +
                3043 
                +
                3044  print_device_stream_wait();
                +
                3045  printer->add_line("nrb->_displ_cnt = 0;");
                +
                3046  printer->add_line("nrb->_cnt = 0;");
                +
                3047 
                +
                3048  if (info.net_send_used || info.net_event_used) {
                +
                3049  print_send_event_move();
                +
                3050  }
                +
                3051 
                +
                3052  print_kernel_data_present_annotation_block_end();
                +
                3053  printer->pop_block();
                +
                3054 }
                +
                3055 
                +
                3056 
                + +
                3058  printer->add_line("i = nsb->_cnt++;");
                +
                3059 }
                +
                3060 
                3061 
                -
                3062  print_device_stream_wait();
                -
                3063  printer->add_line("nrb->_displ_cnt = 0;");
                -
                3064  printer->add_line("nrb->_cnt = 0;");
                -
                3065 
                -
                3066  if (info.net_send_used || info.net_event_used) {
                -
                3067  print_send_event_move();
                -
                3068  }
                -
                3069 
                -
                3070  print_kernel_data_present_annotation_block_end();
                -
                3071  printer->pop_block();
                -
                3072 }
                + +
                3063  printer->push_block("if (i >= nsb->_size)");
                +
                3064  printer->add_line("nsb->grow();");
                +
                3065  printer->pop_block();
                +
                3066 }
                +
                3067 
                +
                3068 
                + +
                3070  if (!net_send_buffer_required()) {
                +
                3071  return;
                +
                3072  }
                3073 
                -
                3074 
                - -
                3076  printer->add_line("i = nsb->_cnt++;");
                -
                3077 }
                -
                3078 
                -
                3079 
                - -
                3081  printer->push_block("if (i >= nsb->_size)");
                -
                3082  printer->add_line("nsb->grow();");
                -
                3083  printer->pop_block();
                -
                3084 }
                -
                3085 
                -
                3086 
                - -
                3088  if (!net_send_buffer_required()) {
                -
                3089  return;
                -
                3090  }
                -
                3091 
                -
                3092  printer->add_newline(2);
                -
                3093  print_device_method_annotation();
                -
                3094  auto args =
                -
                3095  "const NrnThread* nt, NetSendBuffer_t* nsb, int type, int vdata_index, "
                -
                3096  "int weight_index, int point_index, double t, double flag";
                -
                3097  printer->fmt_push_block("static inline void net_send_buffering({})", args);
                -
                3098  printer->add_line("int i = 0;");
                -
                3099  print_net_send_buffering_cnt_update();
                -
                3100  print_net_send_buffering_grow();
                -
                3101  printer->push_block("if (i < nsb->_size)");
                -
                3102  printer->add_multi_line(R"CODE(
                -
                3103  nsb->_sendtype[i] = type;
                -
                3104  nsb->_vdata_index[i] = vdata_index;
                -
                3105  nsb->_weight_index[i] = weight_index;
                -
                3106  nsb->_pnt_index[i] = point_index;
                -
                3107  nsb->_nsb_t[i] = t;
                -
                3108  nsb->_nsb_flag[i] = flag;
                -
                3109  )CODE");
                -
                3110  printer->pop_block();
                -
                3111  printer->pop_block();
                -
                3112 }
                -
                3113 
                -
                3114 
                - -
                3116  if (!net_receive_required()) {
                -
                3117  return;
                -
                3118  }
                -
                3119 
                -
                3120  printing_net_receive = true;
                -
                3121  const auto node = info.net_receive_node;
                -
                3122 
                -
                3123  // rename net_receive arguments used in the block itself
                -
                3124  rename_net_receive_arguments(*info.net_receive_node, *node);
                -
                3125 
                -
                3126  std::string name;
                -
                3127  ParamVector params;
                -
                3128  if (!info.artificial_cell) {
                -
                3129  name = method_name("net_receive_kernel");
                -
                3130  params.emplace_back("", "double", "", "t");
                -
                3131  params.emplace_back("", "Point_process*", "", "pnt");
                -
                3132  params.emplace_back("", fmt::format("{}*", instance_struct()),
                -
                3133  "", "inst");
                -
                3134  params.emplace_back("", "NrnThread*", "", "nt");
                -
                3135  params.emplace_back("", "Memb_list*", "", "ml");
                -
                3136  params.emplace_back("", "int", "", "weight_index");
                -
                3137  params.emplace_back("", "double", "", "flag");
                -
                3138  } else {
                -
                3139  name = method_name("net_receive");
                -
                3140  params.emplace_back("", "Point_process*", "", "pnt");
                -
                3141  params.emplace_back("", "int", "", "weight_index");
                -
                3142  params.emplace_back("", "double", "", "flag");
                -
                3143  }
                -
                3144 
                -
                3145  printer->add_newline(2);
                -
                3146  printer->fmt_push_block("static inline void {}({})", name, get_parameter_str(params));
                -
                3147  print_net_receive_common_code(*node, info.artificial_cell);
                -
                3148  if (info.artificial_cell) {
                -
                3149  printer->add_line("double t = nt->_t;");
                -
                3150  }
                +
                3074  printer->add_newline(2);
                +
                3075  print_device_method_annotation();
                +
                3076  auto args =
                +
                3077  "const NrnThread* nt, NetSendBuffer_t* nsb, int type, int vdata_index, "
                +
                3078  "int weight_index, int point_index, double t, double flag";
                +
                3079  printer->fmt_push_block("static inline void net_send_buffering({})", args);
                +
                3080  printer->add_line("int i = 0;");
                +
                3081  print_net_send_buffering_cnt_update();
                +
                3082  print_net_send_buffering_grow();
                +
                3083  printer->push_block("if (i < nsb->_size)");
                +
                3084  printer->add_multi_line(R"CODE(
                +
                3085  nsb->_sendtype[i] = type;
                +
                3086  nsb->_vdata_index[i] = vdata_index;
                +
                3087  nsb->_weight_index[i] = weight_index;
                +
                3088  nsb->_pnt_index[i] = point_index;
                +
                3089  nsb->_nsb_t[i] = t;
                +
                3090  nsb->_nsb_flag[i] = flag;
                +
                3091  )CODE");
                +
                3092  printer->pop_block();
                +
                3093  printer->pop_block();
                +
                3094 }
                +
                3095 
                +
                3096 
                + +
                3098  if (!net_receive_required()) {
                +
                3099  return;
                +
                3100  }
                +
                3101 
                +
                3102  printing_net_receive = true;
                +
                3103  const auto node = info.net_receive_node;
                +
                3104 
                +
                3105  // rename net_receive arguments used in the block itself
                +
                3106  rename_net_receive_arguments(*info.net_receive_node, *node);
                +
                3107 
                +
                3108  std::string name;
                +
                3109  ParamVector params;
                +
                3110  if (!info.artificial_cell) {
                +
                3111  name = method_name("net_receive_kernel");
                +
                3112  params.emplace_back("", "double", "", "t");
                +
                3113  params.emplace_back("", "Point_process*", "", "pnt");
                +
                3114  params.emplace_back("", fmt::format("{}*", instance_struct()),
                +
                3115  "", "inst");
                +
                3116  params.emplace_back("", "NrnThread*", "", "nt");
                +
                3117  params.emplace_back("", "Memb_list*", "", "ml");
                +
                3118  params.emplace_back("", "int", "", "weight_index");
                +
                3119  params.emplace_back("", "double", "", "flag");
                +
                3120  } else {
                +
                3121  name = method_name("net_receive");
                +
                3122  params.emplace_back("", "Point_process*", "", "pnt");
                +
                3123  params.emplace_back("", "int", "", "weight_index");
                +
                3124  params.emplace_back("", "double", "", "flag");
                +
                3125  }
                +
                3126 
                +
                3127  printer->add_newline(2);
                +
                3128  printer->fmt_push_block("static inline void {}({})", name, get_parameter_str(params));
                +
                3129  print_net_receive_common_code(*node, info.artificial_cell);
                +
                3130  if (info.artificial_cell) {
                +
                3131  printer->add_line("double t = nt->_t;");
                +
                3132  }
                +
                3133 
                +
                3134  // set voltage variable if it is used in the block (e.g. for WATCH statement)
                +
                3135  auto v_used = VarUsageVisitor().variable_used(*node->get_statement_block(), "v");
                +
                3136  if (v_used) {
                +
                3137  printer->add_line("int node_id = ml->nodeindices[id];");
                +
                3138  printer->add_line("v = nt->_actual_v[node_id];");
                +
                3139  }
                +
                3140 
                +
                3141  printer->fmt_line("{} = t;", get_variable_name("tsave"));
                +
                3142 
                +
                3143  if (info.is_watch_used()) {
                +
                3144  printer->add_line("bool watch_remove = false;");
                +
                3145  }
                +
                3146 
                +
                3147  printer->add_indent();
                +
                3148  node->get_statement_block()->accept(*this);
                +
                3149  printer->add_newline();
                +
                3150  printer->pop_block();
                3151 
                -
                3152  // set voltage variable if it is used in the block (e.g. for WATCH statement)
                -
                3153  auto v_used = VarUsageVisitor().variable_used(*node->get_statement_block(), "v");
                -
                3154  if (v_used) {
                -
                3155  printer->add_line("int node_id = ml->nodeindices[id];");
                -
                3156  printer->add_line("v = nt->_actual_v[node_id];");
                -
                3157  }
                -
                3158 
                -
                3159  printer->fmt_line("{} = t;", get_variable_name("tsave"));
                +
                3152  printing_net_receive = false;
                +
                3153 }
                +
                3154 
                +
                3155 
                + +
                3157  if (!net_receive_required()) {
                +
                3158  return;
                +
                3159  }
                3160 
                -
                3161  if (info.is_watch_used()) {
                -
                3162  printer->add_line("bool watch_remove = false;");
                -
                3163  }
                -
                3164 
                -
                3165  printer->add_indent();
                -
                3166  node->get_statement_block()->accept(*this);
                -
                3167  printer->add_newline();
                -
                3168  printer->pop_block();
                -
                3169 
                -
                3170  printing_net_receive = false;
                -
                3171 }
                -
                3172 
                -
                3173 
                - -
                3175  if (!net_receive_required()) {
                -
                3176  return;
                -
                3177  }
                -
                3178 
                -
                3179  printing_net_receive = true;
                -
                3180  if (!info.artificial_cell) {
                -
                3181  const auto& name = method_name("net_receive");
                -
                3182  ParamVector params;
                -
                3183  params.emplace_back("", "Point_process*", "", "pnt");
                -
                3184  params.emplace_back("", "int", "", "weight_index");
                -
                3185  params.emplace_back("", "double", "", "flag");
                -
                3186  printer->add_newline(2);
                -
                3187  printer->fmt_push_block("static void {}({})", name, get_parameter_str(params));
                -
                3188  printer->add_line("NrnThread* nt = nrn_threads + pnt->_tid;");
                -
                3189  printer->add_line("Memb_list* ml = get_memb_list(nt);");
                -
                3190  printer->add_line("NetReceiveBuffer_t* nrb = ml->_net_receive_buffer;");
                -
                3191  printer->push_block("if (nrb->_cnt >= nrb->_size)");
                -
                3192  printer->add_line("realloc_net_receive_buffer(nt, ml);");
                -
                3193  printer->pop_block();
                -
                3194  printer->add_multi_line(R"CODE(
                -
                3195  int id = nrb->_cnt;
                -
                3196  nrb->_pnt_index[id] = pnt-nt->pntprocs;
                -
                3197  nrb->_weight_index[id] = weight_index;
                -
                3198  nrb->_nrb_t[id] = nt->_t;
                -
                3199  nrb->_nrb_flag[id] = flag;
                -
                3200  nrb->_cnt++;
                -
                3201  )CODE");
                -
                3202  printer->pop_block();
                -
                3203  }
                -
                3204  printing_net_receive = false;
                -
                3205 }
                -
                3206 
                -
                3207 
                -
                3208 /**
                -
                3209  * \todo Data is not derived. Need to add instance into instance struct?
                -
                3210  * data used here is wrong in AoS because as in original implementation,
                -
                3211  * data is not incremented every iteration for AoS. May be better to derive
                -
                3212  * actual variable names? [resolved now?]
                -
                3213  * slist needs to added as local variable
                -
                3214  */
                - -
                3216  auto ext_args = external_method_arguments();
                -
                3217  auto ext_params = external_method_parameters();
                -
                3218  auto suffix = info.mod_suffix;
                -
                3219  auto list_num = info.derivimplicit_list_num;
                -
                3220  auto block_name = block.get_node_name();
                -
                3221  auto primes_size = info.primes_size;
                -
                3222  auto stride = "*pnodecount+id";
                -
                3223 
                -
                3224  printer->add_newline(2);
                -
                3225 
                -
                3226  printer->push_block("namespace");
                -
                3227  printer->fmt_push_block("struct _newton_{}_{}", block_name, info.mod_suffix);
                -
                3228  printer->fmt_push_block("int operator()({}) const", external_method_parameters());
                -
                3229  auto const instance = fmt::format("auto* const inst = static_cast<{0}*>(ml->instance);",
                -
                3230  instance_struct());
                -
                3231  auto const slist1 = fmt::format("auto const& slist{} = {};",
                -
                3232  list_num,
                -
                3233  get_variable_name(fmt::format("slist{}", list_num)));
                -
                3234  auto const slist2 = fmt::format("auto& slist{} = {};",
                -
                3235  list_num + 1,
                -
                3236  get_variable_name(fmt::format("slist{}", list_num + 1)));
                -
                3237  auto const dlist1 = fmt::format("auto const& dlist{} = {};",
                -
                3238  list_num,
                -
                3239  get_variable_name(fmt::format("dlist{}", list_num)));
                -
                3240  auto const dlist2 = fmt::format(
                -
                3241  "double* dlist{} = static_cast<double*>(thread[dith{}()].pval) + ({}*pnodecount);",
                -
                3242  list_num + 1,
                -
                3243  list_num,
                -
                3244  info.primes_size);
                -
                3245  printer->add_line(instance);
                -
                3246  if (ion_variable_struct_required()) {
                -
                3247  print_ion_variable();
                -
                3248  }
                -
                3249  printer->fmt_line("double* savstate{} = static_cast<double*>(thread[dith{}()].pval);",
                -
                3250  list_num,
                -
                3251  list_num);
                -
                3252  printer->add_line(slist1);
                -
                3253  printer->add_line(dlist1);
                -
                3254  printer->add_line(dlist2);
                -
                3255 
                -
                3256  print_statement_block(*block.get_statement_block(), false, false);
                -
                3257 
                -
                3258  printer->add_line("int counter = -1;");
                -
                3259  printer->fmt_push_block("for (int i=0; i<{}; i++)", info.num_primes);
                -
                3260  printer->fmt_push_block("if (*deriv{}_advance(thread))", list_num);
                -
                3261  printer->fmt_line(
                -
                3262  "dlist{0}[(++counter){1}] = "
                -
                3263  "data[dlist{2}[i]{1}]-(data[slist{2}[i]{1}]-savstate{2}[i{1}])/nt->_dt;",
                -
                3264  list_num + 1,
                -
                3265  stride,
                -
                3266  list_num);
                -
                3267  printer->chain_block("else");
                -
                3268  printer->fmt_line("dlist{0}[(++counter){1}] = data[slist{2}[i]{1}]-savstate{2}[i{1}];",
                -
                3269  list_num + 1,
                -
                3270  stride,
                -
                3271  list_num);
                -
                3272  printer->pop_block();
                -
                3273  printer->pop_block();
                -
                3274  printer->add_line("return 0;");
                -
                3275  printer->pop_block(); // operator()
                -
                3276  printer->pop_block(";"); // struct
                -
                3277  printer->pop_block(); // namespace
                -
                3278  printer->add_newline();
                -
                3279  printer->fmt_push_block("int {}_{}({})", block_name, suffix, ext_params);
                -
                3280  printer->add_line(instance);
                -
                3281  printer->fmt_line("double* savstate{} = (double*) thread[dith{}()].pval;", list_num, list_num);
                -
                3282  printer->add_line(slist1);
                -
                3283  printer->add_line(slist2);
                -
                3284  printer->add_line(dlist2);
                -
                3285  printer->fmt_push_block("for (int i=0; i<{}; i++)", info.num_primes);
                -
                3286  printer->fmt_line("savstate{}[i{}] = data[slist{}[i]{}];", list_num, stride, list_num, stride);
                -
                3287  printer->pop_block();
                -
                3288  printer->fmt_line(
                -
                3289  "int reset = nrn_newton_thread(static_cast<NewtonSpace*>(*newtonspace{}(thread)), {}, "
                -
                3290  "slist{}, _newton_{}_{}{{}}, dlist{}, {});",
                -
                3291  list_num,
                -
                3292  primes_size,
                -
                3293  list_num + 1,
                -
                3294  block_name,
                -
                3295  suffix,
                -
                3296  list_num + 1,
                -
                3297  ext_args);
                -
                3298  printer->add_line("return reset;");
                -
                3299  printer->pop_block();
                -
                3300  printer->add_newline(2);
                -
                3301 }
                -
                3302 
                -
                3303 
                - -
                3305  // nothing to do on cpu
                -
                3306 }
                -
                3307 
                -
                3308 
                -
                3309 /****************************************************************************************/
                -
                3310 /* Print nrn_state routine */
                -
                3311 /****************************************************************************************/
                -
                3312 
                -
                3313 
                - -
                3315  if (!nrn_state_required()) {
                -
                3316  return;
                +
                3161  printing_net_receive = true;
                +
                3162  if (!info.artificial_cell) {
                +
                3163  const auto& name = method_name("net_receive");
                +
                3164  ParamVector params;
                +
                3165  params.emplace_back("", "Point_process*", "", "pnt");
                +
                3166  params.emplace_back("", "int", "", "weight_index");
                +
                3167  params.emplace_back("", "double", "", "flag");
                +
                3168  printer->add_newline(2);
                +
                3169  printer->fmt_push_block("static void {}({})", name, get_parameter_str(params));
                +
                3170  printer->add_line("NrnThread* nt = nrn_threads + pnt->_tid;");
                +
                3171  printer->add_line("Memb_list* ml = get_memb_list(nt);");
                +
                3172  printer->add_line("NetReceiveBuffer_t* nrb = ml->_net_receive_buffer;");
                +
                3173  printer->push_block("if (nrb->_cnt >= nrb->_size)");
                +
                3174  printer->add_line("realloc_net_receive_buffer(nt, ml);");
                +
                3175  printer->pop_block();
                +
                3176  printer->add_multi_line(R"CODE(
                +
                3177  int id = nrb->_cnt;
                +
                3178  nrb->_pnt_index[id] = pnt-nt->pntprocs;
                +
                3179  nrb->_weight_index[id] = weight_index;
                +
                3180  nrb->_nrb_t[id] = nt->_t;
                +
                3181  nrb->_nrb_flag[id] = flag;
                +
                3182  nrb->_cnt++;
                +
                3183  )CODE");
                +
                3184  printer->pop_block();
                +
                3185  }
                +
                3186  printing_net_receive = false;
                +
                3187 }
                +
                3188 
                +
                3189 
                +
                3190 /**
                +
                3191  * \todo Data is not derived. Need to add instance into instance struct?
                +
                3192  * data used here is wrong in AoS because as in original implementation,
                +
                3193  * data is not incremented every iteration for AoS. May be better to derive
                +
                3194  * actual variable names? [resolved now?]
                +
                3195  * slist needs to added as local variable
                +
                3196  */
                + +
                3198  auto ext_args = external_method_arguments();
                +
                3199  auto ext_params = external_method_parameters();
                +
                3200  auto suffix = info.mod_suffix;
                +
                3201  auto list_num = info.derivimplicit_list_num;
                +
                3202  auto block_name = block.get_node_name();
                +
                3203  auto primes_size = info.primes_size;
                +
                3204  auto stride = "*pnodecount+id";
                +
                3205 
                +
                3206  printer->add_newline(2);
                +
                3207 
                +
                3208  printer->push_block("namespace");
                +
                3209  printer->fmt_push_block("struct _newton_{}_{}", block_name, info.mod_suffix);
                +
                3210  printer->fmt_push_block("int operator()({}) const", external_method_parameters());
                +
                3211  auto const instance = fmt::format("auto* const inst = static_cast<{0}*>(ml->instance);",
                +
                3212  instance_struct());
                +
                3213  auto const slist1 = fmt::format("auto const& slist{} = {};",
                +
                3214  list_num,
                +
                3215  get_variable_name(fmt::format("slist{}", list_num)));
                +
                3216  auto const slist2 = fmt::format("auto& slist{} = {};",
                +
                3217  list_num + 1,
                +
                3218  get_variable_name(fmt::format("slist{}", list_num + 1)));
                +
                3219  auto const dlist1 = fmt::format("auto const& dlist{} = {};",
                +
                3220  list_num,
                +
                3221  get_variable_name(fmt::format("dlist{}", list_num)));
                +
                3222  auto const dlist2 = fmt::format(
                +
                3223  "double* dlist{} = static_cast<double*>(thread[dith{}()].pval) + ({}*pnodecount);",
                +
                3224  list_num + 1,
                +
                3225  list_num,
                +
                3226  info.primes_size);
                +
                3227  printer->add_line(instance);
                +
                3228  if (ion_variable_struct_required()) {
                +
                3229  print_ion_variable();
                +
                3230  }
                +
                3231  printer->fmt_line("double* savstate{} = static_cast<double*>(thread[dith{}()].pval);",
                +
                3232  list_num,
                +
                3233  list_num);
                +
                3234  printer->add_line(slist1);
                +
                3235  printer->add_line(dlist1);
                +
                3236  printer->add_line(dlist2);
                +
                3237 
                +
                3238  print_statement_block(*block.get_statement_block(), false, false);
                +
                3239 
                +
                3240  printer->add_line("int counter = -1;");
                +
                3241  printer->fmt_push_block("for (int i=0; i<{}; i++)", info.num_primes);
                +
                3242  printer->fmt_push_block("if (*deriv{}_advance(thread))", list_num);
                +
                3243  printer->fmt_line(
                +
                3244  "dlist{0}[(++counter){1}] = "
                +
                3245  "data[dlist{2}[i]{1}]-(data[slist{2}[i]{1}]-savstate{2}[i{1}])/nt->_dt;",
                +
                3246  list_num + 1,
                +
                3247  stride,
                +
                3248  list_num);
                +
                3249  printer->chain_block("else");
                +
                3250  printer->fmt_line("dlist{0}[(++counter){1}] = data[slist{2}[i]{1}]-savstate{2}[i{1}];",
                +
                3251  list_num + 1,
                +
                3252  stride,
                +
                3253  list_num);
                +
                3254  printer->pop_block();
                +
                3255  printer->pop_block();
                +
                3256  printer->add_line("return 0;");
                +
                3257  printer->pop_block(); // operator()
                +
                3258  printer->pop_block(";"); // struct
                +
                3259  printer->pop_block(); // namespace
                +
                3260  printer->add_newline();
                +
                3261  printer->fmt_push_block("int {}_{}({})", block_name, suffix, ext_params);
                +
                3262  printer->add_line(instance);
                +
                3263  printer->fmt_line("double* savstate{} = (double*) thread[dith{}()].pval;", list_num, list_num);
                +
                3264  printer->add_line(slist1);
                +
                3265  printer->add_line(slist2);
                +
                3266  printer->add_line(dlist2);
                +
                3267  printer->fmt_push_block("for (int i=0; i<{}; i++)", info.num_primes);
                +
                3268  printer->fmt_line("savstate{}[i{}] = data[slist{}[i]{}];", list_num, stride, list_num, stride);
                +
                3269  printer->pop_block();
                +
                3270  printer->fmt_line(
                +
                3271  "int reset = nrn_newton_thread(static_cast<NewtonSpace*>(*newtonspace{}(thread)), {}, "
                +
                3272  "slist{}, _newton_{}_{}{{}}, dlist{}, {});",
                +
                3273  list_num,
                +
                3274  primes_size,
                +
                3275  list_num + 1,
                +
                3276  block_name,
                +
                3277  suffix,
                +
                3278  list_num + 1,
                +
                3279  ext_args);
                +
                3280  printer->add_line("return reset;");
                +
                3281  printer->pop_block();
                +
                3282  printer->add_newline(2);
                +
                3283 }
                +
                3284 
                +
                3285 
                + +
                3287  // nothing to do on cpu
                +
                3288 }
                +
                3289 
                +
                3290 
                +
                3291 /****************************************************************************************/
                +
                3292 /* Print nrn_state routine */
                +
                3293 /****************************************************************************************/
                +
                3294 
                +
                3295 
                + +
                3297  if (!nrn_state_required()) {
                +
                3298  return;
                +
                3299  }
                +
                3300 
                +
                3301  printer->add_newline(2);
                +
                3302  printer->add_line("/** update state */");
                +
                3303  print_global_function_common_code(BlockType::State);
                +
                3304  print_channel_iteration_block_parallel_hint(BlockType::State, info.nrn_state_block);
                +
                3305  printer->push_block("for (int id = 0; id < nodecount; id++)");
                +
                3306 
                +
                3307  printer->add_line("int node_id = node_index[id];");
                +
                3308  printer->add_line("double v = voltage[node_id];");
                +
                3309  print_v_unused();
                +
                3310 
                +
                3311  /**
                +
                3312  * \todo Eigen solver node also emits IonCurVar variable in the functor
                +
                3313  * but that shouldn't update ions in derivative block
                +
                3314  */
                +
                3315  if (ion_variable_struct_required()) {
                +
                3316  print_ion_variable();
                3317  }
                3318 
                -
                3319  printer->add_newline(2);
                -
                3320  printer->add_line("/** update state */");
                -
                3321  print_global_function_common_code(BlockType::State);
                -
                3322  print_channel_iteration_block_parallel_hint(BlockType::State, info.nrn_state_block);
                -
                3323  printer->push_block("for (int id = 0; id < nodecount; id++)");
                -
                3324 
                -
                3325  printer->add_line("int node_id = node_index[id];");
                -
                3326  printer->add_line("double v = voltage[node_id];");
                -
                3327  print_v_unused();
                -
                3328 
                -
                3329  /**
                -
                3330  * \todo Eigen solver node also emits IonCurVar variable in the functor
                -
                3331  * but that shouldn't update ions in derivative block
                -
                3332  */
                -
                3333  if (ion_variable_struct_required()) {
                -
                3334  print_ion_variable();
                -
                3335  }
                -
                3336 
                -
                3337  auto read_statements = ion_read_statements(BlockType::State);
                -
                3338  for (auto& statement: read_statements) {
                -
                3339  printer->add_line(statement);
                -
                3340  }
                +
                3319  auto read_statements = ion_read_statements(BlockType::State);
                +
                3320  for (auto& statement: read_statements) {
                +
                3321  printer->add_line(statement);
                +
                3322  }
                +
                3323 
                +
                3324  if (info.nrn_state_block) {
                +
                3325  info.nrn_state_block->visit_children(*this);
                +
                3326  }
                +
                3327 
                +
                3328  if (info.currents.empty() && info.breakpoint_node != nullptr) {
                +
                3329  auto block = info.breakpoint_node->get_statement_block();
                +
                3330  print_statement_block(*block, false, false);
                +
                3331  }
                +
                3332 
                +
                3333  const auto& write_statements = ion_write_statements(BlockType::State);
                +
                3334  for (auto& statement: write_statements) {
                +
                3335  const auto& text = process_shadow_update_statement(statement, BlockType::State);
                +
                3336  printer->add_line(text);
                +
                3337  }
                +
                3338  printer->pop_block();
                +
                3339 
                +
                3340  print_kernel_data_present_annotation_block_end();
                3341 
                -
                3342  if (info.nrn_state_block) {
                -
                3343  info.nrn_state_block->visit_children(*this);
                -
                3344  }
                +
                3342  printer->pop_block();
                +
                3343 }
                +
                3344 
                3345 
                -
                3346  if (info.currents.empty() && info.breakpoint_node != nullptr) {
                -
                3347  auto block = info.breakpoint_node->get_statement_block();
                -
                3348  print_statement_block(*block, false, false);
                -
                3349  }
                +
                3346 /****************************************************************************************/
                +
                3347 /* Print nrn_cur related routines */
                +
                3348 /****************************************************************************************/
                +
                3349 
                3350 
                -
                3351  const auto& write_statements = ion_write_statements(BlockType::State);
                -
                3352  for (auto& statement: write_statements) {
                -
                3353  const auto& text = process_shadow_update_statement(statement, BlockType::State);
                -
                3354  printer->add_line(text);
                -
                3355  }
                -
                3356  printer->pop_block();
                -
                3357 
                -
                3358  print_kernel_data_present_annotation_block_end();
                -
                3359 
                -
                3360  printer->pop_block();
                -
                3361 }
                -
                3362 
                -
                3363 
                -
                3364 /****************************************************************************************/
                -
                3365 /* Print nrn_cur related routines */
                -
                3366 /****************************************************************************************/
                -
                3367 
                + +
                3352  const auto& args = internal_method_parameters();
                +
                3353  const auto& block = node.get_statement_block();
                +
                3354  printer->add_newline(2);
                +
                3355  print_device_method_annotation();
                +
                3356  printer->fmt_push_block("inline double nrn_current_{}({})",
                +
                3357  info.mod_suffix,
                +
                3358  get_parameter_str(args));
                +
                3359  printer->add_line("double current = 0.0;");
                +
                3360  print_statement_block(*block, false, false);
                +
                3361  for (auto& current: info.currents) {
                +
                3362  const auto& name = get_variable_name(current);
                +
                3363  printer->fmt_line("current += {};", name);
                +
                3364  }
                +
                3365  printer->add_line("return current;");
                +
                3366  printer->pop_block();
                +
                3367 }
                3368 
                - -
                3370  const auto& args = internal_method_parameters();
                +
                3369 
                +
                3371  const auto& block = node.get_statement_block();
                -
                3372  printer->add_newline(2);
                -
                3373  print_device_method_annotation();
                -
                3374  printer->fmt_push_block("inline double nrn_current_{}({})",
                -
                3375  info.mod_suffix,
                -
                3376  get_parameter_str(args));
                -
                3377  printer->add_line("double current = 0.0;");
                -
                3378  print_statement_block(*block, false, false);
                -
                3379  for (auto& current: info.currents) {
                -
                3380  const auto& name = get_variable_name(current);
                -
                3381  printer->fmt_line("current += {};", name);
                -
                3382  }
                -
                3383  printer->add_line("return current;");
                -
                3384  printer->pop_block();
                -
                3385 }
                -
                3386 
                -
                3387 
                - -
                3389  const auto& block = node.get_statement_block();
                -
                3390  print_statement_block(*block, false, false);
                -
                3391  if (!info.currents.empty()) {
                -
                3392  std::string sum;
                -
                3393  for (const auto& current: info.currents) {
                -
                3394  auto var = breakpoint_current(current);
                -
                3395  sum += get_variable_name(var);
                -
                3396  if (&current != &info.currents.back()) {
                -
                3397  sum += "+";
                -
                3398  }
                -
                3399  }
                -
                3400  printer->fmt_line("double rhs = {};", sum);
                -
                3401  }
                -
                3402 
                -
                3403  std::string sum;
                -
                3404  for (const auto& conductance: info.conductances) {
                -
                3405  auto var = breakpoint_current(conductance.variable);
                -
                3406  sum += get_variable_name(var);
                -
                3407  if (&conductance != &info.conductances.back()) {
                -
                3408  sum += "+";
                -
                3409  }
                -
                3410  }
                -
                3411  printer->fmt_line("double g = {};", sum);
                -
                3412 
                -
                3413  for (const auto& conductance: info.conductances) {
                -
                3414  if (!conductance.ion.empty()) {
                -
                3415  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + conductance.ion + "dv";
                -
                3416  const auto& rhs = get_variable_name(conductance.variable);
                -
                3417  const ShadowUseStatement statement{lhs, "+=", rhs};
                -
                3418  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
                -
                3419  printer->add_line(text);
                -
                3420  }
                -
                3421  }
                -
                3422 }
                -
                3423 
                -
                3424 
                - -
                3426  printer->fmt_line("double g = nrn_current_{}({}+0.001);",
                -
                3427  info.mod_suffix,
                -
                3428  internal_method_arguments());
                -
                3429  for (auto& ion: info.ions) {
                -
                3430  for (auto& var: ion.writes) {
                -
                3431  if (ion.is_ionic_current(var)) {
                -
                3432  const auto& name = get_variable_name(var);
                -
                3433  printer->fmt_line("double di{} = {};", ion.name, name);
                -
                3434  }
                -
                3435  }
                -
                3436  }
                -
                3437  printer->fmt_line("double rhs = nrn_current_{}({});",
                -
                3438  info.mod_suffix,
                -
                3439  internal_method_arguments());
                -
                3440  printer->add_line("g = (g-rhs)/0.001;");
                -
                3441  for (auto& ion: info.ions) {
                -
                3442  for (auto& var: ion.writes) {
                -
                3443  if (ion.is_ionic_current(var)) {
                -
                3444  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + ion.name + "dv";
                -
                3445  auto rhs = fmt::format("(di{}-{})/0.001", ion.name, get_variable_name(var));
                -
                3446  if (info.point_process) {
                -
                3447  auto area = get_variable_name(naming::NODE_AREA_VARIABLE);
                -
                3448  rhs += fmt::format("*1.e2/{}", area);
                -
                3449  }
                -
                3450  const ShadowUseStatement statement{lhs, "+=", rhs};
                -
                3451  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
                -
                3452  printer->add_line(text);
                -
                3453  }
                -
                3454  }
                -
                3455  }
                -
                3456 }
                -
                3457 
                -
                3458 
                - -
                3460  printer->add_line("int node_id = node_index[id];");
                -
                3461  printer->add_line("double v = voltage[node_id];");
                -
                3462  print_v_unused();
                -
                3463  if (ion_variable_struct_required()) {
                -
                3464  print_ion_variable();
                -
                3465  }
                -
                3466 
                -
                3467  const auto& read_statements = ion_read_statements(BlockType::Equation);
                -
                3468  for (auto& statement: read_statements) {
                -
                3469  printer->add_line(statement);
                -
                3470  }
                -
                3471 
                -
                3472  if (info.conductances.empty()) {
                -
                3473  print_nrn_cur_non_conductance_kernel();
                -
                3474  } else {
                -
                3475  print_nrn_cur_conductance_kernel(node);
                -
                3476  }
                -
                3477 
                -
                3478  const auto& write_statements = ion_write_statements(BlockType::Equation);
                -
                3479  for (auto& statement: write_statements) {
                -
                3480  auto text = process_shadow_update_statement(statement, BlockType::Equation);
                -
                3481  printer->add_line(text);
                -
                3482  }
                -
                3483 
                +
                3372  print_statement_block(*block, false, false);
                +
                3373  if (!info.currents.empty()) {
                +
                3374  std::string sum;
                +
                3375  for (const auto& current: info.currents) {
                +
                3376  auto var = breakpoint_current(current);
                +
                3377  sum += get_variable_name(var);
                +
                3378  if (&current != &info.currents.back()) {
                +
                3379  sum += "+";
                +
                3380  }
                +
                3381  }
                +
                3382  printer->fmt_line("double rhs = {};", sum);
                +
                3383  }
                +
                3384 
                +
                3385  std::string sum;
                +
                3386  for (const auto& conductance: info.conductances) {
                +
                3387  auto var = breakpoint_current(conductance.variable);
                +
                3388  sum += get_variable_name(var);
                +
                3389  if (&conductance != &info.conductances.back()) {
                +
                3390  sum += "+";
                +
                3391  }
                +
                3392  }
                +
                3393  printer->fmt_line("double g = {};", sum);
                +
                3394 
                +
                3395  for (const auto& conductance: info.conductances) {
                +
                3396  if (!conductance.ion.empty()) {
                +
                3397  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + conductance.ion + "dv";
                +
                3398  const auto& rhs = get_variable_name(conductance.variable);
                +
                3399  const ShadowUseStatement statement{lhs, "+=", rhs};
                +
                3400  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
                +
                3401  printer->add_line(text);
                +
                3402  }
                +
                3403  }
                +
                3404 }
                +
                3405 
                +
                3406 
                + +
                3408  printer->fmt_line("double g = nrn_current_{}({}+0.001);",
                +
                3409  info.mod_suffix,
                +
                3410  internal_method_arguments());
                +
                3411  for (auto& ion: info.ions) {
                +
                3412  for (auto& var: ion.writes) {
                +
                3413  if (ion.is_ionic_current(var)) {
                +
                3414  const auto& name = get_variable_name(var);
                +
                3415  printer->fmt_line("double di{} = {};", ion.name, name);
                +
                3416  }
                +
                3417  }
                +
                3418  }
                +
                3419  printer->fmt_line("double rhs = nrn_current_{}({});",
                +
                3420  info.mod_suffix,
                +
                3421  internal_method_arguments());
                +
                3422  printer->add_line("g = (g-rhs)/0.001;");
                +
                3423  for (auto& ion: info.ions) {
                +
                3424  for (auto& var: ion.writes) {
                +
                3425  if (ion.is_ionic_current(var)) {
                +
                3426  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + ion.name + "dv";
                +
                3427  auto rhs = fmt::format("(di{}-{})/0.001", ion.name, get_variable_name(var));
                +
                3428  if (info.point_process) {
                +
                3429  auto area = get_variable_name(naming::NODE_AREA_VARIABLE);
                +
                3430  rhs += fmt::format("*1.e2/{}", area);
                +
                3431  }
                +
                3432  const ShadowUseStatement statement{lhs, "+=", rhs};
                +
                3433  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
                +
                3434  printer->add_line(text);
                +
                3435  }
                +
                3436  }
                +
                3437  }
                +
                3438 }
                +
                3439 
                +
                3440 
                + +
                3442  printer->add_line("int node_id = node_index[id];");
                +
                3443  printer->add_line("double v = voltage[node_id];");
                +
                3444  print_v_unused();
                +
                3445  if (ion_variable_struct_required()) {
                +
                3446  print_ion_variable();
                +
                3447  }
                +
                3448 
                +
                3449  const auto& read_statements = ion_read_statements(BlockType::Equation);
                +
                3450  for (auto& statement: read_statements) {
                +
                3451  printer->add_line(statement);
                +
                3452  }
                +
                3453 
                +
                3454  if (info.conductances.empty()) {
                +
                3455  print_nrn_cur_non_conductance_kernel();
                +
                3456  } else {
                +
                3457  print_nrn_cur_conductance_kernel(node);
                +
                3458  }
                +
                3459 
                +
                3460  const auto& write_statements = ion_write_statements(BlockType::Equation);
                +
                3461  for (auto& statement: write_statements) {
                +
                3462  auto text = process_shadow_update_statement(statement, BlockType::Equation);
                +
                3463  printer->add_line(text);
                +
                3464  }
                +
                3465 
                +
                3466  if (info.point_process) {
                +
                3467  const auto& area = get_variable_name(naming::NODE_AREA_VARIABLE);
                +
                3468  printer->fmt_line("double mfactor = 1.e2/{};", area);
                +
                3469  printer->add_line("g = g*mfactor;");
                +
                3470  printer->add_line("rhs = rhs*mfactor;");
                +
                3471  }
                +
                3472 
                +
                3473  print_g_unused();
                +
                3474 }
                +
                3475 
                +
                3476 
                + +
                3478  if (!info.electrode_current) {
                +
                3479  return;
                +
                3480  }
                +
                3481  std::string rhs, d;
                +
                3482  auto rhs_op = operator_for_rhs();
                +
                3483  auto d_op = operator_for_d();
                3484  if (info.point_process) {
                -
                3485  const auto& area = get_variable_name(naming::NODE_AREA_VARIABLE);
                -
                3486  printer->fmt_line("double mfactor = 1.e2/{};", area);
                -
                3487  printer->add_line("g = g*mfactor;");
                -
                3488  printer->add_line("rhs = rhs*mfactor;");
                -
                3489  }
                -
                3490 
                -
                3491  print_g_unused();
                -
                3492 }
                -
                3493 
                -
                3494 
                - -
                3496  if (!info.electrode_current) {
                -
                3497  return;
                -
                3498  }
                -
                3499  std::string rhs, d;
                -
                3500  auto rhs_op = operator_for_rhs();
                -
                3501  auto d_op = operator_for_d();
                -
                3502  if (info.point_process) {
                -
                3503  rhs = "shadow_rhs[id]";
                -
                3504  d = "shadow_d[id]";
                -
                3505  } else {
                -
                3506  rhs = "rhs";
                -
                3507  d = "g";
                -
                3508  }
                -
                3509 
                -
                3510  printer->push_block("if (nt->nrn_fast_imem)");
                -
                3511  if (nrn_cur_reduction_loop_required()) {
                -
                3512  printer->push_block("for (int id = 0; id < nodecount; id++)");
                -
                3513  printer->add_line("int node_id = node_index[id];");
                -
                3514  }
                -
                3515  printer->fmt_line("nt->nrn_fast_imem->nrn_sav_rhs[node_id] {} {};", rhs_op, rhs);
                -
                3516  printer->fmt_line("nt->nrn_fast_imem->nrn_sav_d[node_id] {} {};", d_op, d);
                -
                3517  if (nrn_cur_reduction_loop_required()) {
                -
                3518  printer->pop_block();
                -
                3519  }
                -
                3520  printer->pop_block();
                -
                3521 }
                -
                3522 
                -
                3523 
                - -
                3525  if (!nrn_cur_required()) {
                -
                3526  return;
                -
                3527  }
                -
                3528 
                -
                3529  if (info.conductances.empty()) {
                -
                3530  print_nrn_current(*info.breakpoint_node);
                -
                3531  }
                -
                3532 
                -
                3533  printer->add_newline(2);
                -
                3534  printer->add_line("/** update current */");
                -
                3535  print_global_function_common_code(BlockType::Equation);
                -
                3536  print_channel_iteration_block_parallel_hint(BlockType::Equation, info.breakpoint_node);
                -
                3537  printer->push_block("for (int id = 0; id < nodecount; id++)");
                -
                3538  print_nrn_cur_kernel(*info.breakpoint_node);
                -
                3539  print_nrn_cur_matrix_shadow_update();
                -
                3540  if (!nrn_cur_reduction_loop_required()) {
                -
                3541  print_fast_imem_calculation();
                -
                3542  }
                -
                3543  printer->pop_block();
                -
                3544 
                -
                3545  if (nrn_cur_reduction_loop_required()) {
                -
                3546  printer->push_block("for (int id = 0; id < nodecount; id++)");
                -
                3547  print_nrn_cur_matrix_shadow_reduction();
                -
                3548  printer->pop_block();
                -
                3549  print_fast_imem_calculation();
                -
                3550  }
                -
                3551 
                -
                3552  print_kernel_data_present_annotation_block_end();
                -
                3553  printer->pop_block();
                -
                3554 }
                +
                3485  rhs = "shadow_rhs[id]";
                +
                3486  d = "shadow_d[id]";
                +
                3487  } else {
                +
                3488  rhs = "rhs";
                +
                3489  d = "g";
                +
                3490  }
                +
                3491 
                +
                3492  printer->push_block("if (nt->nrn_fast_imem)");
                +
                3493  if (nrn_cur_reduction_loop_required()) {
                +
                3494  printer->push_block("for (int id = 0; id < nodecount; id++)");
                +
                3495  printer->add_line("int node_id = node_index[id];");
                +
                3496  }
                +
                3497  printer->fmt_line("nt->nrn_fast_imem->nrn_sav_rhs[node_id] {} {};", rhs_op, rhs);
                +
                3498  printer->fmt_line("nt->nrn_fast_imem->nrn_sav_d[node_id] {} {};", d_op, d);
                +
                3499  if (nrn_cur_reduction_loop_required()) {
                +
                3500  printer->pop_block();
                +
                3501  }
                +
                3502  printer->pop_block();
                +
                3503 }
                +
                3504 
                +
                3505 
                + +
                3507  if (!nrn_cur_required()) {
                +
                3508  return;
                +
                3509  }
                +
                3510 
                +
                3511  if (info.conductances.empty()) {
                +
                3512  print_nrn_current(*info.breakpoint_node);
                +
                3513  }
                +
                3514 
                +
                3515  printer->add_newline(2);
                +
                3516  printer->add_line("/** update current */");
                +
                3517  print_global_function_common_code(BlockType::Equation);
                +
                3518  print_channel_iteration_block_parallel_hint(BlockType::Equation, info.breakpoint_node);
                +
                3519  printer->push_block("for (int id = 0; id < nodecount; id++)");
                +
                3520  print_nrn_cur_kernel(*info.breakpoint_node);
                +
                3521  print_nrn_cur_matrix_shadow_update();
                +
                3522  if (!nrn_cur_reduction_loop_required()) {
                +
                3523  print_fast_imem_calculation();
                +
                3524  }
                +
                3525  printer->pop_block();
                +
                3526 
                +
                3527  if (nrn_cur_reduction_loop_required()) {
                +
                3528  printer->push_block("for (int id = 0; id < nodecount; id++)");
                +
                3529  print_nrn_cur_matrix_shadow_reduction();
                +
                3530  printer->pop_block();
                +
                3531  print_fast_imem_calculation();
                +
                3532  }
                +
                3533 
                +
                3534  print_kernel_data_present_annotation_block_end();
                +
                3535  printer->pop_block();
                +
                3536 }
                +
                3537 
                +
                3538 
                +
                3539 /****************************************************************************************/
                +
                3540 /* Main code printing entry points */
                +
                3541 /****************************************************************************************/
                +
                3542 
                + +
                3544  print_standard_includes();
                +
                3545  print_backend_includes();
                +
                3546  print_coreneuron_includes();
                +
                3547 }
                +
                3548 
                +
                3549 
                + +
                3551  print_namespace_start();
                +
                3552  print_backend_namespace_start();
                +
                3553 }
                +
                3554 
                3555 
                -
                3556 
                -
                3557 /****************************************************************************************/
                -
                3558 /* Main code printing entry points */
                -
                3559 /****************************************************************************************/
                + +
                3557  print_backend_namespace_stop();
                +
                3558  print_namespace_stop();
                +
                3559 }
                3560 
                - -
                3562  print_standard_includes();
                -
                3563  print_backend_includes();
                -
                3564  print_coreneuron_includes();
                -
                3565 }
                -
                3566 
                -
                3567 
                - -
                3569  print_namespace_start();
                -
                3570  print_backend_namespace_start();
                -
                3571 }
                -
                3572 
                -
                3573 
                - -
                3575  print_backend_namespace_stop();
                -
                3576  print_namespace_stop();
                -
                3577 }
                +
                3561 
                + +
                3563  print_first_pointer_var_index_getter();
                +
                3564  print_net_receive_arg_size_getter();
                +
                3565  print_thread_getters();
                +
                3566  print_num_variable_getter();
                +
                3567  print_mech_type_getter();
                +
                3568  print_memb_list_getter();
                +
                3569 }
                +
                3570 
                +
                3571 
                + +
                3573  print_mechanism_global_var_structure(print_initializers);
                +
                3574  print_mechanism_range_var_structure(print_initializers);
                +
                3575  print_ion_var_structure();
                +
                3576 }
                +
                3577 
                3578 
                -
                3579 
                - -
                3581  print_first_pointer_var_index_getter();
                -
                3582  print_net_receive_arg_size_getter();
                -
                3583  print_thread_getters();
                -
                3584  print_num_variable_getter();
                -
                3585  print_mech_type_getter();
                -
                3586  print_memb_list_getter();
                -
                3587 }
                -
                3588 
                -
                3589 
                - -
                3591  print_mechanism_global_var_structure(print_initializers);
                -
                3592  print_mechanism_range_var_structure(print_initializers);
                -
                3593  print_ion_var_structure();
                -
                3594 }
                -
                3595 
                -
                3596 
                - -
                3598  if (!info.vectorize) {
                -
                3599  return;
                -
                3600  }
                -
                3601  printer->add_multi_line(R"CODE(
                -
                3602  #if NRN_PRCELLSTATE
                -
                3603  inst->v_unused[id] = v;
                -
                3604  #endif
                -
                3605  )CODE");
                -
                3606 }
                -
                3607 
                -
                3608 
                - -
                3610  printer->add_multi_line(R"CODE(
                -
                3611  #if NRN_PRCELLSTATE
                -
                3612  inst->g_unused[id] = g;
                -
                3613  #endif
                -
                3614  )CODE");
                -
                3615 }
                -
                3616 
                -
                3617 
                - -
                3619  print_top_verbatim_blocks();
                -
                3620  for (const auto& procedure: info.procedures) {
                -
                3621  print_procedure(*procedure);
                -
                3622  }
                -
                3623  for (const auto& function: info.functions) {
                -
                3624  print_function(*function);
                -
                3625  }
                -
                3626  for (const auto& function: info.function_tables) {
                -
                3627  print_function_tables(*function);
                -
                3628  }
                -
                3629  for (size_t i = 0; i < info.before_after_blocks.size(); i++) {
                -
                3630  print_before_after_block(info.before_after_blocks[i], i);
                -
                3631  }
                -
                3632  for (const auto& callback: info.derivimplicit_callbacks) {
                -
                3633  const auto& block = *callback->get_node_to_solve();
                -
                3634  print_derivimplicit_kernel(block);
                -
                3635  }
                -
                3636  print_net_send_buffering();
                -
                3637  print_net_init();
                -
                3638  print_watch_activate();
                -
                3639  print_watch_check();
                -
                3640  print_net_receive_kernel();
                -
                3641  print_net_receive();
                -
                3642  print_net_receive_buffering();
                -
                3643  print_nrn_init();
                -
                3644  print_nrn_cur();
                -
                3645  print_nrn_state();
                -
                3646 }
                -
                3647 
                -
                3648 
                - -
                3650  print_backend_info();
                -
                3651  print_headers_include();
                -
                3652  print_namespace_begin();
                -
                3653  print_nmodl_constants();
                -
                3654  print_prcellstate_macros();
                -
                3655  print_mechanism_info();
                -
                3656  print_data_structures(true);
                -
                3657  print_global_variables_for_hoc();
                -
                3658  print_common_getters();
                -
                3659  print_memory_allocation_routine();
                -
                3660  print_abort_routine();
                -
                3661  print_thread_memory_callbacks();
                -
                3662  print_instance_variable_setup();
                -
                3663  print_nrn_alloc();
                -
                3664  print_nrn_constructor();
                -
                3665  print_nrn_destructor();
                -
                3666  print_function_prototypes();
                -
                3667  print_functors_definitions();
                -
                3668  print_compute_functions();
                -
                3669  print_check_table_thread_function();
                -
                3670  print_mechanism_register();
                -
                3671  print_namespace_end();
                -
                3672 }
                -
                3673 
                + +
                3580  if (!info.vectorize) {
                +
                3581  return;
                +
                3582  }
                +
                3583  printer->add_multi_line(R"CODE(
                +
                3584  #if NRN_PRCELLSTATE
                +
                3585  inst->v_unused[id] = v;
                +
                3586  #endif
                +
                3587  )CODE");
                +
                3588 }
                +
                3589 
                +
                3590 
                + +
                3592  printer->add_multi_line(R"CODE(
                +
                3593  #if NRN_PRCELLSTATE
                +
                3594  inst->g_unused[id] = g;
                +
                3595  #endif
                +
                3596  )CODE");
                +
                3597 }
                +
                3598 
                +
                3599 
                + +
                3601  print_top_verbatim_blocks();
                +
                3602  for (const auto& procedure: info.procedures) {
                +
                3603  print_procedure(*procedure);
                +
                3604  }
                +
                3605  for (const auto& function: info.functions) {
                +
                3606  print_function(*function);
                +
                3607  }
                +
                3608  for (const auto& function: info.function_tables) {
                +
                3609  print_function_tables(*function);
                +
                3610  }
                +
                3611  for (size_t i = 0; i < info.before_after_blocks.size(); i++) {
                +
                3612  print_before_after_block(info.before_after_blocks[i], i);
                +
                3613  }
                +
                3614  for (const auto& callback: info.derivimplicit_callbacks) {
                +
                3615  const auto& block = *callback->get_node_to_solve();
                +
                3616  print_derivimplicit_kernel(block);
                +
                3617  }
                +
                3618  print_net_send_buffering();
                +
                3619  print_net_init();
                +
                3620  print_watch_activate();
                +
                3621  print_watch_check();
                +
                3622  print_net_receive_kernel();
                +
                3623  print_net_receive();
                +
                3624  print_net_receive_buffering();
                +
                3625  print_nrn_init();
                +
                3626  print_nrn_cur();
                +
                3627  print_nrn_state();
                +
                3628 }
                +
                3629 
                +
                3630 
                + +
                3632  print_backend_info();
                +
                3633  print_headers_include();
                +
                3634  print_namespace_begin();
                +
                3635  print_nmodl_constants();
                +
                3636  print_prcellstate_macros();
                +
                3637  print_mechanism_info();
                +
                3638  print_data_structures(true);
                +
                3639  print_global_variables_for_hoc();
                +
                3640  print_common_getters();
                +
                3641  print_memory_allocation_routine();
                +
                3642  print_abort_routine();
                +
                3643  print_thread_memory_callbacks();
                +
                3644  print_instance_variable_setup();
                +
                3645  print_nrn_alloc();
                +
                3646  print_nrn_constructor();
                +
                3647  print_nrn_destructor();
                +
                3648  print_function_prototypes();
                +
                3649  print_functors_definitions();
                +
                3650  print_compute_functions();
                +
                3651  print_check_table_thread_function();
                +
                3652  print_mechanism_register();
                +
                3653  print_namespace_end();
                +
                3654 }
                +
                3655 
                +
                3656 
                +
                3657 /****************************************************************************************/
                +
                3658 /* Overloaded visitor routines */
                +
                3659 /****************************************************************************************/
                +
                3660 
                +
                3661 
                + +
                3663  printer->fmt_line("{}_{}({});",
                +
                3664  node.get_node_to_solve()->get_node_name(),
                +
                3665  info.mod_suffix,
                +
                3666  external_method_arguments());
                +
                3667 }
                +
                3668 
                +
                3669 
                + +
                3671  const ast::EigenNewtonSolverBlock& node) {
                +
                3672  // solution vector to store copy of state vars for Newton solver
                +
                3673  printer->add_newline();
                3674 
                -
                3675 /****************************************************************************************/
                -
                3676 /* Overloaded visitor routines */
                -
                3677 /****************************************************************************************/
                -
                3678 
                +
                3675  auto float_type = default_float_data_type();
                +
                3676  int N = node.get_n_state_vars()->get_value();
                +
                3677  printer->fmt_line("Eigen::Matrix<{}, {}, 1> nmodl_eigen_xm;", float_type, N);
                +
                3678  printer->fmt_line("{}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                3679 
                - -
                3681  printer->fmt_line("{}_{}({});",
                -
                3682  node.get_node_to_solve()->get_node_name(),
                -
                3683  info.mod_suffix,
                -
                3684  external_method_arguments());
                -
                3685 }
                -
                3686 
                -
                3687 
                - -
                3689  const ast::EigenNewtonSolverBlock& node) {
                -
                3690  // solution vector to store copy of state vars for Newton solver
                -
                3691  printer->add_newline();
                -
                3692 
                -
                3693  auto float_type = default_float_data_type();
                -
                3694  int N = node.get_n_state_vars()->get_value();
                -
                3695  printer->fmt_line("Eigen::Matrix<{}, {}, 1> nmodl_eigen_xm;", float_type, N);
                -
                3696  printer->fmt_line("{}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                +
                3680  print_statement_block(*node.get_setup_x_block(), false, false);
                +
                3681 
                +
                3682  // call newton solver with functor and X matrix that contains state vars
                +
                3683  printer->add_line("// call newton solver");
                +
                3684  printer->fmt_line("{} newton_functor(nt, inst, id, pnodecount, v, indexes, data, thread);",
                +
                3685  info.functor_names[&node]);
                +
                3686  printer->add_line("newton_functor.initialize();");
                +
                3687  printer->add_line(
                +
                3688  "int newton_iterations = nmodl::newton::newton_solver(nmodl_eigen_xm, newton_functor);");
                +
                3689  printer->add_line(
                +
                3690  "if (newton_iterations < 0) assert(false && \"Newton solver did not converge!\");");
                +
                3691 
                +
                3692  // assign newton solver results in matrix X to state vars
                +
                3693  print_statement_block(*node.get_update_states_block(), false, false);
                +
                3694  printer->add_line("newton_functor.finalize();");
                +
                3695 }
                +
                3696 
                3697 
                -
                3698  print_statement_block(*node.get_setup_x_block(), false, false);
                -
                3699 
                -
                3700  // call newton solver with functor and X matrix that contains state vars
                -
                3701  printer->add_line("// call newton solver");
                -
                3702  printer->fmt_line("{} newton_functor(nt, inst, id, pnodecount, v, indexes, data, thread);",
                -
                3703  info.functor_names[&node]);
                -
                3704  printer->add_line("newton_functor.initialize();");
                -
                3705  printer->add_line(
                -
                3706  "int newton_iterations = nmodl::newton::newton_solver(nmodl_eigen_xm, newton_functor);");
                -
                3707  printer->add_line(
                -
                3708  "if (newton_iterations < 0) assert(false && \"Newton solver did not converge!\");");
                -
                3709 
                -
                3710  // assign newton solver results in matrix X to state vars
                -
                3711  print_statement_block(*node.get_update_states_block(), false, false);
                -
                3712  printer->add_line("newton_functor.finalize();");
                -
                3713 }
                + +
                3699  const ast::EigenLinearSolverBlock& node) {
                +
                3700  printer->add_newline();
                +
                3701 
                +
                3702  const std::string float_type = default_float_data_type();
                +
                3703  int N = node.get_n_state_vars()->get_value();
                +
                3704  printer->fmt_line("Eigen::Matrix<{0}, {1}, 1> nmodl_eigen_xm, nmodl_eigen_fm;", float_type, N);
                +
                3705  printer->fmt_line("Eigen::Matrix<{0}, {1}, {1}> nmodl_eigen_jm;", float_type, N);
                +
                3706  if (N <= 4)
                +
                3707  printer->fmt_line("Eigen::Matrix<{0}, {1}, {1}> nmodl_eigen_jm_inv;", float_type, N);
                +
                3708  printer->fmt_line("{}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                +
                3709  printer->fmt_line("{}* nmodl_eigen_j = nmodl_eigen_jm.data();", float_type);
                +
                3710  printer->fmt_line("{}* nmodl_eigen_f = nmodl_eigen_fm.data();", float_type);
                +
                3711  print_statement_block(*node.get_variable_block(), false, false);
                +
                3712  print_statement_block(*node.get_initialize_block(), false, false);
                +
                3713  print_statement_block(*node.get_setup_x_block(), false, false);
                3714 
                -
                3715 
                - -
                3717  const ast::EigenLinearSolverBlock& node) {
                -
                3718  printer->add_newline();
                -
                3719 
                -
                3720  const std::string float_type = default_float_data_type();
                -
                3721  int N = node.get_n_state_vars()->get_value();
                -
                3722  printer->fmt_line("Eigen::Matrix<{0}, {1}, 1> nmodl_eigen_xm, nmodl_eigen_fm;", float_type, N);
                -
                3723  printer->fmt_line("Eigen::Matrix<{0}, {1}, {1}> nmodl_eigen_jm;", float_type, N);
                -
                3724  if (N <= 4)
                -
                3725  printer->fmt_line("Eigen::Matrix<{0}, {1}, {1}> nmodl_eigen_jm_inv;", float_type, N);
                -
                3726  printer->fmt_line("{}* nmodl_eigen_x = nmodl_eigen_xm.data();", float_type);
                -
                3727  printer->fmt_line("{}* nmodl_eigen_j = nmodl_eigen_jm.data();", float_type);
                -
                3728  printer->fmt_line("{}* nmodl_eigen_f = nmodl_eigen_fm.data();", float_type);
                -
                3729  print_statement_block(*node.get_variable_block(), false, false);
                -
                3730  print_statement_block(*node.get_initialize_block(), false, false);
                -
                3731  print_statement_block(*node.get_setup_x_block(), false, false);
                -
                3732 
                -
                3733  printer->add_newline();
                -
                3734  print_eigen_linear_solver(float_type, N);
                -
                3735  printer->add_newline();
                -
                3736 
                -
                3737  print_statement_block(*node.get_update_states_block(), false, false);
                -
                3738  print_statement_block(*node.get_finalize_block(), false, false);
                -
                3739 }
                +
                3715  printer->add_newline();
                +
                3716  print_eigen_linear_solver(float_type, N);
                +
                3717  printer->add_newline();
                +
                3718 
                +
                3719  print_statement_block(*node.get_update_states_block(), false, false);
                +
                3720  print_statement_block(*node.get_finalize_block(), false, false);
                +
                3721 }
                +
                3722 
                +
                3723 
                + +
                3725  // For_netcon should take the same arguments as net_receive and apply the operations
                +
                3726  // in the block to the weights of the netcons. Since all the weights are on the same vector,
                +
                3727  // weights, we have a mask of operations that we apply iteratively, advancing the offset
                +
                3728  // to the next netcon.
                +
                3729  const auto& args = node.get_parameters();
                +
                3730  RenameVisitor v;
                +
                3731  const auto& statement_block = node.get_statement_block();
                +
                3732  for (size_t i_arg = 0; i_arg < args.size(); ++i_arg) {
                +
                3733  // sanitize node_name since we want to substitute names like (*w) as they are
                +
                3734  auto old_name =
                +
                3735  std::regex_replace(args[i_arg]->get_node_name(), regex_special_chars, R"(\$&)");
                +
                3736  const auto& new_name = fmt::format("weights[{} + nt->_fornetcon_weight_perm[i]]", i_arg);
                +
                3737  v.set(old_name, new_name);
                +
                3738  statement_block->accept(v);
                +
                3739  }
                3740 
                -
                3741 
                - -
                3743  // For_netcon should take the same arguments as net_receive and apply the operations
                -
                3744  // in the block to the weights of the netcons. Since all the weights are on the same vector,
                -
                3745  // weights, we have a mask of operations that we apply iteratively, advancing the offset
                -
                3746  // to the next netcon.
                -
                3747  const auto& args = node.get_parameters();
                -
                3748  RenameVisitor v;
                -
                3749  const auto& statement_block = node.get_statement_block();
                -
                3750  for (size_t i_arg = 0; i_arg < args.size(); ++i_arg) {
                -
                3751  // sanitize node_name since we want to substitute names like (*w) as they are
                -
                3752  auto old_name =
                -
                3753  std::regex_replace(args[i_arg]->get_node_name(), regex_special_chars, R"(\$&)");
                -
                3754  const auto& new_name = fmt::format("weights[{} + nt->_fornetcon_weight_perm[i]]", i_arg);
                -
                3755  v.set(old_name, new_name);
                -
                3756  statement_block->accept(v);
                -
                3757  }
                -
                3758 
                -
                3759  const auto index =
                -
                3760  std::find_if(info.semantics.begin(), info.semantics.end(), [](const IndexSemantics& a) {
                -
                3761  return a.name == naming::FOR_NETCON_SEMANTIC;
                -
                3762  })->index;
                -
                3763 
                -
                3764  printer->fmt_text("const size_t offset = {}*pnodecount + id;", index);
                -
                3765  printer->add_newline();
                -
                3766  printer->add_line(
                -
                3767  "const size_t for_netcon_start = nt->_fornetcon_perm_indices[indexes[offset]];");
                -
                3768  printer->add_line(
                -
                3769  "const size_t for_netcon_end = nt->_fornetcon_perm_indices[indexes[offset] + 1];");
                -
                3770 
                -
                3771  printer->add_line("for (auto i = for_netcon_start; i < for_netcon_end; ++i) {");
                -
                3772  printer->increase_indent();
                -
                3773  print_statement_block(*statement_block, false, false);
                -
                3774  printer->decrease_indent();
                -
                3775 
                -
                3776  printer->add_line("}");
                -
                3777 }
                -
                3778 
                -
                3779 
                - -
                3781  printer->add_text(fmt::format("nrn_watch_activate(inst, id, pnodecount, {}, v, watch_remove)",
                -
                3782  current_watch_statement++));
                -
                3783 }
                -
                3784 
                -
                3785 } // namespace codegen
                -
                3786 } // namespace nmodl
                +
                3741  const auto index =
                +
                3742  std::find_if(info.semantics.begin(), info.semantics.end(), [](const IndexSemantics& a) {
                +
                3743  return a.name == naming::FOR_NETCON_SEMANTIC;
                +
                3744  })->index;
                +
                3745 
                +
                3746  printer->fmt_text("const size_t offset = {}*pnodecount + id;", index);
                +
                3747  printer->add_newline();
                +
                3748  printer->add_line(
                +
                3749  "const size_t for_netcon_start = nt->_fornetcon_perm_indices[indexes[offset]];");
                +
                3750  printer->add_line(
                +
                3751  "const size_t for_netcon_end = nt->_fornetcon_perm_indices[indexes[offset] + 1];");
                +
                3752 
                +
                3753  printer->add_line("for (auto i = for_netcon_start; i < for_netcon_end; ++i) {");
                +
                3754  printer->increase_indent();
                +
                3755  print_statement_block(*statement_block, false, false);
                +
                3756  printer->decrease_indent();
                +
                3757 
                +
                3758  printer->add_line("}");
                +
                3759 }
                +
                3760 
                +
                3761 
                + +
                3763  printer->add_text(fmt::format("nrn_watch_activate(inst, id, pnodecount, {}, v, watch_remove)",
                +
                3764  current_watch_statement++));
                +
                3765 }
                +
                3766 
                +
                3767 } // namespace codegen
                +
                3768 } // namespace nmodl
                -
                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.
                -
                void print_net_move_call(const ast::FunctionCall &node) override
                Print call to net_move.
                +
                void print_net_move_call(const ast::FunctionCall &node) override
                Print call to net_move.
                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.
                -
                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.
                +
                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_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
                +
                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.
                @@ -3985,32 +3967,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.
                -
                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.
                @@ -4018,47 +4000,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
                @@ -4069,100 +4051,98 @@
                @ 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
                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.
                +
                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.
                bool is_vdata
                if variable resides in vdata field of NrnThread typically true for bbcore pointer
                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.
                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
                -
                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.
                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_2main_8cpp_source.html b/html/doxygen/src_2main_8cpp_source.html index b244d771fb..2b2a1493a7 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.