From 2da62cfc5bab2070b7d9d6ad3022f23a2e15aa84 Mon Sep 17 00:00:00 2001 From: 1uc Date: Tue, 29 Oct 2024 14:03:28 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20BlueBrai?= =?UTF-8?q?n/nmodl@31a6c488548f2a94d71da5beb9d797424284600b=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .doctrees/environment.pickle | Bin 159128 -> 159128 bytes .../notebooks/nmodl-kinetic-schemes.ipynb | 56 +- .../notebooks/nmodl-python-tutorial.ipynb | 160 +- .../notebooks/nmodl-sympy-conductance.ipynb | 72 +- .../notebooks/nmodl-sympy-solver-cnexp.ipynb | 64 +- .../nmodl-sympy-solver-derivimplicit.ipynb | 32 +- .../notebooks/nmodl-sympy-solver-sparse.ipynb | 32 +- ...odegen_1_1_codegen_neuron_cpp_visitor.html | 74 +- .../codegen__helper__visitor_8cpp_source.html | 2 +- ...gen__neuron__cpp__visitor_8hpp_source.html | 74 +- doxygen/namespacenmodl_1_1codegen.html | 2 +- ...gen__neuron__cpp__visitor_8cpp_source.html | 1676 +++++++++-------- notebooks/nmodl-kinetic-schemes.ipynb | 56 +- notebooks/nmodl-python-tutorial.ipynb | 160 +- notebooks/nmodl-sympy-conductance.ipynb | 72 +- notebooks/nmodl-sympy-solver-cnexp.ipynb | 64 +- .../nmodl-sympy-solver-derivimplicit.ipynb | 32 +- notebooks/nmodl-sympy-solver-sparse.ipynb | 32 +- 18 files changed, 1332 insertions(+), 1328 deletions(-) diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 350985ec192adedf4325377e01950d9c3f7b9fec..a426e5a0d0b17be3825232c0a07ccfc3f9b86613 100644 GIT binary patch delta 10847 zcmZvid0bUh*T-F;C{76~4vAuy#0%zJ zS{jI6;e&>b4$pP8mtLPhd(kbZsW`W@eSJs0_{hYV)X11< zaXrYVeVxPvdsKX`!&6_F>u5OFo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;t(@F37ofkp(p>;U(_CPbR4EX@hD zP@pA&_Y`=aKx+j82((q89f6JtbRrNUfcz-kS%P$}n?Yn}Lxm^a2Weq4UF&54ncTRDJ z1->V6OM%-2?kVsCfu9ukFDkMAe-%Xj+2S|K^3VXXD~}9MdrZmC6nIYHr2>Buc&)%2 z0{OCz>h#H1^fvFD$s^Ndj&cW2vQ)JKoLj*5i-|1{^x|1(penv32>28Hoy1OH@fCk1 z^sP!S)-8VG|AKz#iSVnmodl::codegen::CodegenCppVisitor.

-

Definition at line 957 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 960 of file codegen_neuron_cpp_visitor.cpp.

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

-

Definition at line 2579 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2582 of file codegen_neuron_cpp_visitor.cpp.

@@ -2138,7 +2138,7 @@

-

Definition at line 2111 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2113 of file codegen_neuron_cpp_visitor.cpp.

@@ -2165,7 +2165,7 @@

-

Definition at line 2116 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2118 of file codegen_neuron_cpp_visitor.cpp.

@@ -2430,7 +2430,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2482 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2485 of file codegen_neuron_cpp_visitor.cpp.

@@ -2459,7 +2459,7 @@

Definition at line 2471 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2474 of file codegen_neuron_cpp_visitor.cpp.

@@ -2488,7 +2488,7 @@

Definition at line 2441 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2444 of file codegen_neuron_cpp_visitor.cpp.

@@ -2519,7 +2519,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2432 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2435 of file codegen_neuron_cpp_visitor.cpp.

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

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2389 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2392 of file codegen_neuron_cpp_visitor.cpp.

@@ -2650,7 +2650,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2261 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2264 of file codegen_neuron_cpp_visitor.cpp.

@@ -2680,7 +2680,7 @@

Definition at line 2419 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2422 of file codegen_neuron_cpp_visitor.cpp.

@@ -2837,7 +2837,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2539 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2542 of file codegen_neuron_cpp_visitor.cpp.

@@ -2868,7 +2868,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2411 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2414 of file codegen_neuron_cpp_visitor.cpp.

@@ -2945,7 +2945,7 @@

Definition at line 2331 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2334 of file codegen_neuron_cpp_visitor.cpp.

@@ -3065,7 +3065,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2313 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2316 of file codegen_neuron_cpp_visitor.cpp.

@@ -3275,7 +3275,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2490 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2493 of file codegen_neuron_cpp_visitor.cpp.

@@ -3333,7 +3333,7 @@

Definition at line 2323 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2326 of file codegen_neuron_cpp_visitor.cpp.

@@ -3587,7 +3587,7 @@

Definition at line 2348 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2351 of file codegen_neuron_cpp_visitor.cpp.

@@ -3625,7 +3625,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2533 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2536 of file codegen_neuron_cpp_visitor.cpp.

@@ -3655,7 +3655,7 @@

Definition at line 2626 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2629 of file codegen_neuron_cpp_visitor.cpp.

@@ -3693,7 +3693,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2520 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2523 of file codegen_neuron_cpp_visitor.cpp.

@@ -3722,7 +3722,7 @@

Definition at line 2604 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2607 of file codegen_neuron_cpp_visitor.cpp.

@@ -3749,7 +3749,7 @@

-

Definition at line 2586 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2589 of file codegen_neuron_cpp_visitor.cpp.

@@ -3814,7 +3814,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2495 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2498 of file codegen_neuron_cpp_visitor.cpp.

@@ -3873,7 +3873,7 @@

Definition at line 905 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 908 of file codegen_neuron_cpp_visitor.cpp.

@@ -4022,7 +4022,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2267 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2270 of file codegen_neuron_cpp_visitor.cpp.

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

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2156 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2159 of file codegen_neuron_cpp_visitor.cpp.

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

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2228 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2231 of file codegen_neuron_cpp_visitor.cpp.

@@ -4131,7 +4131,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2194 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2197 of file codegen_neuron_cpp_visitor.cpp.

@@ -4170,7 +4170,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2138 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2140 of file codegen_neuron_cpp_visitor.cpp.

@@ -4389,7 +4389,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 916 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 919 of file codegen_neuron_cpp_visitor.cpp.

@@ -4449,7 +4449,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 889 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 892 of file codegen_neuron_cpp_visitor.cpp.

@@ -4531,7 +4531,7 @@

nmodl::codegen::CodegenCppVisitor.

-

Definition at line 2399 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2402 of file codegen_neuron_cpp_visitor.cpp.

@@ -4802,7 +4802,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 2667 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2670 of file codegen_neuron_cpp_visitor.cpp.

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

nmodl::visitor::ConstVisitor.

-

Definition at line 2663 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2666 of file codegen_neuron_cpp_visitor.cpp.

@@ -4866,7 +4866,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 2658 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2661 of file codegen_neuron_cpp_visitor.cpp.

@@ -4898,7 +4898,7 @@

nmodl::visitor::ConstVisitor.

-

Definition at line 2654 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2657 of file codegen_neuron_cpp_visitor.cpp.

diff --git a/doxygen/codegen__helper__visitor_8cpp_source.html b/doxygen/codegen__helper__visitor_8cpp_source.html index 4338d9acf..f10954ad8 100644 --- a/doxygen/codegen__helper__visitor_8cpp_source.html +++ b/doxygen/codegen__helper__visitor_8cpp_source.html @@ -915,7 +915,7 @@
819 }
820 
-
822  info.vectorize = false;
+
822  info.vectorize = true;
823 }
824 
diff --git a/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html b/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html index d1a4fa2d6..891edcccb 100644 --- a/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html +++ b/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html @@ -908,18 +908,18 @@
void print_nrn_destructor() override
Print nrn_destructor function definition.
void print_global_var_external_access()
Print functions for EXTERNAL use.
-
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.
std::string py_function_signature(const std::string &function_or_procedure_name) const
Get the signature of the npy <func_or_proc_name> function.
Helper to represent information about index/int variables.
-
void print_nrn_cur() override
Print nrn_cur / current update function definition.
-
void print_macro_definitions()
Print all NEURON macros.
-
void print_function_definitions()
Print function and procedures prototype definitions.
+
void print_nrn_cur() override
Print nrn_cur / current update function definition.
+
void print_macro_definitions()
Print all NEURON macros.
+
void print_function_definitions()
Print function and procedures prototype definitions.
CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)
Constructs the C++ code generator visitor.
-
void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
+
void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
std::string hoc_py_wrapper_signature(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
Return the wrapper signature.
-
void print_neuron_includes()
Print includes from NEURON.
-
void print_codegen_routines_regular()
Anything not SUFFIX nothing.
+
void print_neuron_includes()
Print includes from NEURON.
+
void print_codegen_routines_regular()
Anything not SUFFIX nothing.
void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
std::string internal_method_arguments() override
Arguments for functions that are defined and used internally.
void print_nrn_alloc() override
Print nrn_alloc function definition.
@@ -927,8 +927,8 @@
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.
-
void visit_lon_diffuse(const ast::LonDiffuse &node) override
visit node of type ast::LonDiffuse
- +
void visit_lon_diffuse(const ast::LonDiffuse &node) override
visit node of type ast::LonDiffuse
+
std::string table_thread_function_name() const
Name of the threaded table checking function.
bool optimize_ion_variable_copies() const override
Check if ion variable copies should be avoided.
std::string hoc_function_name(const std::string &function_or_procedure_name) const
All functions and procedures need a hoc <func_or_proc_name> to be available to the HOC interpreter.
@@ -939,14 +939,14 @@
Implement classes for representing symbol table at block and file scope.
std::string backend_name() const override
Name of the code generation backend.
std::string process_verbatim_text(std::string const &text) override
Process a verbatim block for possible variable renaming.
- +
void print_entrypoint_setup_code_from_prop()
Prints setup code for entrypoints NEURON.
void print_global_param_default_values()
Print global struct with default value of RANGE PARAMETERs.
ParamVector ldifusfunc1_parameters() const
Parameters for what NEURON calls ldifusfunc1_t.
-
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
-
void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
-
void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
-
void print_net_move_call(const ast::FunctionCall &node) override
Print call to net_move.
+
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
+
void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
+
void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
+
void print_net_move_call(const ast::FunctionCall &node) override
Print call to net_move.
std::string thread_variable_name(const ThreadVariableInfo &var_info, bool use_instance=true) const
Determine the C++ string to print for thread variables.
void print_nrn_state() override
Print nrn_state / state update function definition.
void print_initial_block(const ast::InitialBlock *node)
Print the initial block.
@@ -954,9 +954,9 @@
void print_global_function_common_code(BlockType type, const std::string &function_name="") override
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
std::string float_variable_name(const SymbolType &symbol, bool use_instance) const override
Determine the name of a float variable given its symbol.
-
void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
- -
ParamVector functor_params() override
The parameters of the Newton solver "functor".
+
void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
+ +
ParamVector functor_params() override
The parameters of the Newton solver "functor".
void print_mechanism_register_regular()
Function body for anything not SUFFIX nothing.
void print_mechanism_register_nothing()
Function body for SUFFIX nothing.
Visitor for printing C++ code compatible with legacy api of CoreNEURON
@@ -965,16 +965,16 @@
Represents a INITIAL block in the NMODL.
void print_point_process_function_definitions()
Print POINT_PROCESS related functions Wrap external NEURON functions related to POINT_PROCESS mechani...
-
void print_net_init()
Print NET_RECEIVE{ INITIAL{ ...
+
void print_net_init()
Print NET_RECEIVE{ INITIAL{ ...
Represent WATCH statement in NMODL.
void print_neuron_global_variable_declarations()
Print extern declarations for neuron global variables.
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.
+
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.
InterpreterWrapper
Enum to switch between HOC and Python wrappers for functions and procedures defined in mechanisms.
void print_global_variables_for_hoc() override
Print byte arrays that register scalar and vector variables for hoc interface.
-
void print_standard_includes() override
Print standard C/C++ includes.
+
void print_standard_includes() override
Print standard C/C++ includes.
std::vector< ThreadVariableInfo > codegen_thread_variables
GLOBAL variables in THREADSAFE MOD files that are not read-only are converted to thread variables.
void print_mechanism_range_var_structure(bool print_initializers) override
Print the structure that wraps all range and int variables required for the NMODL.
Extracts information required for LONGITUDINAL_DIFFUSION for each KINETIC block.
@@ -983,20 +983,20 @@
std::string hoc_function_signature(const std::string &function_or_procedure_name) const
Get the signature of the hoc <func_or_proc_name> function.
std::pair< ParamVector, ParamVector > function_table_parameters(const ast::FunctionTableBlock &) override
Parameters of the function itself "{}" and "table_{}".
void print_thread_variables_structure(bool print_initializers)
Print the data structure used to access thread variables.
-
void visit_longitudinal_diffusion_block(const ast::LongitudinalDiffusionBlock &node) override
visit node of type ast::LongitudinalDiffusionBlock
-
void print_function_table_call(const ast::FunctionCall &node) override
Print special code when calling FUNCTION_TABLEs.
-
void print_compute_functions() override
Print all compute functions for every backend.
+
void visit_longitudinal_diffusion_block(const ast::LongitudinalDiffusionBlock &node) override
visit node of type ast::LongitudinalDiffusionBlock
+
void print_function_table_call(const ast::FunctionCall &node) override
Print special code when calling FUNCTION_TABLEs.
+
void print_compute_functions() override
Print all compute functions for every backend.
void print_thread_memory_callbacks()
Print thread variable (de-)initialization functions.
void print_entrypoint_setup_code_from_memb_list()
Prints setup code for entrypoints from NEURON.
-
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.
void print_mechanism_register() override
Print the mechanism registration function.
void print_nrn_jacob()
Print nrn_jacob function definition.
- +
Various types to store code generation specific information.
-
void print_fast_imem_calculation() override
Print fast membrane current calculation code.
-
void print_data_structures(bool print_initializers) override
Print all classes.
-
void print_sdlists_init(bool print_initializers) override
+
void print_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
const std::string external_method_arguments() noexcept override
Arguments for external functions called from generated code.
Represent LONGITUDINAL_DIFFUSION statement in NMODL.
Definition: lon_diffuse.hpp:39
std::string py_function_name(const std::string &function_or_procedure_name) const
In non POINT_PROCESS mechanisms all functions and procedures need a py <func_or_proc_name> to be avai...
@@ -1009,24 +1009,24 @@
void print_setdata_functions()
Print NEURON functions related to setting global variables of the mechanism.
std::string get_name(const std::shared_ptr< symtab::Symbol > &sym)
Represents ion write statement during code generation.
-
void print_mechanism_variables_macros()
Print mechanism variables' related macros.
+
void print_mechanism_variables_macros()
Print mechanism variables' related macros.
Visitor for printing C++ code compatible with legacy api of NEURON
void print_nrn_constructor() override
Print nrn_constructor function definition.
Implement logger based on spdlog library.
parser::NmodlParser::symbol_type SymbolType
Definition: main_nmodl.cpp:33
BlockType
Helper to represent various block types.
size_t index
There index global variables ahead of this one.
-
void print_headers_include() override
Print all includes.
+
void print_headers_include() override
Print all includes.
void print_check_table_entrypoint()
Print all check_* function declarations.
const ParamVector 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
+
void visit_for_netcon(const ast::ForNetcon &node) override
visit node of type ast::ForNetcon
void print_function_or_procedure(const ast::Block &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &specifiers={ CppObjectSpecifier::Inline}) override
Print nmodl function or procedure (common code)
const std::shared_ptr< symtab::Symbol > symbol
-
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
+
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
int position_of_float_var(const std::string &name) const override
Determine the position in the data array for a given float variable.
std::string get_variable_name(const std::string &name, bool use_instance=true) const override
Determine variable name in the structure of mechanism properties.
void print_hoc_py_wrapper_call_impl(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
Print the code that calls the impl from the HOC/Py wrapper.
-
void print_codegen_routines_nothing()
SUFFIX nothing is special.
+
void print_codegen_routines_nothing()
SUFFIX nothing is special.
Visitor for printing C++ code compatible with legacy api of CoreNEURON
void print_make_node_data() const
Print make_*_node_data.
std::string simulator_name() override
Name of the simulator the code was generated for.
@@ -1036,18 +1036,18 @@
ParamVector ldifusfunc3_parameters() const
Parameters for what NEURON calls ldifusfunc3_t.
void print_net_receive_registration()
Print code to register the call-back for the NET_RECEIVE block.
-
void print_codegen_routines() override
Print entry point to code generation.
+
void print_codegen_routines() override
Print entry point to code generation.
void append_conc_write_statements(std::vector< ShadowUseStatement > &statements, const Ion &ion, const std::string &concentration) override
Generate Function call statement for nrn_wrote_conc.
void print_longitudinal_diffusion_callbacks()
Prints the callbacks required for LONGITUDINAL_DIFFUSION.
ParamVector internal_method_parameters() override
Parameters for internally defined functions.
void print_hoc_py_wrapper(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
Print the wrapper for calling FUNCION/PROCEDURES from HOC/Py.
- -
void print_net_receive()
Print net_receive call-back.
+ +
void print_net_receive()
Print net_receive call-back.
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_hoc_py_wrapper_setup(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
Print the setup code for HOC/Py wrapper.
std::string namespace_name() override
Name of "our" namespace.
-
void print_global_macros()
Print NEURON global variable macros.
+
void print_global_macros()
Print NEURON global variable macros.
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
Concrete visitor for all AST classes.
diff --git a/doxygen/namespacenmodl_1_1codegen.html b/doxygen/namespacenmodl_1_1codegen.html index 73a086462..9622ff06b 100644 --- a/doxygen/namespacenmodl_1_1codegen.html +++ b/doxygen/namespacenmodl_1_1codegen.html @@ -467,7 +467,7 @@

x[id] = _args[1];

So, the R in AST needs to be renamed with _args[1].

-

Definition at line 2564 of file codegen_neuron_cpp_visitor.cpp.

+

Definition at line 2567 of file codegen_neuron_cpp_visitor.cpp.

diff --git a/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html b/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html index a9f5b3046..146c89a82 100644 --- a/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html +++ b/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html @@ -891,170 +891,170 @@
795 
796 std::string CodegenNeuronCppVisitor::get_variable_name(const std::string& name,
797  bool use_instance) const {
-
798  const std::string& varname = update_if_ion_variable_name(name);
-
799 
-
800  auto name_comparator = [&varname](const auto& sym) { return varname == get_name(sym); };
-
801 
-
802  if (name == naming::POINT_PROCESS_VARIABLE) {
-
803  if (printing_net_receive) {
-
804  // In net_receive blocks, the point process is passed in as an
-
805  // argument called:
-
806  return "_pnt";
-
807  }
-
808  // The "integer variable" branch will pick up the correct `_ppvar` when
-
809  // not printing a NET_RECEIVE block.
-
810  }
-
811 
-
812  if (stringutils::starts_with(name, "_ptable_")) {
-
813  return fmt::format("{}.{}", global_struct_instance(), name);
-
814  }
-
815 
-
816  // float variable
-
817  auto f = std::find_if(codegen_float_variables.begin(),
-
818  codegen_float_variables.end(),
-
819  name_comparator);
-
820  if (f != codegen_float_variables.end()) {
-
821  return float_variable_name(*f, use_instance);
-
822  }
-
823 
-
824  // integer variable
-
825  auto i =
-
826  std::find_if(codegen_int_variables.begin(), codegen_int_variables.end(), name_comparator);
-
827  if (i != codegen_int_variables.end()) {
-
828  return int_variable_name(*i, varname, use_instance);
-
829  }
-
830 
-
831  // thread variable
-
832  auto t = std::find_if(codegen_thread_variables.begin(),
-
833  codegen_thread_variables.end(),
-
834  name_comparator);
-
835  if (t != codegen_thread_variables.end()) {
-
836  return thread_variable_name(*t, use_instance);
-
837  }
-
838 
-
839  // global variable
-
840  auto g = std::find_if(codegen_global_variables.begin(),
-
841  codegen_global_variables.end(),
-
842  name_comparator);
-
843  if (g != codegen_global_variables.end()) {
-
844  return global_variable_name(*g, use_instance);
-
845  }
-
846 
-
847  if (varname == naming::NTHREAD_DT_VARIABLE) {
-
848  return std::string("nt->_") + naming::NTHREAD_DT_VARIABLE;
-
849  }
-
850 
-
851  if (varname == naming::NTHREAD_T_VARIABLE) {
-
852  return std::string("nt->_") + naming::NTHREAD_T_VARIABLE;
-
853  }
-
854 
-
855  // external variable
-
856  auto e = std::find_if(info.external_variables.begin(),
-
857  info.external_variables.end(),
-
858  name_comparator);
-
859  if (e != info.external_variables.end()) {
-
860  return fmt::format("{}()", varname);
-
861  }
-
862 
-
863  auto const iter =
-
864  std::find_if(info.neuron_global_variables.begin(),
-
865  info.neuron_global_variables.end(),
-
866  [&varname](auto const& entry) { return entry.first->get_name() == varname; });
-
867  if (iter != info.neuron_global_variables.end()) {
-
868  std::string ret;
-
869  if (use_instance) {
-
870  ret = "*(inst.";
-
871  }
-
872  ret.append(varname);
-
873  if (use_instance) {
-
874  ret.append(")");
-
875  }
-
876  return ret;
-
877  }
-
878 
-
879  // otherwise return original name
-
880  return varname;
-
881 }
-
882 
-
883 
-
884 /****************************************************************************************/
-
885 /* Main printing routines for code generation */
-
886 /****************************************************************************************/
-
887 
-
888 
- -
890  printer->add_newline();
-
891  printer->add_multi_line(R"CODE(
-
892  #include <Eigen/Dense>
-
893  #include <Eigen/LU>
-
894  #include <math.h>
-
895  #include <stdio.h>
-
896  #include <stdlib.h>
-
897  #include <vector>
-
898  )CODE");
-
899  if (info.eigen_newton_solver_exist) {
-
900  printer->add_multi_line(nmodl::solvers::newton_hpp);
-
901  }
-
902 }
-
903 
-
904 
- -
906  printer->add_newline();
-
907  printer->add_multi_line(R"CODE(
-
908  #include "mech_api.h"
-
909  #include "neuron/cache/mechanism_range.hpp"
-
910  #include "nrniv_mf.h"
-
911  #include "section_fwd.hpp"
-
912  )CODE");
-
913 }
-
914 
-
915 
-
916 void CodegenNeuronCppVisitor::print_sdlists_init(bool /* print_initializers */) {
-
917  /// _initlists() should only be called once by the mechanism registration function
-
918  /// (_<mod_file>_reg())
-
919  printer->add_newline(2);
-
920  printer->push_block("static void _initlists()");
-
921  for (auto i = 0; i < info.prime_variables_by_order.size(); ++i) {
-
922  const auto& prime_var = info.prime_variables_by_order[i];
-
923  /// TODO: Something similar needs to happen for slist/dlist2 but I don't know their usage at
-
924  // the moment
-
925  /// TODO: We have to do checks and add errors similar to nocmodl in the
-
926  // SemanticAnalysisVisitor
-
927  if (prime_var->is_array()) {
-
928  /// TODO: Needs a for loop here. Look at
-
929  // https://github.com/neuronsimulator/nrn/blob/df001a436bcb4e23d698afe66c2a513819a6bfe8/src/nmodl/deriv.cpp#L524
-
930  /// TODO: Also needs a test
-
931  printer->fmt_push_block("for (int _i = 0; _i < {}; ++_i)", prime_var->get_length());
-
932  printer->fmt_line("/* {}[{}] */", prime_var->get_name(), prime_var->get_length());
-
933  printer->fmt_line("_slist1[{}+_i] = {{{}, _i}};",
-
934  i,
-
935  position_of_float_var(prime_var->get_name()));
-
936  const auto prime_var_deriv_name = "D" + prime_var->get_name();
-
937  printer->fmt_line("/* {}[{}] */", prime_var_deriv_name, prime_var->get_length());
-
938  printer->fmt_line("_dlist1[{}+_i] = {{{}, _i}};",
-
939  i,
-
940  position_of_float_var(prime_var_deriv_name));
-
941  printer->pop_block();
-
942  } else {
-
943  printer->fmt_line("/* {} */", prime_var->get_name());
-
944  printer->fmt_line("_slist1[{}] = {{{}, 0}};",
-
945  i,
-
946  position_of_float_var(prime_var->get_name()));
-
947  const auto prime_var_deriv_name = "D" + prime_var->get_name();
-
948  printer->fmt_line("/* {} */", prime_var_deriv_name);
-
949  printer->fmt_line("_dlist1[{}] = {{{}, 0}};",
-
950  i,
-
951  position_of_float_var(prime_var_deriv_name));
-
952  }
-
953  }
-
954  printer->pop_block();
-
955 }
-
956 
- -
958  auto params = internal_method_parameters();
-
959  if (!info.artificial_cell) {
-
960  params.push_back({"", "double", "", "v"});
-
961  }
+
798  std::string varname = update_if_ion_variable_name(name);
+
799  if (!info.artificial_cell && varname == "v") {
+ +
801  }
+
802 
+
803  auto name_comparator = [&varname](const auto& sym) { return varname == get_name(sym); };
+
804 
+
805  if (name == naming::POINT_PROCESS_VARIABLE) {
+
806  if (printing_net_receive) {
+
807  // In net_receive blocks, the point process is passed in as an
+
808  // argument called:
+
809  return "_pnt";
+
810  }
+
811  // The "integer variable" branch will pick up the correct `_ppvar` when
+
812  // not printing a NET_RECEIVE block.
+
813  }
+
814 
+
815  if (stringutils::starts_with(name, "_ptable_")) {
+
816  return fmt::format("{}.{}", global_struct_instance(), name);
+
817  }
+
818 
+
819  // float variable
+
820  auto f = std::find_if(codegen_float_variables.begin(),
+
821  codegen_float_variables.end(),
+
822  name_comparator);
+
823  if (f != codegen_float_variables.end()) {
+
824  return float_variable_name(*f, use_instance);
+
825  }
+
826 
+
827  // integer variable
+
828  auto i =
+
829  std::find_if(codegen_int_variables.begin(), codegen_int_variables.end(), name_comparator);
+
830  if (i != codegen_int_variables.end()) {
+
831  return int_variable_name(*i, varname, use_instance);
+
832  }
+
833 
+
834  // thread variable
+
835  auto t = std::find_if(codegen_thread_variables.begin(),
+
836  codegen_thread_variables.end(),
+
837  name_comparator);
+
838  if (t != codegen_thread_variables.end()) {
+
839  return thread_variable_name(*t, use_instance);
+
840  }
+
841 
+
842  // global variable
+
843  auto g = std::find_if(codegen_global_variables.begin(),
+
844  codegen_global_variables.end(),
+
845  name_comparator);
+
846  if (g != codegen_global_variables.end()) {
+
847  return global_variable_name(*g, use_instance);
+
848  }
+
849 
+
850  if (varname == naming::NTHREAD_DT_VARIABLE) {
+
851  return std::string("nt->_") + naming::NTHREAD_DT_VARIABLE;
+
852  }
+
853 
+
854  if (varname == naming::NTHREAD_T_VARIABLE) {
+
855  return std::string("nt->_") + naming::NTHREAD_T_VARIABLE;
+
856  }
+
857 
+
858  // external variable
+
859  auto e = std::find_if(info.external_variables.begin(),
+
860  info.external_variables.end(),
+
861  name_comparator);
+
862  if (e != info.external_variables.end()) {
+
863  return fmt::format("{}()", varname);
+
864  }
+
865 
+
866  auto const iter =
+
867  std::find_if(info.neuron_global_variables.begin(),
+
868  info.neuron_global_variables.end(),
+
869  [&varname](auto const& entry) { return entry.first->get_name() == varname; });
+
870  if (iter != info.neuron_global_variables.end()) {
+
871  std::string ret;
+
872  if (use_instance) {
+
873  ret = "*(inst.";
+
874  }
+
875  ret.append(varname);
+
876  if (use_instance) {
+
877  ret.append(")");
+
878  }
+
879  return ret;
+
880  }
+
881 
+
882  // otherwise return original name
+
883  return varname;
+
884 }
+
885 
+
886 
+
887 /****************************************************************************************/
+
888 /* Main printing routines for code generation */
+
889 /****************************************************************************************/
+
890 
+
891 
+ +
893  printer->add_newline();
+
894  printer->add_multi_line(R"CODE(
+
895  #include <Eigen/Dense>
+
896  #include <Eigen/LU>
+
897  #include <math.h>
+
898  #include <stdio.h>
+
899  #include <stdlib.h>
+
900  #include <vector>
+
901  )CODE");
+
902  if (info.eigen_newton_solver_exist) {
+
903  printer->add_multi_line(nmodl::solvers::newton_hpp);
+
904  }
+
905 }
+
906 
+
907 
+ +
909  printer->add_newline();
+
910  printer->add_multi_line(R"CODE(
+
911  #include "mech_api.h"
+
912  #include "neuron/cache/mechanism_range.hpp"
+
913  #include "nrniv_mf.h"
+
914  #include "section_fwd.hpp"
+
915  )CODE");
+
916 }
+
917 
+
918 
+
919 void CodegenNeuronCppVisitor::print_sdlists_init(bool /* print_initializers */) {
+
920  /// _initlists() should only be called once by the mechanism registration function
+
921  /// (_<mod_file>_reg())
+
922  printer->add_newline(2);
+
923  printer->push_block("static void _initlists()");
+
924  for (auto i = 0; i < info.prime_variables_by_order.size(); ++i) {
+
925  const auto& prime_var = info.prime_variables_by_order[i];
+
926  /// TODO: Something similar needs to happen for slist/dlist2 but I don't know their usage at
+
927  // the moment
+
928  /// TODO: We have to do checks and add errors similar to nocmodl in the
+
929  // SemanticAnalysisVisitor
+
930  if (prime_var->is_array()) {
+
931  /// TODO: Needs a for loop here. Look at
+
932  // https://github.com/neuronsimulator/nrn/blob/df001a436bcb4e23d698afe66c2a513819a6bfe8/src/nmodl/deriv.cpp#L524
+
933  /// TODO: Also needs a test
+
934  printer->fmt_push_block("for (int _i = 0; _i < {}; ++_i)", prime_var->get_length());
+
935  printer->fmt_line("/* {}[{}] */", prime_var->get_name(), prime_var->get_length());
+
936  printer->fmt_line("_slist1[{}+_i] = {{{}, _i}};",
+
937  i,
+
938  position_of_float_var(prime_var->get_name()));
+
939  const auto prime_var_deriv_name = "D" + prime_var->get_name();
+
940  printer->fmt_line("/* {}[{}] */", prime_var_deriv_name, prime_var->get_length());
+
941  printer->fmt_line("_dlist1[{}+_i] = {{{}, _i}};",
+
942  i,
+
943  position_of_float_var(prime_var_deriv_name));
+
944  printer->pop_block();
+
945  } else {
+
946  printer->fmt_line("/* {} */", prime_var->get_name());
+
947  printer->fmt_line("_slist1[{}] = {{{}, 0}};",
+
948  i,
+
949  position_of_float_var(prime_var->get_name()));
+
950  const auto prime_var_deriv_name = "D" + prime_var->get_name();
+
951  printer->fmt_line("/* {} */", prime_var_deriv_name);
+
952  printer->fmt_line("_dlist1[{}] = {{{}, 0}};",
+
953  i,
+
954  position_of_float_var(prime_var_deriv_name));
+
955  }
+
956  }
+
957  printer->pop_block();
+
958 }
+
959 
+ +
961  auto params = internal_method_parameters();
962 
963  return params;
964 }
@@ -1918,7 +1918,7 @@
1822  printer->add_line("auto* _ppvar = _ml_arg->pdata[id];");
1823  if (!info.artificial_cell) {
1824  printer->add_line("int node_id = node_data.nodeindices[id];");
-
1825  printer->add_line("auto v = node_data.node_voltages[node_id];");
+
1825  printer->add_line("inst.v_unused[id] = node_data.node_voltages[node_id];");
1826  }
1827 
1828  print_rename_state_vars();
@@ -2165,655 +2165,658 @@
2069  printer->push_block("for (int id = 0; id < nodecount; id++)");
2070  printer->add_line("int node_id = node_data.nodeindices[id];");
2071  printer->add_line("auto* _ppvar = _ml_arg->pdata[id];");
-
2072  printer->add_line("auto v = node_data.node_voltages[node_id];");
-
2073 
-
2074  /**
-
2075  * \todo Eigen solver node also emits IonCurVar variable in the functor
-
2076  * but that shouldn't update ions in derivative block
-
2077  */
-
2078  if (ion_variable_struct_required()) {
-
2079  throw std::runtime_error("Not implemented.");
-
2080  }
-
2081 
-
2082  auto read_statements = ion_read_statements(BlockType::State);
-
2083  for (auto& statement: read_statements) {
-
2084  printer->add_line(statement);
-
2085  }
-
2086 
-
2087  if (info.nrn_state_block) {
-
2088  info.nrn_state_block->visit_children(*this);
-
2089  }
-
2090 
-
2091  if (info.currents.empty() && info.breakpoint_node != nullptr) {
-
2092  auto block = info.breakpoint_node->get_statement_block();
-
2093  print_statement_block(*block, false, false);
-
2094  }
-
2095 
-
2096  const auto& write_statements = ion_write_statements(BlockType::State);
-
2097  for (auto& statement: write_statements) {
-
2098  const auto& text = process_shadow_update_statement(statement, BlockType::State);
-
2099  printer->add_line(text);
-
2100  }
-
2101 
-
2102  printer->pop_block();
-
2103  printer->pop_block();
-
2104 }
-
2105 
-
2106 
-
2107 /****************************************************************************************/
-
2108 /* Print nrn_cur related routines */
+
2072  if (!info.artificial_cell) {
+
2073  printer->add_line("inst.v_unused[id] = node_data.node_voltages[node_id];");
+
2074  }
+
2075 
+
2076  /**
+
2077  * \todo Eigen solver node also emits IonCurVar variable in the functor
+
2078  * but that shouldn't update ions in derivative block
+
2079  */
+
2080  if (ion_variable_struct_required()) {
+
2081  throw std::runtime_error("Not implemented.");
+
2082  }
+
2083 
+
2084  auto read_statements = ion_read_statements(BlockType::State);
+
2085  for (auto& statement: read_statements) {
+
2086  printer->add_line(statement);
+
2087  }
+
2088 
+
2089  if (info.nrn_state_block) {
+
2090  info.nrn_state_block->visit_children(*this);
+
2091  }
+
2092 
+
2093  if (info.currents.empty() && info.breakpoint_node != nullptr) {
+
2094  auto block = info.breakpoint_node->get_statement_block();
+
2095  print_statement_block(*block, false, false);
+
2096  }
+
2097 
+
2098  const auto& write_statements = ion_write_statements(BlockType::State);
+
2099  for (auto& statement: write_statements) {
+
2100  const auto& text = process_shadow_update_statement(statement, BlockType::State);
+
2101  printer->add_line(text);
+
2102  }
+
2103 
+
2104  printer->pop_block();
+
2105  printer->pop_block();
+
2106 }
+
2107 
+
2108 
2109 /****************************************************************************************/
-
2110 
- -
2112  return get_arg_str(nrn_current_parameters());
-
2113 }
-
2114 
-
2115 
- -
2117  if (ion_variable_struct_required()) {
-
2118  throw std::runtime_error("Not implemented.");
-
2119  }
-
2120 
-
2121  ParamVector params = {{"", "_nrn_mechanism_cache_range&", "", "_lmc"},
-
2122  {"", "NrnThread*", "", "nt"},
-
2123  {"", "Datum*", "", "_ppvar"},
-
2124  {"", "Datum*", "", "_thread"}};
-
2125 
-
2126  if (info.thread_callback_register) {
-
2127  auto type_name = fmt::format("{}&", thread_variables_struct());
-
2128  params.emplace_back("", type_name, "", "_thread_vars");
-
2129  }
-
2130  params.emplace_back("", "size_t", "", "id");
-
2131  params.emplace_back("", fmt::format("{}&", instance_struct()), "", "inst");
-
2132  params.emplace_back("", fmt::format("{}&", node_data_struct()), "", "node_data");
-
2133  params.emplace_back("", "double", "", "v");
-
2134  return params;
-
2135 }
-
2136 
-
2137 
- -
2139  const auto& args = nrn_current_parameters();
-
2140  const auto& block = node.get_statement_block();
-
2141  printer->add_newline(2);
-
2142  printer->fmt_push_block("static inline double nrn_current_{}({})",
-
2143  info.mod_suffix,
-
2144  get_parameter_str(args));
-
2145  printer->add_line("double current = 0.0;");
-
2146  print_statement_block(*block, false, false);
-
2147  for (auto& current: info.currents) {
-
2148  const auto& name = get_variable_name(current);
-
2149  printer->fmt_line("current += {};", name);
-
2150  }
-
2151  printer->add_line("return current;");
-
2152  printer->pop_block();
-
2153 }
-
2154 
-
2155 
- -
2157  const auto& block = node.get_statement_block();
-
2158  print_statement_block(*block, false, false);
-
2159  if (!info.currents.empty()) {
-
2160  std::string sum;
-
2161  for (const auto& current: info.currents) {
-
2162  auto var = breakpoint_current(current);
-
2163  sum += get_variable_name(var);
-
2164  if (&current != &info.currents.back()) {
-
2165  sum += "+";
-
2166  }
-
2167  }
-
2168  printer->fmt_line("double rhs = {};", sum);
-
2169  }
-
2170 
-
2171  std::string sum;
-
2172  for (const auto& conductance: info.conductances) {
-
2173  auto var = breakpoint_current(conductance.variable);
-
2174  sum += get_variable_name(var);
-
2175  if (&conductance != &info.conductances.back()) {
-
2176  sum += "+";
-
2177  }
-
2178  }
-
2179  printer->fmt_line("double g = {};", sum);
-
2180 
-
2181  for (const auto& conductance: info.conductances) {
-
2182  if (!conductance.ion.empty()) {
-
2183  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + conductance.ion +
-
2184  "dv";
-
2185  const auto& rhs = get_variable_name(conductance.variable);
-
2186  const ShadowUseStatement statement{lhs, "+=", rhs};
-
2187  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
-
2188  printer->add_line(text);
-
2189  }
-
2190  }
-
2191 }
-
2192 
-
2193 
- -
2195  printer->fmt_line("double I1 = nrn_current_{}({}+0.001);",
-
2196  info.mod_suffix,
-
2197  nrn_current_arguments());
-
2198  for (auto& ion: info.ions) {
-
2199  for (auto& var: ion.writes) {
-
2200  if (ion.is_ionic_current(var)) {
-
2201  const auto& name = get_variable_name(var);
-
2202  printer->fmt_line("double di{} = {};", ion.name, name);
-
2203  }
-
2204  }
-
2205  }
-
2206  printer->fmt_line("double I0 = nrn_current_{}({});", info.mod_suffix, nrn_current_arguments());
-
2207  printer->add_line("double rhs = I0;");
-
2208 
-
2209  printer->add_line("double g = (I1-I0)/0.001;");
-
2210  for (auto& ion: info.ions) {
-
2211  for (auto& var: ion.writes) {
-
2212  if (ion.is_ionic_current(var)) {
-
2213  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + ion.name + "dv";
-
2214  auto rhs = fmt::format("(di{}-{})/0.001", ion.name, get_variable_name(var));
-
2215  if (info.point_process) {
-
2216  auto area = get_variable_name(naming::NODE_AREA_VARIABLE);
-
2217  rhs += fmt::format("*1.e2/{}", area);
-
2218  }
-
2219  const ShadowUseStatement statement{lhs, "+=", rhs};
-
2220  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
-
2221  printer->add_line(text);
-
2222  }
-
2223  }
-
2224  }
-
2225 }
-
2226 
-
2227 
- -
2229  printer->add_line("int node_id = node_data.nodeindices[id];");
-
2230  printer->add_line("double v = node_data.node_voltages[node_id];");
-
2231  printer->add_line("auto* _ppvar = _ml_arg->pdata[id];");
-
2232  const auto& read_statements = ion_read_statements(BlockType::Equation);
-
2233  for (auto& statement: read_statements) {
-
2234  printer->add_line(statement);
-
2235  }
-
2236 
-
2237  if (info.conductances.empty()) {
-
2238  print_nrn_cur_non_conductance_kernel();
-
2239  } else {
-
2240  print_nrn_cur_conductance_kernel(node);
-
2241  }
-
2242 
-
2243  const auto& write_statements = ion_write_statements(BlockType::Equation);
-
2244  for (auto& statement: write_statements) {
-
2245  auto text = process_shadow_update_statement(statement, BlockType::Equation);
-
2246  printer->add_line(text);
-
2247  }
-
2248 
-
2249  if (info.point_process) {
-
2250  const auto& area = get_variable_name(naming::NODE_AREA_VARIABLE);
-
2251  printer->fmt_line("double mfactor = 1.e2/{};", area);
-
2252  printer->add_line("g = g*mfactor;");
-
2253  printer->add_line("rhs = rhs*mfactor;");
-
2254  }
-
2255 
-
2256  // print_g_unused();
-
2257 }
+
2110 /* Print nrn_cur related routines */
+
2111 /****************************************************************************************/
+
2112 
+ +
2114  return get_arg_str(nrn_current_parameters());
+
2115 }
+
2116 
+
2117 
+ +
2119  if (ion_variable_struct_required()) {
+
2120  throw std::runtime_error("Not implemented.");
+
2121  }
+
2122 
+
2123  ParamVector params = {{"", "_nrn_mechanism_cache_range&", "", "_lmc"},
+
2124  {"", "NrnThread*", "", "nt"},
+
2125  {"", "Datum*", "", "_ppvar"},
+
2126  {"", "Datum*", "", "_thread"}};
+
2127 
+
2128  if (info.thread_callback_register) {
+
2129  auto type_name = fmt::format("{}&", thread_variables_struct());
+
2130  params.emplace_back("", type_name, "", "_thread_vars");
+
2131  }
+
2132  params.emplace_back("", "size_t", "", "id");
+
2133  params.emplace_back("", fmt::format("{}&", instance_struct()), "", "inst");
+
2134  params.emplace_back("", fmt::format("{}&", node_data_struct()), "", "node_data");
+
2135  params.emplace_back("", "double", "", "v");
+
2136  return params;
+
2137 }
+
2138 
+
2139 
+ +
2141  const auto& args = nrn_current_parameters();
+
2142  const auto& block = node.get_statement_block();
+
2143  printer->add_newline(2);
+
2144  printer->fmt_push_block("static inline double nrn_current_{}({})",
+
2145  info.mod_suffix,
+
2146  get_parameter_str(args));
+
2147  printer->add_line("inst.v_unused[id] = v;");
+
2148  printer->add_line("double current = 0.0;");
+
2149  print_statement_block(*block, false, false);
+
2150  for (auto& current: info.currents) {
+
2151  const auto& name = get_variable_name(current);
+
2152  printer->fmt_line("current += {};", name);
+
2153  }
+
2154  printer->add_line("return current;");
+
2155  printer->pop_block();
+
2156 }
+
2157 
+
2158 
+ +
2160  const auto& block = node.get_statement_block();
+
2161  print_statement_block(*block, false, false);
+
2162  if (!info.currents.empty()) {
+
2163  std::string sum;
+
2164  for (const auto& current: info.currents) {
+
2165  auto var = breakpoint_current(current);
+
2166  sum += get_variable_name(var);
+
2167  if (&current != &info.currents.back()) {
+
2168  sum += "+";
+
2169  }
+
2170  }
+
2171  printer->fmt_line("double rhs = {};", sum);
+
2172  }
+
2173 
+
2174  std::string sum;
+
2175  for (const auto& conductance: info.conductances) {
+
2176  auto var = breakpoint_current(conductance.variable);
+
2177  sum += get_variable_name(var);
+
2178  if (&conductance != &info.conductances.back()) {
+
2179  sum += "+";
+
2180  }
+
2181  }
+
2182  printer->fmt_line("double g = {};", sum);
+
2183 
+
2184  for (const auto& conductance: info.conductances) {
+
2185  if (!conductance.ion.empty()) {
+
2186  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + conductance.ion +
+
2187  "dv";
+
2188  const auto& rhs = get_variable_name(conductance.variable);
+
2189  const ShadowUseStatement statement{lhs, "+=", rhs};
+
2190  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
+
2191  printer->add_line(text);
+
2192  }
+
2193  }
+
2194 }
+
2195 
+
2196 
+ +
2198  printer->fmt_line("double I1 = nrn_current_{}({}+0.001);",
+
2199  info.mod_suffix,
+
2200  nrn_current_arguments());
+
2201  for (auto& ion: info.ions) {
+
2202  for (auto& var: ion.writes) {
+
2203  if (ion.is_ionic_current(var)) {
+
2204  const auto& name = get_variable_name(var);
+
2205  printer->fmt_line("double di{} = {};", ion.name, name);
+
2206  }
+
2207  }
+
2208  }
+
2209  printer->fmt_line("double I0 = nrn_current_{}({});", info.mod_suffix, nrn_current_arguments());
+
2210  printer->add_line("double rhs = I0;");
+
2211 
+
2212  printer->add_line("double g = (I1-I0)/0.001;");
+
2213  for (auto& ion: info.ions) {
+
2214  for (auto& var: ion.writes) {
+
2215  if (ion.is_ionic_current(var)) {
+
2216  const auto& lhs = std::string(naming::ION_VARNAME_PREFIX) + "di" + ion.name + "dv";
+
2217  auto rhs = fmt::format("(di{}-{})/0.001", ion.name, get_variable_name(var));
+
2218  if (info.point_process) {
+
2219  auto area = get_variable_name(naming::NODE_AREA_VARIABLE);
+
2220  rhs += fmt::format("*1.e2/{}", area);
+
2221  }
+
2222  const ShadowUseStatement statement{lhs, "+=", rhs};
+
2223  const auto& text = process_shadow_update_statement(statement, BlockType::Equation);
+
2224  printer->add_line(text);
+
2225  }
+
2226  }
+
2227  }
+
2228 }
+
2229 
+
2230 
+ +
2232  printer->add_line("int node_id = node_data.nodeindices[id];");
+
2233  printer->add_line("double v = node_data.node_voltages[node_id];");
+
2234  printer->add_line("auto* _ppvar = _ml_arg->pdata[id];");
+
2235  const auto& read_statements = ion_read_statements(BlockType::Equation);
+
2236  for (auto& statement: read_statements) {
+
2237  printer->add_line(statement);
+
2238  }
+
2239 
+
2240  if (info.conductances.empty()) {
+
2241  print_nrn_cur_non_conductance_kernel();
+
2242  } else {
+
2243  print_nrn_cur_conductance_kernel(node);
+
2244  }
+
2245 
+
2246  const auto& write_statements = ion_write_statements(BlockType::Equation);
+
2247  for (auto& statement: write_statements) {
+
2248  auto text = process_shadow_update_statement(statement, BlockType::Equation);
+
2249  printer->add_line(text);
+
2250  }
+
2251 
+
2252  if (info.point_process) {
+
2253  const auto& area = get_variable_name(naming::NODE_AREA_VARIABLE);
+
2254  printer->fmt_line("double mfactor = 1.e2/{};", area);
+
2255  printer->add_line("g = g*mfactor;");
+
2256  printer->add_line("rhs = rhs*mfactor;");
+
2257  }
2258 
-
2259 
-
2260 /// TODO: Edit for NEURON
- -
2262  return;
-
2263 }
-
2264 
-
2265 
-
2266 /// TODO: Edit for NEURON
- -
2268  if (!nrn_cur_required()) {
-
2269  return;
-
2270  }
-
2271 
-
2272  if (info.conductances.empty()) {
-
2273  print_nrn_current(*info.breakpoint_node);
-
2274  }
-
2275 
-
2276  printer->add_newline(2);
-
2277  printer->add_line("/** update current */");
-
2278  print_global_function_common_code(BlockType::Equation);
-
2279  // print_channel_iteration_block_parallel_hint(BlockType::Equation, info.breakpoint_node);
-
2280  printer->push_block("for (int id = 0; id < nodecount; id++)");
-
2281  print_nrn_cur_kernel(*info.breakpoint_node);
-
2282  // print_nrn_cur_matrix_shadow_update();
-
2283  // if (!nrn_cur_reduction_loop_required()) {
-
2284  // print_fast_imem_calculation();
-
2285  // }
-
2286 
-
2287 
-
2288  printer->fmt_line("node_data.node_rhs[node_id] {} rhs;", operator_for_rhs());
+
2259  // print_g_unused();
+
2260 }
+
2261 
+
2262 
+
2263 /// TODO: Edit for NEURON
+ +
2265  return;
+
2266 }
+
2267 
+
2268 
+
2269 /// TODO: Edit for NEURON
+ +
2271  if (!nrn_cur_required()) {
+
2272  return;
+
2273  }
+
2274 
+
2275  if (info.conductances.empty()) {
+
2276  print_nrn_current(*info.breakpoint_node);
+
2277  }
+
2278 
+
2279  printer->add_newline(2);
+
2280  printer->add_line("/** update current */");
+
2281  print_global_function_common_code(BlockType::Equation);
+
2282  // print_channel_iteration_block_parallel_hint(BlockType::Equation, info.breakpoint_node);
+
2283  printer->push_block("for (int id = 0; id < nodecount; id++)");
+
2284  print_nrn_cur_kernel(*info.breakpoint_node);
+
2285  // print_nrn_cur_matrix_shadow_update();
+
2286  // if (!nrn_cur_reduction_loop_required()) {
+
2287  // print_fast_imem_calculation();
+
2288  // }
2289 
-
2290  if (breakpoint_exist()) {
-
2291  printer->fmt_line("inst.{}[id] = g;",
-
2292  info.vectorize ? naming::CONDUCTANCE_UNUSED_VARIABLE
- -
2294  }
-
2295  printer->pop_block();
-
2296 
-
2297  // if (nrn_cur_reduction_loop_required()) {
-
2298  // printer->push_block("for (int id = 0; id < nodecount; id++)");
-
2299  // print_nrn_cur_matrix_shadow_reduction();
-
2300  // printer->pop_block();
-
2301  // print_fast_imem_calculation();
-
2302  // }
-
2303 
-
2304  // print_kernel_data_present_annotation_block_end();
-
2305  printer->pop_block();
-
2306 }
-
2307 
-
2308 
-
2309 /****************************************************************************************/
-
2310 /* Main code printing entry points */
-
2311 /****************************************************************************************/
-
2312 
- -
2314  print_standard_includes();
-
2315  print_neuron_includes();
-
2316 
-
2317  if (info.thread_callback_register) {
-
2318  printer->add_line("extern void _nrn_thread_reg(int, int, void(*)(Datum*));");
-
2319  }
-
2320 }
-
2321 
-
2322 
- -
2324  print_global_macros();
-
2325  print_mechanism_variables_macros();
-
2326 
-
2327  printer->add_line("extern Node* nrn_alloc_node_;");
-
2328 }
+
2290 
+
2291  printer->fmt_line("node_data.node_rhs[node_id] {} rhs;", operator_for_rhs());
+
2292 
+
2293  if (breakpoint_exist()) {
+
2294  printer->fmt_line("inst.{}[id] = g;",
+
2295  info.vectorize ? naming::CONDUCTANCE_UNUSED_VARIABLE
+ +
2297  }
+
2298  printer->pop_block();
+
2299 
+
2300  // if (nrn_cur_reduction_loop_required()) {
+
2301  // printer->push_block("for (int id = 0; id < nodecount; id++)");
+
2302  // print_nrn_cur_matrix_shadow_reduction();
+
2303  // printer->pop_block();
+
2304  // print_fast_imem_calculation();
+
2305  // }
+
2306 
+
2307  // print_kernel_data_present_annotation_block_end();
+
2308  printer->pop_block();
+
2309 }
+
2310 
+
2311 
+
2312 /****************************************************************************************/
+
2313 /* Main code printing entry points */
+
2314 /****************************************************************************************/
+
2315 
+ +
2317  print_standard_includes();
+
2318  print_neuron_includes();
+
2319 
+
2320  if (info.thread_callback_register) {
+
2321  printer->add_line("extern void _nrn_thread_reg(int, int, void(*)(Datum*));");
+
2322  }
+
2323 }
+
2324 
+
2325 
+ +
2327  print_global_macros();
+
2328  print_mechanism_variables_macros();
2329 
-
2330 
- -
2332  printer->add_newline();
-
2333  printer->add_line("/* NEURON global macro definitions */");
-
2334  if (info.vectorize) {
-
2335  printer->add_multi_line(R"CODE(
-
2336  /* VECTORIZED */
-
2337  #define NRN_VECTORIZED 1
-
2338  )CODE");
-
2339  } else {
-
2340  printer->add_multi_line(R"CODE(
-
2341  /* NOT VECTORIZED */
-
2342  #define NRN_VECTORIZED 0
-
2343  )CODE");
-
2344  }
-
2345 }
-
2346 
-
2347 
- -
2349  printer->add_newline();
-
2350  printer->add_line("static constexpr auto number_of_datum_variables = ",
-
2351  std::to_string(int_variables_size()),
-
2352  ";");
-
2353  printer->add_line("static constexpr auto number_of_floating_point_variables = ",
-
2354  std::to_string(codegen_float_variables.size()),
+
2330  printer->add_line("extern Node* nrn_alloc_node_;");
+
2331 }
+
2332 
+
2333 
+ +
2335  printer->add_newline();
+
2336  printer->add_line("/* NEURON global macro definitions */");
+
2337  if (info.vectorize) {
+
2338  printer->add_multi_line(R"CODE(
+
2339  /* VECTORIZED */
+
2340  #define NRN_VECTORIZED 1
+
2341  )CODE");
+
2342  } else {
+
2343  printer->add_multi_line(R"CODE(
+
2344  /* NOT VECTORIZED */
+
2345  #define NRN_VECTORIZED 0
+
2346  )CODE");
+
2347  }
+
2348 }
+
2349 
+
2350 
+ +
2352  printer->add_newline();
+
2353  printer->add_line("static constexpr auto number_of_datum_variables = ",
+
2354  std::to_string(int_variables_size()),
2355  ";");
-
2356  printer->add_newline();
-
2357  printer->add_multi_line(R"CODE(
-
2358  namespace {
-
2359  template <typename T>
-
2360  using _nrn_mechanism_std_vector = std::vector<T>;
-
2361  using _nrn_model_sorted_token = neuron::model_sorted_token;
-
2362  using _nrn_mechanism_cache_range = neuron::cache::MechanismRange<number_of_floating_point_variables, number_of_datum_variables>;
-
2363  using _nrn_mechanism_cache_instance = neuron::cache::MechanismInstance<number_of_floating_point_variables, number_of_datum_variables>;
-
2364  using _nrn_non_owning_id_without_container = neuron::container::non_owning_identifier_without_container;
-
2365  template <typename T>
-
2366  using _nrn_mechanism_field = neuron::mechanism::field<T>;
-
2367  template <typename... Args>
-
2368  void _nrn_mechanism_register_data_fields(Args&&... args) {
-
2369  neuron::mechanism::register_data_fields(std::forward<Args>(args)...);
-
2370  }
-
2371  } // namespace
-
2372  )CODE");
-
2373 
-
2374  if (info.point_process) {
-
2375  printer->add_line("extern Prop* nrn_point_prop_;");
-
2376  } else {
-
2377  printer->add_line("Prop* hoc_getdata_range(int type);");
-
2378  }
-
2379  // for registration of tables
-
2380  if (info.table_count > 0) {
-
2381  printer->add_line("void _nrn_thread_table_reg(int, nrn_thread_table_check_t);");
-
2382  }
-
2383  if (info.for_netcon_used) {
-
2384  printer->add_line("int _nrn_netcon_args(void*, double***);");
+
2356  printer->add_line("static constexpr auto number_of_floating_point_variables = ",
+
2357  std::to_string(codegen_float_variables.size()),
+
2358  ";");
+
2359  printer->add_newline();
+
2360  printer->add_multi_line(R"CODE(
+
2361  namespace {
+
2362  template <typename T>
+
2363  using _nrn_mechanism_std_vector = std::vector<T>;
+
2364  using _nrn_model_sorted_token = neuron::model_sorted_token;
+
2365  using _nrn_mechanism_cache_range = neuron::cache::MechanismRange<number_of_floating_point_variables, number_of_datum_variables>;
+
2366  using _nrn_mechanism_cache_instance = neuron::cache::MechanismInstance<number_of_floating_point_variables, number_of_datum_variables>;
+
2367  using _nrn_non_owning_id_without_container = neuron::container::non_owning_identifier_without_container;
+
2368  template <typename T>
+
2369  using _nrn_mechanism_field = neuron::mechanism::field<T>;
+
2370  template <typename... Args>
+
2371  void _nrn_mechanism_register_data_fields(Args&&... args) {
+
2372  neuron::mechanism::register_data_fields(std::forward<Args>(args)...);
+
2373  }
+
2374  } // namespace
+
2375  )CODE");
+
2376 
+
2377  if (info.point_process) {
+
2378  printer->add_line("extern Prop* nrn_point_prop_;");
+
2379  } else {
+
2380  printer->add_line("Prop* hoc_getdata_range(int type);");
+
2381  }
+
2382  // for registration of tables
+
2383  if (info.table_count > 0) {
+
2384  printer->add_line("void _nrn_thread_table_reg(int, nrn_thread_table_check_t);");
2385  }
-
2386 }
-
2387 
-
2388 
-
2389 void CodegenNeuronCppVisitor::print_data_structures(bool print_initializers) {
-
2390  print_mechanism_global_var_structure(print_initializers);
-
2391  print_mechanism_range_var_structure(print_initializers);
-
2392  print_node_data_structure(print_initializers);
-
2393  print_thread_variables_structure(print_initializers);
-
2394  print_make_instance();
-
2395  print_make_node_data();
-
2396 }
-
2397 
-
2398 
- -
2400  if (!info.vectorize) {
-
2401  return;
-
2402  }
-
2403  printer->add_multi_line(R"CODE(
-
2404  #if NRN_PRCELLSTATE
-
2405  inst->v_unused[id] = v;
-
2406  #endif
-
2407  )CODE");
-
2408 }
-
2409 
-
2410 
- -
2412  printer->add_multi_line(R"CODE(
-
2413  #if NRN_PRCELLSTATE
-
2414  inst->g_unused[id] = g;
-
2415  #endif
-
2416  )CODE");
-
2417 }
-
2418 
- -
2420  print_hoc_py_wrapper_function_definitions();
-
2421  for (const auto& procedure: info.procedures) {
-
2422  print_procedure(*procedure);
-
2423  }
-
2424  for (const auto& function: info.functions) {
-
2425  print_function(*function);
+
2386  if (info.for_netcon_used) {
+
2387  printer->add_line("int _nrn_netcon_args(void*, double***);");
+
2388  }
+
2389 }
+
2390 
+
2391 
+
2392 void CodegenNeuronCppVisitor::print_data_structures(bool print_initializers) {
+
2393  print_mechanism_global_var_structure(print_initializers);
+
2394  print_mechanism_range_var_structure(print_initializers);
+
2395  print_node_data_structure(print_initializers);
+
2396  print_thread_variables_structure(print_initializers);
+
2397  print_make_instance();
+
2398  print_make_node_data();
+
2399 }
+
2400 
+
2401 
+ +
2403  if (!info.vectorize) {
+
2404  return;
+
2405  }
+
2406  printer->add_multi_line(R"CODE(
+
2407  #if NRN_PRCELLSTATE
+
2408  inst->v_unused[id] = v;
+
2409  #endif
+
2410  )CODE");
+
2411 }
+
2412 
+
2413 
+ +
2415  printer->add_multi_line(R"CODE(
+
2416  #if NRN_PRCELLSTATE
+
2417  inst->g_unused[id] = g;
+
2418  #endif
+
2419  )CODE");
+
2420 }
+
2421 
+ +
2423  print_hoc_py_wrapper_function_definitions();
+
2424  for (const auto& procedure: info.procedures) {
+
2425  print_procedure(*procedure);
2426  }
-
2427  for (const auto& function_table: info.function_tables) {
-
2428  print_function_tables(*function_table);
+
2427  for (const auto& function: info.functions) {
+
2428  print_function(*function);
2429  }
-
2430 }
-
2431 
- -
2433  print_nrn_init();
-
2434  print_nrn_cur();
-
2435  print_nrn_state();
-
2436  print_nrn_jacob();
-
2437  print_net_receive();
-
2438  print_net_init();
-
2439 }
-
2440 
- -
2442  print_backend_info();
-
2443  print_headers_include();
-
2444  print_macro_definitions();
-
2445  print_neuron_global_variable_declarations();
-
2446  print_namespace_start();
-
2447  print_nmodl_constants();
-
2448  print_prcellstate_macros();
-
2449  print_mechanism_info();
-
2450  print_data_structures(true);
-
2451  print_nrn_constructor_declaration();
-
2452  print_nrn_destructor_declaration();
-
2453  print_nrn_alloc();
-
2454  print_function_prototypes();
-
2455  print_longitudinal_diffusion_callbacks();
-
2456  print_point_process_function_definitions();
-
2457  print_setdata_functions();
-
2458  print_check_table_entrypoint();
-
2459  print_functors_definitions();
-
2460  print_global_variables_for_hoc();
-
2461  print_thread_memory_callbacks();
-
2462  print_function_definitions();
-
2463  print_compute_functions(); // only nrn_cur and nrn_state
-
2464  print_nrn_constructor();
-
2465  print_nrn_destructor();
-
2466  print_sdlists_init(true);
-
2467  print_mechanism_register();
-
2468  print_namespace_stop();
-
2469 }
-
2470 
- -
2472  print_backend_info();
-
2473  print_headers_include();
-
2474  print_namespace_start();
-
2475  print_function_prototypes();
-
2476  print_global_variables_for_hoc();
-
2477  print_function_definitions();
-
2478  print_mechanism_register();
-
2479  print_namespace_stop();
-
2480 }
-
2481 
- -
2483  if (info.mod_suffix == "nothing") {
-
2484  print_codegen_routines_nothing();
-
2485  } else {
-
2486  print_codegen_routines_regular();
-
2487  }
-
2488 }
-
2489 
- -
2491  throw std::runtime_error("Not implemented.");
-
2492 }
-
2493 
-
2494 
- -
2496  auto const& arguments = node.get_arguments();
+
2430  for (const auto& function_table: info.function_tables) {
+
2431  print_function_tables(*function_table);
+
2432  }
+
2433 }
+
2434 
+ +
2436  print_nrn_init();
+
2437  print_nrn_cur();
+
2438  print_nrn_state();
+
2439  print_nrn_jacob();
+
2440  print_net_receive();
+
2441  print_net_init();
+
2442 }
+
2443 
+ +
2445  print_backend_info();
+
2446  print_headers_include();
+
2447  print_macro_definitions();
+
2448  print_neuron_global_variable_declarations();
+
2449  print_namespace_start();
+
2450  print_nmodl_constants();
+
2451  print_prcellstate_macros();
+
2452  print_mechanism_info();
+
2453  print_data_structures(true);
+
2454  print_nrn_constructor_declaration();
+
2455  print_nrn_destructor_declaration();
+
2456  print_nrn_alloc();
+
2457  print_function_prototypes();
+
2458  print_longitudinal_diffusion_callbacks();
+
2459  print_point_process_function_definitions();
+
2460  print_setdata_functions();
+
2461  print_check_table_entrypoint();
+
2462  print_functors_definitions();
+
2463  print_global_variables_for_hoc();
+
2464  print_thread_memory_callbacks();
+
2465  print_function_definitions();
+
2466  print_compute_functions(); // only nrn_cur and nrn_state
+
2467  print_nrn_constructor();
+
2468  print_nrn_destructor();
+
2469  print_sdlists_init(true);
+
2470  print_mechanism_register();
+
2471  print_namespace_stop();
+
2472 }
+
2473 
+ +
2475  print_backend_info();
+
2476  print_headers_include();
+
2477  print_namespace_start();
+
2478  print_function_prototypes();
+
2479  print_global_variables_for_hoc();
+
2480  print_function_definitions();
+
2481  print_mechanism_register();
+
2482  print_namespace_stop();
+
2483 }
+
2484 
+ +
2486  if (info.mod_suffix == "nothing") {
+
2487  print_codegen_routines_nothing();
+
2488  } else {
+
2489  print_codegen_routines_regular();
+
2490  }
+
2491 }
+
2492 
+ +
2494  throw std::runtime_error("Not implemented.");
+
2495 }
+
2496 
2497 
-
2498  if (printing_net_init) {
-
2499  throw std::runtime_error("Not implemented. [jfiwoei]");
-
2500  }
-
2501 
-
2502  std::string weight_pointer = "nullptr";
-
2503  auto point_process = get_variable_name(naming::POINT_PROCESS_VARIABLE,
-
2504  /* use_instance */ false);
-
2505  if (!printing_net_receive) {
-
2506  point_process += ".get<Point_process*>()";
-
2507  }
-
2508  const auto& tqitem = get_variable_name("tqitem", /* use_instance */ false);
-
2509 
-
2510  printer->fmt_text("{}(/* tqitem */ &{}, {}, {}, {} + ",
-
2511  info.artificial_cell ? "artcell_net_send" : "net_send",
-
2512  tqitem,
-
2513  weight_pointer,
-
2514  point_process,
-
2515  get_variable_name("t"));
-
2516  print_vector_elements(arguments, ", ");
-
2517  printer->add_text(')');
-
2518 }
-
2519 
- -
2521  const auto& point_process = get_variable_name("point_process", /* use_instance */ false);
-
2522  const auto& tqitem = get_variable_name("tqitem", /* use_instance */ false);
-
2523 
-
2524  printer->fmt_text("{}(/* tqitem */ &{}, {}, ",
-
2525  info.artificial_cell ? "artcell_net_move" : "net_move",
-
2526  tqitem,
-
2527  point_process);
-
2528 
-
2529  print_vector_elements(node.get_arguments(), ", ");
-
2530  printer->add_text(')');
-
2531 }
-
2532 
- -
2534  const auto& point_process = get_variable_name(naming::POINT_PROCESS_VARIABLE,
-
2535  /* use_instance */ false);
-
2536  printer->fmt_text("net_event({}, t)", point_process);
-
2537 }
-
2538 
- -
2540  auto name = node.get_node_name();
-
2541  const auto& arguments = node.get_arguments();
-
2542  printer->add_text(method_name(name), "(");
-
2543  print_vector_elements(arguments, ", ");
-
2544  printer->add_text(')');
-
2545 }
-
2546 
-
2547 /**
-
2548  * Rename arguments to NET_RECEIVE block with corresponding pointer variable
-
2549  *
-
2550  * \code{.mod}
-
2551  * NET_RECEIVE (weight, R){
-
2552  * x = R
-
2553  * }
-
2554  * \endcode
-
2555  *
-
2556  * then generated code should be:
-
2557  *
-
2558  * \code{.cpp}
-
2559  * x[id] = _args[1];
-
2560  * \endcode
-
2561  *
-
2562  * So, the `R` in AST needs to be renamed with `_args[1]`.
-
2563  */
-
2564 static void rename_net_receive_arguments(const ast::NetReceiveBlock& net_receive_node,
-
2565  const ast::Node& node) {
-
2566  const auto& parameters = net_receive_node.get_parameters();
-
2567 
-
2568  auto n_parameters = parameters.size();
-
2569  for (size_t i = 0; i < n_parameters; ++i) {
-
2570  const auto& name = parameters[i]->get_node_name();
-
2571  auto var_used = VarUsageVisitor().variable_used(node, name);
-
2572  if (var_used) {
-
2573  RenameVisitor vr(name, fmt::format("_args[{}]", i));
-
2574  node.get_statement_block()->visit_children(vr);
-
2575  }
-
2576  }
-
2577 }
-
2578 
- -
2580  return {{"", "Point_process*", "", "_pnt"},
-
2581  {"", "double*", "", "_args"},
-
2582  {"", "double", "", "flag"}};
-
2583 }
-
2584 
-
2585 
- -
2587  printer->add_line("_nrn_mechanism_cache_instance _lmc{_pnt->prop};");
-
2588  printer->add_line("auto * nt = static_cast<NrnThread*>(_pnt->_vnt);");
-
2589  printer->add_line("auto * _ppvar = _nrn_mechanism_access_dparam(_pnt->prop);");
-
2590 
-
2591  printer->fmt_line("auto inst = make_instance_{}(&_lmc);", info.mod_suffix);
-
2592  if (!info.artificial_cell) {
-
2593  printer->fmt_line("auto node_data = make_node_data_{}(_pnt->prop);", info.mod_suffix);
-
2594  }
-
2595  printer->fmt_line("// nocmodl has a nullptr dereference for thread variables.");
-
2596  printer->fmt_line("// NMODL will fail to compile at a later point, because of");
-
2597  printer->fmt_line("// missing '_thread_vars'.");
-
2598  printer->fmt_line("Datum * _thread = nullptr;");
-
2599 
-
2600  printer->add_line("size_t id = 0;");
-
2601  printer->add_line("double t = nt->_t;");
-
2602 }
-
2603 
- -
2605  printing_net_receive = true;
-
2606  auto node = info.net_receive_node;
-
2607  if (!node) {
-
2608  return;
-
2609  }
-
2610 
-
2611  printer->fmt_push_block("static void nrn_net_receive_{}({})",
-
2612  info.mod_suffix,
-
2613  get_parameter_str(net_receive_args()));
-
2614 
-
2615  rename_net_receive_arguments(*node, *node);
-
2616  print_net_receive_common_code();
+ +
2499  auto const& arguments = node.get_arguments();
+
2500 
+
2501  if (printing_net_init) {
+
2502  throw std::runtime_error("Not implemented. [jfiwoei]");
+
2503  }
+
2504 
+
2505  std::string weight_pointer = "nullptr";
+
2506  auto point_process = get_variable_name(naming::POINT_PROCESS_VARIABLE,
+
2507  /* use_instance */ false);
+
2508  if (!printing_net_receive) {
+
2509  point_process += ".get<Point_process*>()";
+
2510  }
+
2511  const auto& tqitem = get_variable_name("tqitem", /* use_instance */ false);
+
2512 
+
2513  printer->fmt_text("{}(/* tqitem */ &{}, {}, {}, {} + ",
+
2514  info.artificial_cell ? "artcell_net_send" : "net_send",
+
2515  tqitem,
+
2516  weight_pointer,
+
2517  point_process,
+
2518  get_variable_name("t"));
+
2519  print_vector_elements(arguments, ", ");
+
2520  printer->add_text(')');
+
2521 }
+
2522 
+ +
2524  const auto& point_process = get_variable_name("point_process", /* use_instance */ false);
+
2525  const auto& tqitem = get_variable_name("tqitem", /* use_instance */ false);
+
2526 
+
2527  printer->fmt_text("{}(/* tqitem */ &{}, {}, ",
+
2528  info.artificial_cell ? "artcell_net_move" : "net_move",
+
2529  tqitem,
+
2530  point_process);
+
2531 
+
2532  print_vector_elements(node.get_arguments(), ", ");
+
2533  printer->add_text(')');
+
2534 }
+
2535 
+ +
2537  const auto& point_process = get_variable_name(naming::POINT_PROCESS_VARIABLE,
+
2538  /* use_instance */ false);
+
2539  printer->fmt_text("net_event({}, t)", point_process);
+
2540 }
+
2541 
+ +
2543  auto name = node.get_node_name();
+
2544  const auto& arguments = node.get_arguments();
+
2545  printer->add_text(method_name(name), "(");
+
2546  print_vector_elements(arguments, ", ");
+
2547  printer->add_text(')');
+
2548 }
+
2549 
+
2550 /**
+
2551  * Rename arguments to NET_RECEIVE block with corresponding pointer variable
+
2552  *
+
2553  * \code{.mod}
+
2554  * NET_RECEIVE (weight, R){
+
2555  * x = R
+
2556  * }
+
2557  * \endcode
+
2558  *
+
2559  * then generated code should be:
+
2560  *
+
2561  * \code{.cpp}
+
2562  * x[id] = _args[1];
+
2563  * \endcode
+
2564  *
+
2565  * So, the `R` in AST needs to be renamed with `_args[1]`.
+
2566  */
+
2567 static void rename_net_receive_arguments(const ast::NetReceiveBlock& net_receive_node,
+
2568  const ast::Node& node) {
+
2569  const auto& parameters = net_receive_node.get_parameters();
+
2570 
+
2571  auto n_parameters = parameters.size();
+
2572  for (size_t i = 0; i < n_parameters; ++i) {
+
2573  const auto& name = parameters[i]->get_node_name();
+
2574  auto var_used = VarUsageVisitor().variable_used(node, name);
+
2575  if (var_used) {
+
2576  RenameVisitor vr(name, fmt::format("_args[{}]", i));
+
2577  node.get_statement_block()->visit_children(vr);
+
2578  }
+
2579  }
+
2580 }
+
2581 
+ +
2583  return {{"", "Point_process*", "", "_pnt"},
+
2584  {"", "double*", "", "_args"},
+
2585  {"", "double", "", "flag"}};
+
2586 }
+
2587 
+
2588 
+ +
2590  printer->add_line("_nrn_mechanism_cache_instance _lmc{_pnt->prop};");
+
2591  printer->add_line("auto * nt = static_cast<NrnThread*>(_pnt->_vnt);");
+
2592  printer->add_line("auto * _ppvar = _nrn_mechanism_access_dparam(_pnt->prop);");
+
2593 
+
2594  printer->fmt_line("auto inst = make_instance_{}(&_lmc);", info.mod_suffix);
+
2595  if (!info.artificial_cell) {
+
2596  printer->fmt_line("auto node_data = make_node_data_{}(_pnt->prop);", info.mod_suffix);
+
2597  }
+
2598  printer->fmt_line("// nocmodl has a nullptr dereference for thread variables.");
+
2599  printer->fmt_line("// NMODL will fail to compile at a later point, because of");
+
2600  printer->fmt_line("// missing '_thread_vars'.");
+
2601  printer->fmt_line("Datum * _thread = nullptr;");
+
2602 
+
2603  printer->add_line("size_t id = 0;");
+
2604  printer->add_line("double t = nt->_t;");
+
2605 }
+
2606 
+ +
2608  printing_net_receive = true;
+
2609  auto node = info.net_receive_node;
+
2610  if (!node) {
+
2611  return;
+
2612  }
+
2613 
+
2614  printer->fmt_push_block("static void nrn_net_receive_{}({})",
+
2615  info.mod_suffix,
+
2616  get_parameter_str(net_receive_args()));
2617 
-
2618 
-
2619  print_statement_block(*node->get_statement_block(), false, false);
+
2618  rename_net_receive_arguments(*node, *node);
+
2619  print_net_receive_common_code();
2620 
-
2621  printer->add_newline();
-
2622  printer->pop_block();
-
2623  printing_net_receive = false;
-
2624 }
-
2625 
- -
2627  const auto node = info.net_receive_initial_node;
-
2628  if (node == nullptr) {
-
2629  return;
-
2630  }
-
2631 
-
2632  // rename net_receive arguments used in the initial block of net_receive
-
2633  rename_net_receive_arguments(*info.net_receive_node, *node);
+
2621 
+
2622  print_statement_block(*node->get_statement_block(), false, false);
+
2623 
+
2624  printer->add_newline();
+
2625  printer->pop_block();
+
2626  printing_net_receive = false;
+
2627 }
+
2628 
+ +
2630  const auto node = info.net_receive_initial_node;
+
2631  if (node == nullptr) {
+
2632  return;
+
2633  }
2634 
-
2635  printing_net_init = true;
-
2636  printer->add_newline(2);
-
2637  printer->fmt_push_block("static void net_init({})", get_parameter_str(net_receive_args()));
-
2638 
-
2639  auto block = node->get_statement_block().get();
-
2640  if (!block->get_statements().empty()) {
-
2641  print_net_receive_common_code();
-
2642  print_statement_block(*block, false, false);
-
2643  }
-
2644  printer->pop_block();
-
2645  printing_net_init = false;
-
2646 }
-
2647 
-
2648 
-
2649 /****************************************************************************************/
-
2650 /* Overloaded visitor routines */
-
2651 /****************************************************************************************/
-
2652 
-
2653 /// TODO: Edit for NEURON
- -
2655  return;
-
2656 }
-
2657 
- -
2659  const ast::LongitudinalDiffusionBlock& /* node */) {
-
2660  // These are handled via `print_longitdudinal_*`.
-
2661 }
-
2662 
- -
2664  // These are handled via `print_longitdudinal_*`.
-
2665 }
-
2666 
- -
2668  // The setup for enabling this loop is:
-
2669  // double ** _fornetcon_data = ...;
-
2670  // for(size_t i = 0; i < n_netcons; ++i) {
-
2671  // double * _netcon_data = _fornetcon_data[i];
-
2672  //
-
2673  // // loop body.
-
2674  // }
+
2635  // rename net_receive arguments used in the initial block of net_receive
+
2636  rename_net_receive_arguments(*info.net_receive_node, *node);
+
2637 
+
2638  printing_net_init = true;
+
2639  printer->add_newline(2);
+
2640  printer->fmt_push_block("static void net_init({})", get_parameter_str(net_receive_args()));
+
2641 
+
2642  auto block = node->get_statement_block().get();
+
2643  if (!block->get_statements().empty()) {
+
2644  print_net_receive_common_code();
+
2645  print_statement_block(*block, false, false);
+
2646  }
+
2647  printer->pop_block();
+
2648  printing_net_init = false;
+
2649 }
+
2650 
+
2651 
+
2652 /****************************************************************************************/
+
2653 /* Overloaded visitor routines */
+
2654 /****************************************************************************************/
+
2655 
+
2656 /// TODO: Edit for NEURON
+ +
2658  return;
+
2659 }
+
2660 
+ +
2662  const ast::LongitudinalDiffusionBlock& /* node */) {
+
2663  // These are handled via `print_longitdudinal_*`.
+
2664 }
+
2665 
+ +
2667  // These are handled via `print_longitdudinal_*`.
+
2668 }
+
2669 
+ +
2671  // The setup for enabling this loop is:
+
2672  // double ** _fornetcon_data = ...;
+
2673  // for(size_t i = 0; i < n_netcons; ++i) {
+
2674  // double * _netcon_data = _fornetcon_data[i];
2675  //
-
2676  // Where `_fornetcon_data` is an array of pointers to the arguments, one
-
2677  // for each netcon; and `_netcon_data` points to the arguments for the
-
2678  // current netcon.
-
2679  //
-
2680  // Similar to the CoreNEURON solution, we replace all arguments with the
-
2681  // C++ string that implements them, i.e. `_netcon_data[{}]`. The arguments
-
2682  // are positional and thus simply numbered through.
-
2683  const auto& args = node.get_parameters();
-
2684  RenameVisitor v;
-
2685  const auto& statement_block = node.get_statement_block();
-
2686  for (size_t i_arg = 0; i_arg < args.size(); ++i_arg) {
-
2687  auto old_name = args[i_arg]->get_node_name();
-
2688  auto new_name = fmt::format("_netcon_data[{}]", i_arg);
-
2689  v.set(old_name, new_name);
-
2690  statement_block->accept(v);
-
2691  }
-
2692 
-
2693  auto dparam_it =
-
2694  std::find_if(info.semantics.begin(), info.semantics.end(), [](const IndexSemantics& a) {
-
2695  return a.name == naming::FOR_NETCON_SEMANTIC;
-
2696  });
-
2697  if (dparam_it == info.semantics.end()) {
-
2698  throw std::runtime_error("Couldn't find `fornetcon` variable.");
-
2699  }
-
2700 
-
2701  int dparam_index = dparam_it->index;
-
2702  auto netcon_var = get_name(codegen_int_variables[dparam_index]);
+
2676  // // loop body.
+
2677  // }
+
2678  //
+
2679  // Where `_fornetcon_data` is an array of pointers to the arguments, one
+
2680  // for each netcon; and `_netcon_data` points to the arguments for the
+
2681  // current netcon.
+
2682  //
+
2683  // Similar to the CoreNEURON solution, we replace all arguments with the
+
2684  // C++ string that implements them, i.e. `_netcon_data[{}]`. The arguments
+
2685  // are positional and thus simply numbered through.
+
2686  const auto& args = node.get_parameters();
+
2687  RenameVisitor v;
+
2688  const auto& statement_block = node.get_statement_block();
+
2689  for (size_t i_arg = 0; i_arg < args.size(); ++i_arg) {
+
2690  auto old_name = args[i_arg]->get_node_name();
+
2691  auto new_name = fmt::format("_netcon_data[{}]", i_arg);
+
2692  v.set(old_name, new_name);
+
2693  statement_block->accept(v);
+
2694  }
+
2695 
+
2696  auto dparam_it =
+
2697  std::find_if(info.semantics.begin(), info.semantics.end(), [](const IndexSemantics& a) {
+
2698  return a.name == naming::FOR_NETCON_SEMANTIC;
+
2699  });
+
2700  if (dparam_it == info.semantics.end()) {
+
2701  throw std::runtime_error("Couldn't find `fornetcon` variable.");
+
2702  }
2703 
-
2704  // This is called from `print_statement_block` which pre-indents the
-
2705  // current line. Hence `add_text` only.
-
2706  printer->add_text("double ** _fornetcon_data;");
-
2707  printer->add_newline();
-
2708 
-
2709  printer->fmt_line("int _n_netcons = _nrn_netcon_args({}, &_fornetcon_data);",
-
2710  get_variable_name(netcon_var, false));
+
2704  int dparam_index = dparam_it->index;
+
2705  auto netcon_var = get_name(codegen_int_variables[dparam_index]);
+
2706 
+
2707  // This is called from `print_statement_block` which pre-indents the
+
2708  // current line. Hence `add_text` only.
+
2709  printer->add_text("double ** _fornetcon_data;");
+
2710  printer->add_newline();
2711 
-
2712  printer->push_block("for (size_t _i = 0; _i < _n_netcons; ++_i)");
-
2713  printer->add_line("double * _netcon_data = _fornetcon_data[_i];");
-
2714  print_statement_block(*statement_block, false, false);
-
2715  printer->pop_block();
-
2716 }
-
2717 
-
2718 
-
2719 } // namespace codegen
-
2720 } // namespace nmodl
+
2712  printer->fmt_line("int _n_netcons = _nrn_netcon_args({}, &_fornetcon_data);",
+
2713  get_variable_name(netcon_var, false));
+
2714 
+
2715  printer->push_block("for (size_t _i = 0; _i < _n_netcons; ++_i)");
+
2716  printer->add_line("double * _netcon_data = _fornetcon_data[_i];");
+
2717  print_statement_block(*statement_block, false, false);
+
2718  printer->pop_block();
+
2719 }
+
2720 
+
2721 
+
2722 } // namespace codegen
+
2723 } // namespace nmodl
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:7065
@@ -2823,19 +2826,19 @@
void print_global_var_external_access()
Print functions for EXTERNAL use.
Base class for all AST node.
Definition: node.hpp:40
bool is_index
if this is pure index (e.g.
-
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.
std::string py_function_signature(const std::string &function_or_procedure_name) const
Get the signature of the npy <func_or_proc_name> function.
Helper to represent information about index/int variables.
-
void print_nrn_cur() override
Print nrn_cur / current update function definition.
-
void print_macro_definitions()
Print all NEURON macros.
-
void print_function_definitions()
Print function and procedures prototype definitions.
-
void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
+
void print_nrn_cur() override
Print nrn_cur / current update function definition.
+
void print_macro_definitions()
Print all NEURON macros.
+
void print_function_definitions()
Print function and procedures prototype definitions.
+
void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
static constexpr char POINT_PROCESS_VARIABLE[]
inbuilt neuron variable for point process
const ArgumentVector & get_parameters() const noexcept override
Getter for member variable FunctionTableBlock::parameters.
std::string hoc_py_wrapper_signature(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
Return the wrapper signature.
-
void print_neuron_includes()
Print includes from NEURON.
-
void print_codegen_routines_regular()
Anything not SUFFIX nothing.
+
void print_neuron_includes()
Print includes from NEURON.
+
void print_codegen_routines_regular()
Anything not SUFFIX nothing.
static constexpr char NRN_JACOB_METHOD[]
nrn_jacob method in generated code
void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
@@ -2844,12 +2847,13 @@
std::shared_ptr< symtab::Symbol > SymbolType
void print_nrn_alloc() override
Print nrn_alloc function definition.
+
static constexpr char VOLTAGE_UNUSED_VARIABLE[]
range variable for voltage when unused (for vectorized model)
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.
const ArgumentVector & get_parameters() const noexcept override
Getter for member variable NetReceiveBlock::parameters.
-
void visit_lon_diffuse(const ast::LonDiffuse &node) override
visit node of type ast::LonDiffuse
- +
void visit_lon_diffuse(const ast::LonDiffuse &node) override
visit node of type ast::LonDiffuse
+
std::string table_thread_function_name() const
Name of the threaded table checking function.
bool optimize_ion_variable_copies() const override
Check if ion variable copies should be avoided.
std::string hoc_function_name(const std::string &function_or_procedure_name) const
All functions and procedures need a hoc <func_or_proc_name> to be available to the HOC interpreter.
@@ -2862,18 +2866,18 @@
Visitor for printing C++ code compatible with legacy api of NEURON
std::string backend_name() const override
Name of the code generation backend.
std::string process_verbatim_text(std::string const &text) override
Process a verbatim block for possible variable renaming.
- +
void print_entrypoint_setup_code_from_prop()
Prints setup code for entrypoints NEURON.
void print_global_param_default_values()
Print global struct with default value of RANGE PARAMETERs.
ParamVector ldifusfunc1_parameters() const
Parameters for what NEURON calls ldifusfunc1_t.
std::string name
name of the ion
static constexpr char NTHREAD_DT_VARIABLE[]
dt variable in neuron thread structure
-
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
-
void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
-
void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
+
void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
+
void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
+
void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
Check if variable is used in given block.
Implement string manipulation functions.
-
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.
std::string thread_variable_name(const ThreadVariableInfo &var_info, bool use_instance=true) const
Determine the C++ string to print for thread variables.
static constexpr char NODE_AREA_VARIABLE[]
inbuilt neuron variable for area of the compartment
void print_nrn_state() override
Print nrn_state / state update function definition.
@@ -2888,10 +2892,10 @@
std::shared_ptr< StatementBlock > get_statement_block() const noexcept override
Getter for member variable BreakpointBlock::statement_block.
std::string rev_potential_pointer_name() const
-
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.
+
static constexpr char CONDUCTANCE_VARIABLE[]
range variable for conductance
-
ParamVector functor_params() override
The parameters of the Newton solver "functor".
+
ParamVector functor_params() override
The parameters of the Newton solver "functor".
void print_mechanism_register_regular()
Function body for anything not SUFFIX nothing.
void print_mechanism_register_nothing()
Function body for SUFFIX nothing.
Visitor for printing C++ code compatible with legacy api of CoreNEURON
@@ -2902,18 +2906,18 @@
void print_point_process_function_definitions()
Print POINT_PROCESS related functions Wrap external NEURON functions related to POINT_PROCESS mechani...
Utility functions for visitors implementation.
-
void print_net_init()
Print NET_RECEIVE{ INITIAL{ ...
+
void print_net_init()
Print NET_RECEIVE{ INITIAL{ ...
@ Equation
breakpoint block
static constexpr char USE_TABLE_VARIABLE[]
global variable to indicate if table is used
Represent WATCH statement in NMODL.
void print_neuron_global_variable_declarations()
Print extern declarations for neuron global variables.
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.
+
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.
InterpreterWrapper
Enum to switch between HOC and Python wrappers for functions and procedures defined in mechanisms.
void print_global_variables_for_hoc() override
Print byte arrays that register scalar and vector variables for hoc interface.
-
void print_standard_includes() override
Print standard C/C++ includes.
+
void print_standard_includes() override
Print standard C/C++ includes.
Extracts information required for LONGITUDINAL_DIFFUSION for each KINETIC block.
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 add_variable_tqitem(std::vector< IndexVariableInfo > &variables) override
Add the variable tqitem during get_int_variables.
@@ -2923,28 +2927,28 @@
void print_thread_variables_structure(bool print_initializers)
Print the data structure used to access thread variables.
Represent semantic information for index variable.
std::string to_string(const T &obj)
-
void visit_longitudinal_diffusion_block(const ast::LongitudinalDiffusionBlock &node) override
visit node of type ast::LongitudinalDiffusionBlock
-
void print_function_table_call(const ast::FunctionCall &node) override
Print special code when calling FUNCTION_TABLEs.
-
void print_compute_functions() override
Print all compute functions for every backend.
+
void visit_longitudinal_diffusion_block(const ast::LongitudinalDiffusionBlock &node) override
visit node of type ast::LongitudinalDiffusionBlock
+
void print_function_table_call(const ast::FunctionCall &node) override
Print special code when calling FUNCTION_TABLEs.
+
void print_compute_functions() override
Print all compute functions for every backend.
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
void print_thread_memory_callbacks()
Print thread variable (de-)initialization functions.
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_entrypoint_setup_code_from_memb_list()
Prints setup code for entrypoints from NEURON.
-
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.
Blindly rename given variable to new name
static constexpr char NRN_CUR_METHOD[]
nrn_cur method in generated code
void print_mechanism_register() override
Print the mechanism registration function.
Implement utility functions for codegen visitors.
static constexpr char TQITEM_VARIABLE[]
inbuilt neuron variable for tqitem process
void print_nrn_jacob()
Print nrn_jacob function definition.
- + -
void print_fast_imem_calculation() override
Print fast membrane current calculation code.
+
void print_fast_imem_calculation() override
Print fast membrane current calculation code.
void set(const std::string &old_name, std::string new_name)
-
void print_data_structures(bool print_initializers) override
Print all classes.
-
void print_sdlists_init(bool print_initializers) override
+
void print_data_structures(bool print_initializers) override
Print all classes.
+
void print_sdlists_init(bool print_initializers) override
const std::string external_method_arguments() noexcept override
Arguments for external functions called from generated code.
Represent LONGITUDINAL_DIFFUSION statement in NMODL.
Definition: lon_diffuse.hpp:39
std::string py_function_name(const std::string &function_or_procedure_name) const
In non POINT_PROCESS mechanisms all functions and procedures need a py <func_or_proc_name> to be avai...
@@ -2960,22 +2964,22 @@
void print_setdata_functions()
Print NEURON functions related to setting global variables of the mechanism.
std::string get_name(const std::shared_ptr< symtab::Symbol > &sym)
Represents ion write statement during code generation.
-
void print_mechanism_variables_macros()
Print mechanism variables' related macros.
+
void print_mechanism_variables_macros()
Print mechanism variables' related macros.
void print_nrn_constructor() override
Print nrn_constructor function definition.
BlockType
Helper to represent various block types.
-
void print_headers_include() override
Print all includes.
+
void print_headers_include() override
Print all includes.
void print_check_table_entrypoint()
Print all check_* function declarations.
const ParamVector 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
+
void visit_for_netcon(const ast::ForNetcon &node) override
visit node of type ast::ForNetcon
void print_function_or_procedure(const ast::Block &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &specifiers={ CppObjectSpecifier::Inline}) override
Print nmodl function or procedure (common code)
static constexpr char NRN_STATE_METHOD[]
nrn_state method in generated code
const std::shared_ptr< symtab::Symbol > symbol
Version information and units file path.
-
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
+
void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
int position_of_float_var(const std::string &name) const override
Determine the position in the data array for a given float variable.
std::string get_variable_name(const std::string &name, bool use_instance=true) const override
Determine variable name in the structure of mechanism properties.
void print_hoc_py_wrapper_call_impl(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
Print the code that calls the impl from the HOC/Py wrapper.
-
void print_codegen_routines_nothing()
SUFFIX nothing is special.
+
void print_codegen_routines_nothing()
SUFFIX nothing is special.
static constexpr char AREA_VARIABLE[]
similar to node_area but user can explicitly declare it as area
void print_make_node_data() const
Print make_*_node_data.
virtual std::shared_ptr< StatementBlock > get_statement_block() const
Return associated statement block for the AST node.
Definition: ast.cpp:32
@@ -2996,7 +3000,7 @@
static constexpr char CONDUCTANCE_UNUSED_VARIABLE[]
range variable when conductance is not used (for vectorized model)
ParamVector ldifusfunc3_parameters() const
Parameters for what NEURON calls ldifusfunc3_t.
-
void print_codegen_routines() override
Print entry point to code generation.
+
void print_codegen_routines() override
Print entry point to code generation.
void append_conc_write_statements(std::vector< ShadowUseStatement > &statements, const Ion &ion, const std::string &concentration) override
Generate Function call statement for nrn_wrote_conc.
void print_longitudinal_diffusion_callbacks()
Prints the callbacks required for LONGITUDINAL_DIFFUSION.
@@ -3004,14 +3008,14 @@
int get_index_from_name(const std::vector< T > &variables, const std::string &name)
virtual std::string get_node_name() const
Return name of of the node.
Definition: ast.cpp:28
void print_hoc_py_wrapper(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
Print the wrapper for calling FUNCION/PROCEDURES from HOC/Py.
- +
Auto generated AST classes declaration.
-
void print_net_receive()
Print net_receive call-back.
+
void print_net_receive()
Print net_receive call-back.
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_hoc_py_wrapper_setup(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
Print the setup code for HOC/Py wrapper.
std::string namespace_name() override
Name of "our" namespace.
-
void print_global_macros()
Print NEURON global variable macros.
+
void print_global_macros()
Print NEURON global variable macros.
std::string intra_conc_pointer_name() const
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/notebooks/nmodl-kinetic-schemes.ipynb b/notebooks/nmodl-kinetic-schemes.ipynb index 140c3b7e1..5339db4a6 100644 --- a/notebooks/nmodl-kinetic-schemes.ipynb +++ b/notebooks/nmodl-kinetic-schemes.ipynb @@ -152,10 +152,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:25.897152Z", - "iopub.status.busy": "2024-10-29T13:27:25.896954Z", - "iopub.status.idle": "2024-10-29T13:27:26.687732Z", - "shell.execute_reply": "2024-10-29T13:27:26.686890Z" + "iopub.execute_input": "2024-10-29T14:02:40.031622Z", + "iopub.status.busy": "2024-10-29T14:02:40.031085Z", + "iopub.status.idle": "2024-10-29T14:02:40.849891Z", + "shell.execute_reply": "2024-10-29T14:02:40.849041Z" } }, "outputs": [], @@ -169,10 +169,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:26.690685Z", - "iopub.status.busy": "2024-10-29T13:27:26.690118Z", - "iopub.status.idle": "2024-10-29T13:27:26.721611Z", - "shell.execute_reply": "2024-10-29T13:27:26.720823Z" + "iopub.execute_input": "2024-10-29T14:02:40.852800Z", + "iopub.status.busy": "2024-10-29T14:02:40.852439Z", + "iopub.status.idle": "2024-10-29T14:02:40.884501Z", + "shell.execute_reply": "2024-10-29T14:02:40.883804Z" } }, "outputs": [], @@ -277,10 +277,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:26.723900Z", - "iopub.status.busy": "2024-10-29T13:27:26.723688Z", - "iopub.status.idle": "2024-10-29T13:27:26.729038Z", - "shell.execute_reply": "2024-10-29T13:27:26.728337Z" + "iopub.execute_input": "2024-10-29T14:02:40.887227Z", + "iopub.status.busy": "2024-10-29T14:02:40.886817Z", + "iopub.status.idle": "2024-10-29T14:02:40.892062Z", + "shell.execute_reply": "2024-10-29T14:02:40.891397Z" } }, "outputs": [ @@ -323,10 +323,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:26.758904Z", - "iopub.status.busy": "2024-10-29T13:27:26.758620Z", - "iopub.status.idle": "2024-10-29T13:27:26.762953Z", - "shell.execute_reply": "2024-10-29T13:27:26.762300Z" + "iopub.execute_input": "2024-10-29T14:02:40.924482Z", + "iopub.status.busy": "2024-10-29T14:02:40.924002Z", + "iopub.status.idle": "2024-10-29T14:02:40.928199Z", + "shell.execute_reply": "2024-10-29T14:02:40.927575Z" } }, "outputs": [ @@ -367,10 +367,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:26.764829Z", - "iopub.status.busy": "2024-10-29T13:27:26.764637Z", - "iopub.status.idle": "2024-10-29T13:27:26.768654Z", - "shell.execute_reply": "2024-10-29T13:27:26.768074Z" + "iopub.execute_input": "2024-10-29T14:02:40.930650Z", + "iopub.status.busy": "2024-10-29T14:02:40.930257Z", + "iopub.status.idle": "2024-10-29T14:02:40.933797Z", + "shell.execute_reply": "2024-10-29T14:02:40.933250Z" }, "scrolled": true }, @@ -412,10 +412,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:26.770794Z", - "iopub.status.busy": "2024-10-29T13:27:26.770325Z", - "iopub.status.idle": "2024-10-29T13:27:26.774306Z", - "shell.execute_reply": "2024-10-29T13:27:26.773739Z" + "iopub.execute_input": "2024-10-29T14:02:40.935874Z", + "iopub.status.busy": "2024-10-29T14:02:40.935389Z", + "iopub.status.idle": "2024-10-29T14:02:40.939196Z", + "shell.execute_reply": "2024-10-29T14:02:40.938638Z" }, "scrolled": true }, @@ -459,10 +459,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:26.776496Z", - "iopub.status.busy": "2024-10-29T13:27:26.775969Z", - "iopub.status.idle": "2024-10-29T13:27:26.780256Z", - "shell.execute_reply": "2024-10-29T13:27:26.779709Z" + "iopub.execute_input": "2024-10-29T14:02:40.941176Z", + "iopub.status.busy": "2024-10-29T14:02:40.940820Z", + "iopub.status.idle": "2024-10-29T14:02:40.945199Z", + "shell.execute_reply": "2024-10-29T14:02:40.944546Z" } }, "outputs": [ diff --git a/notebooks/nmodl-python-tutorial.ipynb b/notebooks/nmodl-python-tutorial.ipynb index 26d801a54..1e088fd7d 100644 --- a/notebooks/nmodl-python-tutorial.ipynb +++ b/notebooks/nmodl-python-tutorial.ipynb @@ -30,10 +30,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.023767Z", - "iopub.status.busy": "2024-10-29T13:27:32.023562Z", - "iopub.status.idle": "2024-10-29T13:27:32.815729Z", - "shell.execute_reply": "2024-10-29T13:27:32.814777Z" + "iopub.execute_input": "2024-10-29T14:02:49.714418Z", + "iopub.status.busy": "2024-10-29T14:02:49.714207Z", + "iopub.status.idle": "2024-10-29T14:02:50.549305Z", + "shell.execute_reply": "2024-10-29T14:02:50.548371Z" } }, "outputs": [], @@ -63,10 +63,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.818541Z", - "iopub.status.busy": "2024-10-29T13:27:32.818322Z", - "iopub.status.idle": "2024-10-29T13:27:32.847963Z", - "shell.execute_reply": "2024-10-29T13:27:32.847228Z" + "iopub.execute_input": "2024-10-29T14:02:50.552104Z", + "iopub.status.busy": "2024-10-29T14:02:50.551879Z", + "iopub.status.idle": "2024-10-29T14:02:50.582490Z", + "shell.execute_reply": "2024-10-29T14:02:50.581649Z" } }, "outputs": [], @@ -86,10 +86,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.850366Z", - "iopub.status.busy": "2024-10-29T13:27:32.850115Z", - "iopub.status.idle": "2024-10-29T13:27:32.853682Z", - "shell.execute_reply": "2024-10-29T13:27:32.853055Z" + "iopub.execute_input": "2024-10-29T14:02:50.585257Z", + "iopub.status.busy": "2024-10-29T14:02:50.584822Z", + "iopub.status.idle": "2024-10-29T14:02:50.588675Z", + "shell.execute_reply": "2024-10-29T14:02:50.588050Z" } }, "outputs": [], @@ -152,10 +152,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.855789Z", - "iopub.status.busy": "2024-10-29T13:27:32.855293Z", - "iopub.status.idle": "2024-10-29T13:27:32.859201Z", - "shell.execute_reply": "2024-10-29T13:27:32.858570Z" + "iopub.execute_input": "2024-10-29T14:02:50.591027Z", + "iopub.status.busy": "2024-10-29T14:02:50.590557Z", + "iopub.status.idle": "2024-10-29T14:02:50.594389Z", + "shell.execute_reply": "2024-10-29T14:02:50.593776Z" } }, "outputs": [], @@ -183,10 +183,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.861665Z", - "iopub.status.busy": "2024-10-29T13:27:32.861086Z", - "iopub.status.idle": "2024-10-29T13:27:32.864856Z", - "shell.execute_reply": "2024-10-29T13:27:32.864144Z" + "iopub.execute_input": "2024-10-29T14:02:50.596461Z", + "iopub.status.busy": "2024-10-29T14:02:50.596117Z", + "iopub.status.idle": "2024-10-29T14:02:50.599704Z", + "shell.execute_reply": "2024-10-29T14:02:50.599073Z" } }, "outputs": [ @@ -235,10 +235,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.867003Z", - "iopub.status.busy": "2024-10-29T13:27:32.866569Z", - "iopub.status.idle": "2024-10-29T13:27:32.870577Z", - "shell.execute_reply": "2024-10-29T13:27:32.869925Z" + "iopub.execute_input": "2024-10-29T14:02:50.601627Z", + "iopub.status.busy": "2024-10-29T14:02:50.601273Z", + "iopub.status.idle": "2024-10-29T14:02:50.605506Z", + "shell.execute_reply": "2024-10-29T14:02:50.604866Z" } }, "outputs": [], @@ -260,10 +260,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.872801Z", - "iopub.status.busy": "2024-10-29T13:27:32.872302Z", - "iopub.status.idle": "2024-10-29T13:27:32.876093Z", - "shell.execute_reply": "2024-10-29T13:27:32.875545Z" + "iopub.execute_input": "2024-10-29T14:02:50.607662Z", + "iopub.status.busy": "2024-10-29T14:02:50.607297Z", + "iopub.status.idle": "2024-10-29T14:02:50.610791Z", + "shell.execute_reply": "2024-10-29T14:02:50.610189Z" } }, "outputs": [ @@ -297,10 +297,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.878078Z", - "iopub.status.busy": "2024-10-29T13:27:32.877745Z", - "iopub.status.idle": "2024-10-29T13:27:32.884722Z", - "shell.execute_reply": "2024-10-29T13:27:32.884149Z" + "iopub.execute_input": "2024-10-29T14:02:50.612829Z", + "iopub.status.busy": "2024-10-29T14:02:50.612449Z", + "iopub.status.idle": "2024-10-29T14:02:50.619671Z", + "shell.execute_reply": "2024-10-29T14:02:50.619040Z" } }, "outputs": [ @@ -365,10 +365,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.886833Z", - "iopub.status.busy": "2024-10-29T13:27:32.886373Z", - "iopub.status.idle": "2024-10-29T13:27:32.890499Z", - "shell.execute_reply": "2024-10-29T13:27:32.889925Z" + "iopub.execute_input": "2024-10-29T14:02:50.621692Z", + "iopub.status.busy": "2024-10-29T14:02:50.621376Z", + "iopub.status.idle": "2024-10-29T14:02:50.625542Z", + "shell.execute_reply": "2024-10-29T14:02:50.624998Z" } }, "outputs": [ @@ -416,10 +416,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.892448Z", - "iopub.status.busy": "2024-10-29T13:27:32.892165Z", - "iopub.status.idle": "2024-10-29T13:27:32.895672Z", - "shell.execute_reply": "2024-10-29T13:27:32.895012Z" + "iopub.execute_input": "2024-10-29T14:02:50.627561Z", + "iopub.status.busy": "2024-10-29T14:02:50.627216Z", + "iopub.status.idle": "2024-10-29T14:02:50.630676Z", + "shell.execute_reply": "2024-10-29T14:02:50.630018Z" } }, "outputs": [], @@ -441,10 +441,10 @@ "execution_count": 11, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.897890Z", - "iopub.status.busy": "2024-10-29T13:27:32.897679Z", - "iopub.status.idle": "2024-10-29T13:27:32.901719Z", - "shell.execute_reply": "2024-10-29T13:27:32.901159Z" + "iopub.execute_input": "2024-10-29T14:02:50.632674Z", + "iopub.status.busy": "2024-10-29T14:02:50.632338Z", + "iopub.status.idle": "2024-10-29T14:02:50.636095Z", + "shell.execute_reply": "2024-10-29T14:02:50.635453Z" } }, "outputs": [ @@ -510,10 +510,10 @@ "execution_count": 12, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.903639Z", - "iopub.status.busy": "2024-10-29T13:27:32.903442Z", - "iopub.status.idle": "2024-10-29T13:27:32.907082Z", - "shell.execute_reply": "2024-10-29T13:27:32.906413Z" + "iopub.execute_input": "2024-10-29T14:02:50.638307Z", + "iopub.status.busy": "2024-10-29T14:02:50.637924Z", + "iopub.status.idle": "2024-10-29T14:02:50.641207Z", + "shell.execute_reply": "2024-10-29T14:02:50.640655Z" } }, "outputs": [ @@ -548,10 +548,10 @@ "execution_count": 13, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.909349Z", - "iopub.status.busy": "2024-10-29T13:27:32.908903Z", - "iopub.status.idle": "2024-10-29T13:27:32.912359Z", - "shell.execute_reply": "2024-10-29T13:27:32.911733Z" + "iopub.execute_input": "2024-10-29T14:02:50.643261Z", + "iopub.status.busy": "2024-10-29T14:02:50.642812Z", + "iopub.status.idle": "2024-10-29T14:02:50.646466Z", + "shell.execute_reply": "2024-10-29T14:02:50.645813Z" } }, "outputs": [ @@ -584,10 +584,10 @@ "execution_count": 14, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.914387Z", - "iopub.status.busy": "2024-10-29T13:27:32.914040Z", - "iopub.status.idle": "2024-10-29T13:27:32.917770Z", - "shell.execute_reply": "2024-10-29T13:27:32.917230Z" + "iopub.execute_input": "2024-10-29T14:02:50.648637Z", + "iopub.status.busy": "2024-10-29T14:02:50.648439Z", + "iopub.status.idle": "2024-10-29T14:02:50.652213Z", + "shell.execute_reply": "2024-10-29T14:02:50.651556Z" } }, "outputs": [ @@ -622,10 +622,10 @@ "execution_count": 15, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.919871Z", - "iopub.status.busy": "2024-10-29T13:27:32.919497Z", - "iopub.status.idle": "2024-10-29T13:27:32.923403Z", - "shell.execute_reply": "2024-10-29T13:27:32.922867Z" + "iopub.execute_input": "2024-10-29T14:02:50.654155Z", + "iopub.status.busy": "2024-10-29T14:02:50.653959Z", + "iopub.status.idle": "2024-10-29T14:02:50.658217Z", + "shell.execute_reply": "2024-10-29T14:02:50.657583Z" } }, "outputs": [ @@ -669,10 +669,10 @@ "execution_count": 16, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.925489Z", - "iopub.status.busy": "2024-10-29T13:27:32.925017Z", - "iopub.status.idle": "2024-10-29T13:27:32.930398Z", - "shell.execute_reply": "2024-10-29T13:27:32.929745Z" + "iopub.execute_input": "2024-10-29T14:02:50.660397Z", + "iopub.status.busy": "2024-10-29T14:02:50.659927Z", + "iopub.status.idle": "2024-10-29T14:02:50.665376Z", + "shell.execute_reply": "2024-10-29T14:02:50.664717Z" } }, "outputs": [ @@ -733,10 +733,10 @@ "execution_count": 17, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.932275Z", - "iopub.status.busy": "2024-10-29T13:27:32.932061Z", - "iopub.status.idle": "2024-10-29T13:27:32.935610Z", - "shell.execute_reply": "2024-10-29T13:27:32.935088Z" + "iopub.execute_input": "2024-10-29T14:02:50.667442Z", + "iopub.status.busy": "2024-10-29T14:02:50.667050Z", + "iopub.status.idle": "2024-10-29T14:02:50.670797Z", + "shell.execute_reply": "2024-10-29T14:02:50.670197Z" } }, "outputs": [], @@ -761,10 +761,10 @@ "execution_count": 18, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.937484Z", - "iopub.status.busy": "2024-10-29T13:27:32.937287Z", - "iopub.status.idle": "2024-10-29T13:27:32.947545Z", - "shell.execute_reply": "2024-10-29T13:27:32.947000Z" + "iopub.execute_input": "2024-10-29T14:02:50.672966Z", + "iopub.status.busy": "2024-10-29T14:02:50.672572Z", + "iopub.status.idle": "2024-10-29T14:02:50.683125Z", + "shell.execute_reply": "2024-10-29T14:02:50.682436Z" } }, "outputs": [], @@ -857,10 +857,10 @@ "execution_count": 19, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.949385Z", - "iopub.status.busy": "2024-10-29T13:27:32.949189Z", - "iopub.status.idle": "2024-10-29T13:27:32.952901Z", - "shell.execute_reply": "2024-10-29T13:27:32.952359Z" + "iopub.execute_input": "2024-10-29T14:02:50.685532Z", + "iopub.status.busy": "2024-10-29T14:02:50.685105Z", + "iopub.status.idle": "2024-10-29T14:02:50.689179Z", + "shell.execute_reply": "2024-10-29T14:02:50.688548Z" } }, "outputs": [ @@ -897,10 +897,10 @@ "execution_count": 20, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:32.954698Z", - "iopub.status.busy": "2024-10-29T13:27:32.954506Z", - "iopub.status.idle": "2024-10-29T13:27:32.959868Z", - "shell.execute_reply": "2024-10-29T13:27:32.959329Z" + "iopub.execute_input": "2024-10-29T14:02:50.691571Z", + "iopub.status.busy": "2024-10-29T14:02:50.691101Z", + "iopub.status.idle": "2024-10-29T14:02:50.697060Z", + "shell.execute_reply": "2024-10-29T14:02:50.696480Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-conductance.ipynb b/notebooks/nmodl-sympy-conductance.ipynb index e295f8b0e..574097eab 100644 --- a/notebooks/nmodl-sympy-conductance.ipynb +++ b/notebooks/nmodl-sympy-conductance.ipynb @@ -86,10 +86,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:35.461614Z", - "iopub.status.busy": "2024-10-29T13:27:35.461420Z", - "iopub.status.idle": "2024-10-29T13:27:36.256939Z", - "shell.execute_reply": "2024-10-29T13:27:36.256048Z" + "iopub.execute_input": "2024-10-29T14:02:53.366578Z", + "iopub.status.busy": "2024-10-29T14:02:53.366346Z", + "iopub.status.idle": "2024-10-29T14:02:54.189186Z", + "shell.execute_reply": "2024-10-29T14:02:54.188428Z" } }, "outputs": [], @@ -103,10 +103,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:36.259364Z", - "iopub.status.busy": "2024-10-29T13:27:36.259149Z", - "iopub.status.idle": "2024-10-29T13:27:36.290359Z", - "shell.execute_reply": "2024-10-29T13:27:36.289710Z" + "iopub.execute_input": "2024-10-29T14:02:54.191771Z", + "iopub.status.busy": "2024-10-29T14:02:54.191554Z", + "iopub.status.idle": "2024-10-29T14:02:54.224027Z", + "shell.execute_reply": "2024-10-29T14:02:54.223340Z" } }, "outputs": [], @@ -149,10 +149,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:36.292741Z", - "iopub.status.busy": "2024-10-29T13:27:36.292420Z", - "iopub.status.idle": "2024-10-29T13:27:36.567320Z", - "shell.execute_reply": "2024-10-29T13:27:36.566614Z" + "iopub.execute_input": "2024-10-29T14:02:54.226659Z", + "iopub.status.busy": "2024-10-29T14:02:54.226216Z", + "iopub.status.idle": "2024-10-29T14:02:54.518945Z", + "shell.execute_reply": "2024-10-29T14:02:54.518225Z" } }, "outputs": [ @@ -196,10 +196,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:36.569463Z", - "iopub.status.busy": "2024-10-29T13:27:36.569234Z", - "iopub.status.idle": "2024-10-29T13:27:36.701171Z", - "shell.execute_reply": "2024-10-29T13:27:36.700583Z" + "iopub.execute_input": "2024-10-29T14:02:54.521355Z", + "iopub.status.busy": "2024-10-29T14:02:54.520784Z", + "iopub.status.idle": "2024-10-29T14:02:54.656474Z", + "shell.execute_reply": "2024-10-29T14:02:54.655754Z" } }, "outputs": [ @@ -243,10 +243,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:36.703111Z", - "iopub.status.busy": "2024-10-29T13:27:36.702902Z", - "iopub.status.idle": "2024-10-29T13:27:36.711080Z", - "shell.execute_reply": "2024-10-29T13:27:36.710545Z" + "iopub.execute_input": "2024-10-29T14:02:54.658748Z", + "iopub.status.busy": "2024-10-29T14:02:54.658479Z", + "iopub.status.idle": "2024-10-29T14:02:54.667618Z", + "shell.execute_reply": "2024-10-29T14:02:54.667034Z" } }, "outputs": [ @@ -290,10 +290,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:36.713063Z", - "iopub.status.busy": "2024-10-29T13:27:36.712701Z", - "iopub.status.idle": "2024-10-29T13:27:36.730059Z", - "shell.execute_reply": "2024-10-29T13:27:36.729488Z" + "iopub.execute_input": "2024-10-29T14:02:54.669733Z", + "iopub.status.busy": "2024-10-29T14:02:54.669521Z", + "iopub.status.idle": "2024-10-29T14:02:54.688937Z", + "shell.execute_reply": "2024-10-29T14:02:54.688184Z" } }, "outputs": [ @@ -337,10 +337,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:36.732078Z", - "iopub.status.busy": "2024-10-29T13:27:36.731871Z", - "iopub.status.idle": "2024-10-29T13:27:36.852287Z", - "shell.execute_reply": "2024-10-29T13:27:36.851674Z" + "iopub.execute_input": "2024-10-29T14:02:54.691421Z", + "iopub.status.busy": "2024-10-29T14:02:54.690934Z", + "iopub.status.idle": "2024-10-29T14:02:54.814467Z", + "shell.execute_reply": "2024-10-29T14:02:54.813810Z" } }, "outputs": [ @@ -400,10 +400,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:36.854465Z", - "iopub.status.busy": "2024-10-29T13:27:36.854259Z", - "iopub.status.idle": "2024-10-29T13:27:36.950229Z", - "shell.execute_reply": "2024-10-29T13:27:36.949535Z" + "iopub.execute_input": "2024-10-29T14:02:54.816574Z", + "iopub.status.busy": "2024-10-29T14:02:54.816362Z", + "iopub.status.idle": "2024-10-29T14:02:54.912691Z", + "shell.execute_reply": "2024-10-29T14:02:54.912064Z" } }, "outputs": [ @@ -456,10 +456,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:36.952224Z", - "iopub.status.busy": "2024-10-29T13:27:36.952021Z", - "iopub.status.idle": "2024-10-29T13:27:37.026056Z", - "shell.execute_reply": "2024-10-29T13:27:37.025383Z" + "iopub.execute_input": "2024-10-29T14:02:54.914836Z", + "iopub.status.busy": "2024-10-29T14:02:54.914614Z", + "iopub.status.idle": "2024-10-29T14:02:54.991253Z", + "shell.execute_reply": "2024-10-29T14:02:54.990543Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-solver-cnexp.ipynb b/notebooks/nmodl-sympy-solver-cnexp.ipynb index 33fac4c5f..9f1ed4d8d 100644 --- a/notebooks/nmodl-sympy-solver-cnexp.ipynb +++ b/notebooks/nmodl-sympy-solver-cnexp.ipynb @@ -62,10 +62,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:38.968655Z", - "iopub.status.busy": "2024-10-29T13:27:38.968441Z", - "iopub.status.idle": "2024-10-29T13:27:39.777272Z", - "shell.execute_reply": "2024-10-29T13:27:39.775877Z" + "iopub.execute_input": "2024-10-29T14:02:56.995594Z", + "iopub.status.busy": "2024-10-29T14:02:56.995390Z", + "iopub.status.idle": "2024-10-29T14:02:57.819174Z", + "shell.execute_reply": "2024-10-29T14:02:57.818375Z" } }, "outputs": [], @@ -79,10 +79,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:39.780055Z", - "iopub.status.busy": "2024-10-29T13:27:39.779620Z", - "iopub.status.idle": "2024-10-29T13:27:39.810993Z", - "shell.execute_reply": "2024-10-29T13:27:39.810251Z" + "iopub.execute_input": "2024-10-29T14:02:57.821994Z", + "iopub.status.busy": "2024-10-29T14:02:57.821582Z", + "iopub.status.idle": "2024-10-29T14:02:57.854128Z", + "shell.execute_reply": "2024-10-29T14:02:57.853287Z" } }, "outputs": [], @@ -123,10 +123,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:39.813587Z", - "iopub.status.busy": "2024-10-29T13:27:39.813200Z", - "iopub.status.idle": "2024-10-29T13:27:40.234560Z", - "shell.execute_reply": "2024-10-29T13:27:40.233839Z" + "iopub.execute_input": "2024-10-29T14:02:57.856924Z", + "iopub.status.busy": "2024-10-29T14:02:57.856510Z", + "iopub.status.idle": "2024-10-29T14:02:58.309772Z", + "shell.execute_reply": "2024-10-29T14:02:58.309017Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:40.236830Z", - "iopub.status.busy": "2024-10-29T13:27:40.236414Z", - "iopub.status.idle": "2024-10-29T13:27:40.347679Z", - "shell.execute_reply": "2024-10-29T13:27:40.346960Z" + "iopub.execute_input": "2024-10-29T14:02:58.312261Z", + "iopub.status.busy": "2024-10-29T14:02:58.311814Z", + "iopub.status.idle": "2024-10-29T14:02:58.427839Z", + "shell.execute_reply": "2024-10-29T14:02:58.427197Z" } }, "outputs": [ @@ -207,10 +207,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:40.350168Z", - "iopub.status.busy": "2024-10-29T13:27:40.349770Z", - "iopub.status.idle": "2024-10-29T13:27:40.550305Z", - "shell.execute_reply": "2024-10-29T13:27:40.549663Z" + "iopub.execute_input": "2024-10-29T14:02:58.430145Z", + "iopub.status.busy": "2024-10-29T14:02:58.429729Z", + "iopub.status.idle": "2024-10-29T14:02:58.635646Z", + "shell.execute_reply": "2024-10-29T14:02:58.634895Z" } }, "outputs": [ @@ -255,10 +255,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:40.552642Z", - "iopub.status.busy": "2024-10-29T13:27:40.552191Z", - "iopub.status.idle": "2024-10-29T13:27:40.715706Z", - "shell.execute_reply": "2024-10-29T13:27:40.714995Z" + "iopub.execute_input": "2024-10-29T14:02:58.637697Z", + "iopub.status.busy": "2024-10-29T14:02:58.637494Z", + "iopub.status.idle": "2024-10-29T14:02:58.801703Z", + "shell.execute_reply": "2024-10-29T14:02:58.801049Z" } }, "outputs": [ @@ -303,10 +303,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:40.718084Z", - "iopub.status.busy": "2024-10-29T13:27:40.717685Z", - "iopub.status.idle": "2024-10-29T13:27:42.494346Z", - "shell.execute_reply": "2024-10-29T13:27:42.493696Z" + "iopub.execute_input": "2024-10-29T14:02:58.803883Z", + "iopub.status.busy": "2024-10-29T14:02:58.803631Z", + "iopub.status.idle": "2024-10-29T14:03:00.610726Z", + "shell.execute_reply": "2024-10-29T14:03:00.610076Z" } }, "outputs": [ @@ -351,10 +351,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:42.496658Z", - "iopub.status.busy": "2024-10-29T13:27:42.496193Z", - "iopub.status.idle": "2024-10-29T13:27:44.762201Z", - "shell.execute_reply": "2024-10-29T13:27:44.761502Z" + "iopub.execute_input": "2024-10-29T14:03:00.612985Z", + "iopub.status.busy": "2024-10-29T14:03:00.612560Z", + "iopub.status.idle": "2024-10-29T14:03:02.877976Z", + "shell.execute_reply": "2024-10-29T14:03:02.877244Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-solver-derivimplicit.ipynb b/notebooks/nmodl-sympy-solver-derivimplicit.ipynb index a97681a26..b24490f45 100644 --- a/notebooks/nmodl-sympy-solver-derivimplicit.ipynb +++ b/notebooks/nmodl-sympy-solver-derivimplicit.ipynb @@ -39,10 +39,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:46.477385Z", - "iopub.status.busy": "2024-10-29T13:27:46.477190Z", - "iopub.status.idle": "2024-10-29T13:27:47.281937Z", - "shell.execute_reply": "2024-10-29T13:27:47.281178Z" + "iopub.execute_input": "2024-10-29T14:03:04.590904Z", + "iopub.status.busy": "2024-10-29T14:03:04.590329Z", + "iopub.status.idle": "2024-10-29T14:03:05.422998Z", + "shell.execute_reply": "2024-10-29T14:03:05.422027Z" } }, "outputs": [], @@ -56,10 +56,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:47.284714Z", - "iopub.status.busy": "2024-10-29T13:27:47.284156Z", - "iopub.status.idle": "2024-10-29T13:27:47.315134Z", - "shell.execute_reply": "2024-10-29T13:27:47.314388Z" + "iopub.execute_input": "2024-10-29T14:03:05.426050Z", + "iopub.status.busy": "2024-10-29T14:03:05.425787Z", + "iopub.status.idle": "2024-10-29T14:03:05.459072Z", + "shell.execute_reply": "2024-10-29T14:03:05.458344Z" } }, "outputs": [], @@ -100,10 +100,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:47.317821Z", - "iopub.status.busy": "2024-10-29T13:27:47.317357Z", - "iopub.status.idle": "2024-10-29T13:27:47.804485Z", - "shell.execute_reply": "2024-10-29T13:27:47.803819Z" + "iopub.execute_input": "2024-10-29T14:03:05.461761Z", + "iopub.status.busy": "2024-10-29T14:03:05.461269Z", + "iopub.status.idle": "2024-10-29T14:03:05.967885Z", + "shell.execute_reply": "2024-10-29T14:03:05.967190Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:47.806846Z", - "iopub.status.busy": "2024-10-29T13:27:47.806415Z", - "iopub.status.idle": "2024-10-29T13:27:48.102612Z", - "shell.execute_reply": "2024-10-29T13:27:48.101897Z" + "iopub.execute_input": "2024-10-29T14:03:05.970331Z", + "iopub.status.busy": "2024-10-29T14:03:05.969831Z", + "iopub.status.idle": "2024-10-29T14:03:06.271426Z", + "shell.execute_reply": "2024-10-29T14:03:06.270696Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-solver-sparse.ipynb b/notebooks/nmodl-sympy-solver-sparse.ipynb index 006e1e6e2..3e87d24d1 100644 --- a/notebooks/nmodl-sympy-solver-sparse.ipynb +++ b/notebooks/nmodl-sympy-solver-sparse.ipynb @@ -39,10 +39,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:49.600302Z", - "iopub.status.busy": "2024-10-29T13:27:49.599722Z", - "iopub.status.idle": "2024-10-29T13:27:50.417165Z", - "shell.execute_reply": "2024-10-29T13:27:50.416403Z" + "iopub.execute_input": "2024-10-29T14:03:07.623142Z", + "iopub.status.busy": "2024-10-29T14:03:07.622904Z", + "iopub.status.idle": "2024-10-29T14:03:08.461542Z", + "shell.execute_reply": "2024-10-29T14:03:08.460699Z" } }, "outputs": [], @@ -56,10 +56,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:50.419891Z", - "iopub.status.busy": "2024-10-29T13:27:50.419480Z", - "iopub.status.idle": "2024-10-29T13:27:50.449961Z", - "shell.execute_reply": "2024-10-29T13:27:50.449339Z" + "iopub.execute_input": "2024-10-29T14:03:08.464087Z", + "iopub.status.busy": "2024-10-29T14:03:08.463856Z", + "iopub.status.idle": "2024-10-29T14:03:08.496268Z", + "shell.execute_reply": "2024-10-29T14:03:08.495587Z" } }, "outputs": [], @@ -100,10 +100,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:50.452300Z", - "iopub.status.busy": "2024-10-29T13:27:50.451955Z", - "iopub.status.idle": "2024-10-29T13:27:50.948325Z", - "shell.execute_reply": "2024-10-29T13:27:50.947670Z" + "iopub.execute_input": "2024-10-29T14:03:08.498707Z", + "iopub.status.busy": "2024-10-29T14:03:08.498457Z", + "iopub.status.idle": "2024-10-29T14:03:09.009890Z", + "shell.execute_reply": "2024-10-29T14:03:09.009191Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-10-29T13:27:50.950675Z", - "iopub.status.busy": "2024-10-29T13:27:50.950106Z", - "iopub.status.idle": "2024-10-29T13:27:51.247951Z", - "shell.execute_reply": "2024-10-29T13:27:51.247225Z" + "iopub.execute_input": "2024-10-29T14:03:09.012271Z", + "iopub.status.busy": "2024-10-29T14:03:09.011788Z", + "iopub.status.idle": "2024-10-29T14:03:09.311561Z", + "shell.execute_reply": "2024-10-29T14:03:09.310925Z" } }, "outputs": [