x[id] = _args[1];
So, the R
in AST needs to be renamed with _args[1]
.
-Definition at line 2232 of file codegen_neuron_cpp_visitor.cpp.
+Definition at line 2230 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 52f7ed6d7..97ead3f8d 100644
--- a/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html
+++ b/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html
@@ -1022,1405 +1022,1403 @@
-
-
- 931 if (!info.function_tables.empty()) {
- 932 throw std::runtime_error(
"Not implemented, global function tables.");
-
-
- 935 if (info.vectorize && info.thread_data_index) {
-
-
-
-
- 940 if (info.diam_used) {
- 941 printer->fmt_line(
"Symbol* _morphology_sym;");
-
+ 929 if (!info.function_tables.empty()) {
+ 930 throw std::runtime_error(
"Not implemented, global function tables.");
+
+
+ 933 if (info.vectorize && info.thread_data_index) {
+
+
+
+
+ 938 if (info.diam_used) {
+ 939 printer->fmt_line(
"Symbol* _morphology_sym;");
+
+
+ 942 printer->pop_block(
";");
- 944 printer->pop_block(
";");
-
- 946 print_global_var_struct_assertions();
- 947 print_global_var_struct_decl();
-
- 949 print_global_param_default_values();
-
-
-
- 953 printer->push_block(
"static std::vector<double> _parameter_defaults =");
-
- 955 std::vector<std::string> defaults;
- 956 for (
const auto& p: info.range_parameter_vars) {
- 957 double value = p->get_value() ==
nullptr ? 0.0 : *p->get_value();
- 958 defaults.push_back(fmt::format(
"{:g} /* {} */", value, p->get_name()));
-
-
- 961 printer->add_multi_line(fmt::format(
"{}", fmt::join(defaults,
",\n")));
- 962 printer->pop_block(
";");
-
-
-
- 966 auto variable_printer = [&](
const std::vector<SymbolType>& variables,
bool if_array) {
- 967 for (
const auto& variable: variables) {
- 968 if (variable->is_array() == if_array) {
-
-
- 971 auto name = get_variable_name(variable->get_name(),
false);
- 972 auto ename = add_escape_quote(variable->get_name() +
"_" + info.mod_suffix);
-
- 974 auto length = variable->get_length();
- 975 printer->fmt_line(
"{{{}, {}, {}}},", ename, name, length);
-
- 977 printer->fmt_line(
"{{{}, &{}}},", ename, name);
-
-
-
-
-
- 983 auto globals = info.global_variables;
- 984 auto thread_vars = info.thread_variables;
-
- 986 if (info.table_count > 0) {
-
-
-
- 990 printer->add_newline(2);
- 991 printer->add_line(
"/** connect global (scalar) variables to hoc -- */");
- 992 printer->add_line(
"static DoubScal hoc_scalar_double[] = {");
- 993 printer->increase_indent();
- 994 variable_printer(globals,
false);
- 995 variable_printer(thread_vars,
false);
- 996 printer->add_line(
"{nullptr, nullptr}");
- 997 printer->decrease_indent();
- 998 printer->add_line(
"};");
-
- 1000 printer->add_newline(2);
- 1001 printer->add_line(
"/** connect global (array) variables to hoc -- */");
- 1002 printer->add_line(
"static DoubVec hoc_vector_double[] = {");
- 1003 printer->increase_indent();
- 1004 variable_printer(globals,
true);
- 1005 variable_printer(thread_vars,
true);
- 1006 printer->add_line(
"{nullptr, nullptr, 0}");
- 1007 printer->decrease_indent();
- 1008 printer->add_line(
"};");
-
- 1010 printer->add_newline(2);
- 1011 printer->add_line(
"/* declaration of user functions */");
- 1012 for (
const auto& procedure: info.procedures) {
- 1013 const auto proc_name = procedure->get_node_name();
- 1014 printer->fmt_line(
"{};", hoc_function_signature(proc_name));
-
- 1016 for (
const auto&
function: info.functions) {
- 1017 const auto func_name =
function->get_node_name();
- 1018 printer->fmt_line(
"{};", hoc_function_signature(func_name));
-
- 1020 if (!info.point_process) {
- 1021 for (
const auto& procedure: info.procedures) {
- 1022 const auto proc_name = procedure->get_node_name();
- 1023 printer->fmt_line(
"{};", py_function_signature(proc_name));
-
- 1025 for (
const auto&
function: info.functions) {
- 1026 const auto func_name =
function->get_node_name();
- 1027 printer->fmt_line(
"{};", py_function_signature(func_name));
-
-
-
- 1031 printer->add_newline(2);
- 1032 printer->add_line(
"/* connect user functions to hoc names */");
- 1033 printer->add_line(
"static VoidFunc hoc_intfunc[] = {");
- 1034 printer->increase_indent();
- 1035 if (info.point_process) {
- 1036 printer->add_line(
"{0, 0}");
- 1037 printer->decrease_indent();
- 1038 printer->add_line(
"};");
- 1039 printer->add_line(
"static Member_func _member_func[] = {");
- 1040 printer->increase_indent();
- 1041 printer->add_multi_line(R
"CODE(
- 1042 {"loc", _hoc_loc_pnt},
- 1043 {"has_loc", _hoc_has_loc},
- 1044 {"get_loc", _hoc_get_loc_pnt},)CODE");
-
- 1046 printer->fmt_line(
"{{\"setdata_{}\", _hoc_setdata}},", info.mod_suffix);
-
-
- 1049 for (
const auto& procedure: info.procedures) {
- 1050 const auto proc_name = procedure->get_node_name();
- 1051 printer->fmt_line(
"{{\"{}{}\", {}}},",
-
-
- 1054 hoc_function_name(proc_name));
-
- 1056 for (
const auto&
function: info.functions) {
- 1057 const auto func_name =
function->get_node_name();
- 1058 printer->fmt_line(
"{{\"{}{}\", {}}},",
-
-
- 1061 hoc_function_name(func_name));
-
-
- 1064 printer->add_line(
"{nullptr, nullptr}");
- 1065 printer->decrease_indent();
- 1066 printer->add_line(
"};");
- 1067 if (!info.point_process) {
- 1068 printer->push_block(
"static NPyDirectMechFunc npy_direct_func_proc[] =");
- 1069 for (
const auto& procedure: info.procedures) {
- 1070 const auto proc_name = procedure->get_node_name();
- 1071 printer->fmt_line(
"{{\"{}\", {}}},", proc_name, py_function_name(proc_name));
-
- 1073 for (
const auto&
function: info.functions) {
- 1074 const auto func_name =
function->get_node_name();
- 1075 printer->fmt_line(
"{{\"{}\", {}}},", func_name, py_function_name(func_name));
-
- 1077 printer->add_line(
"{nullptr, nullptr}");
- 1078 printer->pop_block(
";");
-
-
-
-
- 1083 printer->add_newline(2);
- 1084 printer->add_line(
"/** register channel with the simulator */");
- 1085 printer->fmt_push_block(
"extern \"C\" void _{}_reg()", info.mod_file);
- 1086 printer->add_line(
"_initlists();");
- 1087 printer->add_newline();
-
- 1089 for (
const auto& ion: info.ions) {
- 1090 double valence = ion.valence.value_or(-10000.0);
- 1091 printer->fmt_line(
"ion_reg(\"{}\", {});", ion.name, valence);
-
- 1093 if (!info.ions.empty()) {
- 1094 printer->add_newline();
-
-
- 1097 for (
const auto& ion: info.ions) {
- 1098 printer->fmt_line(
"_{0}_sym = hoc_lookup(\"{0}_ion\");", ion.name);
-
- 1100 if (!info.ions.empty()) {
- 1101 printer->add_newline();
-
-
- 1104 const auto compute_functions_parameters =
-
- 1106 ? fmt::format(
"{}, {}, {}",
-
-
-
- 1110 :
"nullptr, nullptr, nullptr";
- 1111 const auto register_mech_args = fmt::format(
"{}, {}, {}, {}, {}, {}",
- 1112 get_channel_info_var_name(),
-
- 1114 compute_functions_parameters,
-
-
- 1117 1 + info.thread_data_index);
- 1118 if (info.point_process) {
-
- 1120 "_pointtype = point_register_mech({}, _hoc_create_pnt, _hoc_destroy_pnt, "
-
- 1122 register_mech_args);
-
- 1124 if (info.destructor_node) {
- 1125 printer->fmt_line(
"register_destructor({});",
-
-
-
- 1129 printer->fmt_line(
"register_mech({});", register_mech_args);
-
-
-
- 1133 if (info.thread_callback_register) {
- 1134 printer->fmt_line(
"_extcall_thread.resize({});", info.thread_data_index + 1);
- 1135 printer->fmt_line(
"thread_mem_init(_extcall_thread.data());");
- 1136 printer->fmt_line(
"{} = 0;", get_variable_name(
"thread_data_in_use",
false));
-
-
-
-
- 1141 printer->add_newline();
- 1142 printer->fmt_line(
"mech_type = nrn_get_mechtype({}[1]);", get_channel_info_var_name());
+ 944 print_global_var_struct_assertions();
+ 945 print_global_var_struct_decl();
+
+ 947 print_global_param_default_values();
+
+
+
+ 951 printer->push_block(
"static std::vector<double> _parameter_defaults =");
+
+ 953 std::vector<std::string> defaults;
+ 954 for (
const auto& p: info.range_parameter_vars) {
+ 955 double value = p->get_value() ==
nullptr ? 0.0 : *p->get_value();
+ 956 defaults.push_back(fmt::format(
"{:g} /* {} */", value, p->get_name()));
+
+
+ 959 printer->add_multi_line(fmt::format(
"{}", fmt::join(defaults,
",\n")));
+ 960 printer->pop_block(
";");
+
+
+
+ 964 auto variable_printer = [&](
const std::vector<SymbolType>& variables,
bool if_array) {
+ 965 for (
const auto& variable: variables) {
+ 966 if (variable->is_array() == if_array) {
+
+
+ 969 auto name = get_variable_name(variable->get_name(),
false);
+ 970 auto ename = add_escape_quote(variable->get_name() +
"_" + info.mod_suffix);
+
+ 972 auto length = variable->get_length();
+ 973 printer->fmt_line(
"{{{}, {}, {}}},", ename, name, length);
+
+ 975 printer->fmt_line(
"{{{}, &{}}},", ename, name);
+
+
+
+
+
+ 981 auto globals = info.global_variables;
+ 982 auto thread_vars = info.thread_variables;
+
+ 984 if (info.table_count > 0) {
+
+
+
+ 988 printer->add_newline(2);
+ 989 printer->add_line(
"/** connect global (scalar) variables to hoc -- */");
+ 990 printer->add_line(
"static DoubScal hoc_scalar_double[] = {");
+ 991 printer->increase_indent();
+ 992 variable_printer(globals,
false);
+ 993 variable_printer(thread_vars,
false);
+ 994 printer->add_line(
"{nullptr, nullptr}");
+ 995 printer->decrease_indent();
+ 996 printer->add_line(
"};");
+
+ 998 printer->add_newline(2);
+ 999 printer->add_line(
"/** connect global (array) variables to hoc -- */");
+ 1000 printer->add_line(
"static DoubVec hoc_vector_double[] = {");
+ 1001 printer->increase_indent();
+ 1002 variable_printer(globals,
true);
+ 1003 variable_printer(thread_vars,
true);
+ 1004 printer->add_line(
"{nullptr, nullptr, 0}");
+ 1005 printer->decrease_indent();
+ 1006 printer->add_line(
"};");
+
+ 1008 printer->add_newline(2);
+ 1009 printer->add_line(
"/* declaration of user functions */");
+ 1010 for (
const auto& procedure: info.procedures) {
+ 1011 const auto proc_name = procedure->get_node_name();
+ 1012 printer->fmt_line(
"{};", hoc_function_signature(proc_name));
+
+ 1014 for (
const auto&
function: info.functions) {
+ 1015 const auto func_name =
function->get_node_name();
+ 1016 printer->fmt_line(
"{};", hoc_function_signature(func_name));
+
+ 1018 if (!info.point_process) {
+ 1019 for (
const auto& procedure: info.procedures) {
+ 1020 const auto proc_name = procedure->get_node_name();
+ 1021 printer->fmt_line(
"{};", py_function_signature(proc_name));
+
+ 1023 for (
const auto&
function: info.functions) {
+ 1024 const auto func_name =
function->get_node_name();
+ 1025 printer->fmt_line(
"{};", py_function_signature(func_name));
+
+
+
+ 1029 printer->add_newline(2);
+ 1030 printer->add_line(
"/* connect user functions to hoc names */");
+ 1031 printer->add_line(
"static VoidFunc hoc_intfunc[] = {");
+ 1032 printer->increase_indent();
+ 1033 if (info.point_process) {
+ 1034 printer->add_line(
"{0, 0}");
+ 1035 printer->decrease_indent();
+ 1036 printer->add_line(
"};");
+ 1037 printer->add_line(
"static Member_func _member_func[] = {");
+ 1038 printer->increase_indent();
+ 1039 printer->add_multi_line(R
"CODE(
+ 1040 {"loc", _hoc_loc_pnt},
+ 1041 {"has_loc", _hoc_has_loc},
+ 1042 {"get_loc", _hoc_get_loc_pnt},)CODE");
+
+ 1044 printer->fmt_line(
"{{\"setdata_{}\", _hoc_setdata}},", info.mod_suffix);
+
+
+ 1047 for (
const auto& procedure: info.procedures) {
+ 1048 const auto proc_name = procedure->get_node_name();
+ 1049 printer->fmt_line(
"{{\"{}{}\", {}}},",
+
+
+ 1052 hoc_function_name(proc_name));
+
+ 1054 for (
const auto&
function: info.functions) {
+ 1055 const auto func_name =
function->get_node_name();
+ 1056 printer->fmt_line(
"{{\"{}{}\", {}}},",
+
+
+ 1059 hoc_function_name(func_name));
+
+
+ 1062 printer->add_line(
"{nullptr, nullptr}");
+ 1063 printer->decrease_indent();
+ 1064 printer->add_line(
"};");
+ 1065 if (!info.point_process) {
+ 1066 printer->push_block(
"static NPyDirectMechFunc npy_direct_func_proc[] =");
+ 1067 for (
const auto& procedure: info.procedures) {
+ 1068 const auto proc_name = procedure->get_node_name();
+ 1069 printer->fmt_line(
"{{\"{}\", {}}},", proc_name, py_function_name(proc_name));
+
+ 1071 for (
const auto&
function: info.functions) {
+ 1072 const auto func_name =
function->get_node_name();
+ 1073 printer->fmt_line(
"{{\"{}\", {}}},", func_name, py_function_name(func_name));
+
+ 1075 printer->add_line(
"{nullptr, nullptr}");
+ 1076 printer->pop_block(
";");
+
+
+
+
+ 1081 printer->add_newline(2);
+ 1082 printer->add_line(
"/** register channel with the simulator */");
+ 1083 printer->fmt_push_block(
"extern \"C\" void _{}_reg()", info.mod_file);
+ 1084 printer->add_line(
"_initlists();");
+ 1085 printer->add_newline();
+
+ 1087 for (
const auto& ion: info.ions) {
+ 1088 double valence = ion.valence.value_or(-10000.0);
+ 1089 printer->fmt_line(
"ion_reg(\"{}\", {});", ion.name, valence);
+
+ 1091 if (!info.ions.empty()) {
+ 1092 printer->add_newline();
+
+
+ 1095 for (
const auto& ion: info.ions) {
+ 1096 printer->fmt_line(
"_{0}_sym = hoc_lookup(\"{0}_ion\");", ion.name);
+
+ 1098 if (!info.ions.empty()) {
+ 1099 printer->add_newline();
+
+
+ 1102 const auto compute_functions_parameters =
+
+ 1104 ? fmt::format(
"{}, {}, {}",
+
+
+
+ 1108 :
"nullptr, nullptr, nullptr";
+ 1109 const auto register_mech_args = fmt::format(
"{}, {}, {}, {}, {}, {}",
+ 1110 get_channel_info_var_name(),
+
+ 1112 compute_functions_parameters,
+
+
+ 1115 1 + info.thread_data_index);
+ 1116 if (info.point_process) {
+
+ 1118 "_pointtype = point_register_mech({}, _hoc_create_pnt, _hoc_destroy_pnt, "
+
+ 1120 register_mech_args);
+
+ 1122 if (info.destructor_node) {
+ 1123 printer->fmt_line(
"register_destructor({});",
+
+
+
+ 1127 printer->fmt_line(
"register_mech({});", register_mech_args);
+
+
+
+ 1131 if (info.thread_callback_register) {
+ 1132 printer->fmt_line(
"_extcall_thread.resize({});", info.thread_data_index + 1);
+ 1133 printer->fmt_line(
"thread_mem_init(_extcall_thread.data());");
+ 1134 printer->fmt_line(
"{} = 0;", get_variable_name(
"thread_data_in_use",
false));
+
+
+
+
+ 1139 printer->add_newline();
+ 1140 printer->fmt_line(
"mech_type = nrn_get_mechtype({}[1]);", get_channel_info_var_name());
+
+ 1142 printer->add_line(
"hoc_register_parm_default(mech_type, &_parameter_defaults);");
- 1144 printer->add_line(
"hoc_register_parm_default(mech_type, &_parameter_defaults);");
-
-
- 1147 if (info.table_count > 0) {
- 1148 printer->fmt_line(
"_nrn_thread_table_reg(mech_type, {});", table_thread_function_name());
-
-
- 1151 printer->add_line(
"_nrn_mechanism_register_data_fields(mech_type,");
- 1152 printer->increase_indent();
-
- 1154 const auto codegen_float_variables_size = codegen_float_variables.size();
- 1155 std::vector<std::string> mech_register_args;
-
- 1157 for (
int i = 0; i < codegen_float_variables_size; ++i) {
- 1158 const auto& float_var = codegen_float_variables[i];
- 1159 if (float_var->is_array()) {
- 1160 mech_register_args.push_back(
- 1161 fmt::format(
"_nrn_mechanism_field<double>{{\"{}\", {}}} /* {} */",
- 1162 float_var->get_name(),
- 1163 float_var->get_length(),
-
-
- 1166 mech_register_args.push_back(fmt::format(
- 1167 "_nrn_mechanism_field<double>{{\"{}\"}} /* {} */", float_var->get_name(), i));
-
-
-
- 1171 const auto codegen_int_variables_size = codegen_int_variables.size();
- 1172 for (
int i = 0; i < codegen_int_variables_size; ++i) {
- 1173 const auto& int_var = codegen_int_variables[i];
- 1174 const auto& name = int_var.symbol->get_name();
- 1175 if (i != info.semantics[i].index) {
- 1176 throw std::runtime_error(
"Broken logic.");
-
-
- 1179 auto type =
"double*";
-
- 1181 type =
"Point_process*";
-
-
-
-
-
-
-
-
- 1190 mech_register_args.push_back(
- 1191 fmt::format(
"_nrn_mechanism_field<{}>{{\"{}\", \"{}\"}} /* {} */",
-
-
- 1194 info.semantics[i].name,
-
-
+
+ 1145 if (info.table_count > 0) {
+ 1146 printer->fmt_line(
"_nrn_thread_table_reg(mech_type, {});", table_thread_function_name());
+
+
+ 1149 printer->add_line(
"_nrn_mechanism_register_data_fields(mech_type,");
+ 1150 printer->increase_indent();
+
+ 1152 const auto codegen_float_variables_size = codegen_float_variables.size();
+ 1153 std::vector<std::string> mech_register_args;
+
+ 1155 for (
int i = 0; i < codegen_float_variables_size; ++i) {
+ 1156 const auto& float_var = codegen_float_variables[i];
+ 1157 if (float_var->is_array()) {
+ 1158 mech_register_args.push_back(
+ 1159 fmt::format(
"_nrn_mechanism_field<double>{{\"{}\", {}}} /* {} */",
+ 1160 float_var->get_name(),
+ 1161 float_var->get_length(),
+
+
+ 1164 mech_register_args.push_back(fmt::format(
+ 1165 "_nrn_mechanism_field<double>{{\"{}\"}} /* {} */", float_var->get_name(), i));
+
+
+
+ 1169 const auto codegen_int_variables_size = codegen_int_variables.size();
+ 1170 for (
int i = 0; i < codegen_int_variables_size; ++i) {
+ 1171 const auto& int_var = codegen_int_variables[i];
+ 1172 const auto& name = int_var.symbol->get_name();
+ 1173 if (i != info.semantics[i].index) {
+ 1174 throw std::runtime_error(
"Broken logic.");
+
+
+ 1177 auto type =
"double*";
+
+ 1179 type =
"Point_process*";
+
+
+
+
+
+
+
+
+ 1188 mech_register_args.push_back(
+ 1189 fmt::format(
"_nrn_mechanism_field<{}>{{\"{}\", \"{}\"}} /* {} */",
+
+
+ 1192 info.semantics[i].name,
+
+
+
+ 1196 printer->add_multi_line(fmt::format(
"{}", fmt::join(mech_register_args,
",\n")));
- 1198 printer->add_multi_line(fmt::format(
"{}", fmt::join(mech_register_args,
",\n")));
-
- 1200 printer->decrease_indent();
- 1201 printer->add_line(
");");
- 1202 printer->add_newline();
-
-
- 1205 printer->fmt_line(
"hoc_register_prop_size(mech_type, {}, {});",
- 1206 float_variables_size(),
- 1207 int_variables_size());
-
- 1209 for (
int i = 0; i < codegen_int_variables_size; ++i) {
- 1210 if (i != info.semantics[i].index) {
- 1211 throw std::runtime_error(
"Broken logic.");
-
-
- 1214 printer->fmt_line(
"hoc_register_dparam_semantics(mech_type, {}, \"{}\");",
-
- 1216 info.semantics[i].name);
-
-
- 1219 if (info.write_concentration) {
- 1220 printer->fmt_line(
"nrn_writes_conc(mech_type, 0);");
-
-
- 1223 if (info.artificial_cell) {
- 1224 printer->fmt_line(
"add_nrn_artcell(mech_type, {});", info.tqitem_index);
-
-
- 1227 if (info.net_event_used) {
- 1228 printer->fmt_line(
"add_nrn_has_net_event(mech_type);");
-
-
- 1231 printer->add_line(
"hoc_register_var(hoc_scalar_double, hoc_vector_double, hoc_intfunc);");
- 1232 if (!info.point_process) {
- 1233 printer->add_line(
"hoc_register_npy_direct(mech_type, npy_direct_func_proc);");
-
- 1235 if (info.net_receive_node) {
- 1236 printer->fmt_line(
"pnt_receive[mech_type] = nrn_net_receive_{};", info.mod_suffix);
- 1237 printer->fmt_line(
"pnt_receive_size[mech_type] = {};", info.num_net_receive_parameters);
-
-
- 1240 if (info.thread_callback_register) {
- 1241 printer->add_line(
"_nrn_thread_reg(mech_type, 1, thread_mem_init);");
- 1242 printer->add_line(
"_nrn_thread_reg(mech_type, 0, thread_mem_cleanup);");
-
-
- 1245 if (info.diam_used) {
- 1246 printer->fmt_line(
"{}._morphology_sym = hoc_lookup(\"morphology\");",
- 1247 global_struct_instance());
-
-
- 1250 printer->pop_block();
-
-
-
-
- 1255 if (!info.thread_callback_register) {
-
-
-
- 1259 auto static_thread_data = get_variable_name(
"thread_data",
false);
- 1260 auto inuse = get_variable_name(
"thread_data_in_use",
false);
- 1261 auto thread_data_index = info.thread_var_thread_id;
- 1262 printer->push_block(
"static void thread_mem_init(Datum* _thread) ");
- 1263 printer->push_block(fmt::format(
"if({})", inuse));
- 1264 printer->fmt_line(
"_thread[{}] = {{neuron::container::do_not_search, new double[{}]{{}}}};",
-
- 1266 info.thread_var_data_size + info.top_local_thread_size);
- 1267 printer->pop_block();
- 1268 printer->push_block(
"else");
- 1269 printer->fmt_line(
"_thread[{}] = {{neuron::container::do_not_search, {}}};",
-
- 1271 static_thread_data);
- 1272 printer->fmt_line(
"{} = 1;", inuse);
- 1273 printer->pop_block();
- 1274 printer->pop_block();
-
- 1276 printer->push_block(
"static void thread_mem_cleanup(Datum* _thread) ");
- 1277 printer->fmt_line(
"double * _thread_data_ptr = _thread[{}].get<double*>();", thread_data_index);
- 1278 printer->push_block(fmt::format(
"if(_thread_data_ptr == {})", static_thread_data));
- 1279 printer->fmt_line(
"{} = 0;", inuse);
- 1280 printer->pop_block();
- 1281 printer->push_block(
"else");
- 1282 printer->add_line(
"delete[] _thread_data_ptr;");
- 1283 printer->pop_block();
- 1284 printer->pop_block();
-
-
-
-
- 1289 for (
auto const& [var, type]: info.neuron_global_variables) {
- 1290 auto const name = var->get_name();
- 1291 printer->fmt_line(
"extern {} {};", type, name);
-
-
-
-
- 1296 auto const value_initialize = print_initializers ?
"{}" :
"";
- 1297 printer->add_newline(2);
- 1298 printer->add_line(
"/** all mechanism instance variables and global variables */");
- 1299 printer->fmt_push_block(
"struct {} ", instance_struct());
-
- 1301 for (
auto const& [var, type]: info.neuron_global_variables) {
- 1302 auto const name = var->get_name();
- 1303 printer->fmt_line(
"{}* {}{};",
-
-
- 1306 print_initializers ? fmt::format(
"{{&::{}}}", name) : std::string{});
-
- 1308 for (
auto& var: codegen_float_variables) {
- 1309 const auto& name = var->get_name();
- 1310 printer->fmt_line(
"double* {}{};", name, value_initialize);
-
- 1312 for (
auto& var: codegen_int_variables) {
- 1313 const auto& name = var.symbol->get_name();
-
-
- 1316 }
else if (var.is_index || var.is_integer) {
-
-
- 1319 auto qualifier = var.is_constant ?
"const " :
"";
- 1320 auto type = var.is_vdata ?
"void*" : default_float_data_type();
- 1321 printer->fmt_line(
"{}{}* const* {}{};", qualifier, type, name, value_initialize);
-
-
-
- 1325 printer->fmt_line(
"{}* {}{};",
-
-
- 1328 print_initializers ? fmt::format(
"{{&{}}}", global_struct_instance())
-
- 1330 printer->pop_block(
";");
-
-
-
- 1334 printer->add_newline(2);
- 1335 printer->fmt_push_block(
"static {} make_instance_{}(_nrn_mechanism_cache_range& _lmc)",
-
-
- 1338 printer->fmt_push_block(
"return {}", instance_struct());
+ 1198 printer->decrease_indent();
+ 1199 printer->add_line(
");");
+ 1200 printer->add_newline();
+
+
+ 1203 printer->fmt_line(
"hoc_register_prop_size(mech_type, {}, {});",
+ 1204 float_variables_size(),
+ 1205 int_variables_size());
+
+ 1207 for (
int i = 0; i < codegen_int_variables_size; ++i) {
+ 1208 if (i != info.semantics[i].index) {
+ 1209 throw std::runtime_error(
"Broken logic.");
+
+
+ 1212 printer->fmt_line(
"hoc_register_dparam_semantics(mech_type, {}, \"{}\");",
+
+ 1214 info.semantics[i].name);
+
+
+ 1217 if (info.write_concentration) {
+ 1218 printer->fmt_line(
"nrn_writes_conc(mech_type, 0);");
+
+
+ 1221 if (info.artificial_cell) {
+ 1222 printer->fmt_line(
"add_nrn_artcell(mech_type, {});", info.tqitem_index);
+
+
+ 1225 if (info.net_event_used) {
+ 1226 printer->fmt_line(
"add_nrn_has_net_event(mech_type);");
+
+
+ 1229 printer->add_line(
"hoc_register_var(hoc_scalar_double, hoc_vector_double, hoc_intfunc);");
+ 1230 if (!info.point_process) {
+ 1231 printer->add_line(
"hoc_register_npy_direct(mech_type, npy_direct_func_proc);");
+
+ 1233 if (info.net_receive_node) {
+ 1234 printer->fmt_line(
"pnt_receive[mech_type] = nrn_net_receive_{};", info.mod_suffix);
+ 1235 printer->fmt_line(
"pnt_receive_size[mech_type] = {};", info.num_net_receive_parameters);
+
+
+ 1238 if (info.thread_callback_register) {
+ 1239 printer->add_line(
"_nrn_thread_reg(mech_type, 1, thread_mem_init);");
+ 1240 printer->add_line(
"_nrn_thread_reg(mech_type, 0, thread_mem_cleanup);");
+
+
+ 1243 if (info.diam_used) {
+ 1244 printer->fmt_line(
"{}._morphology_sym = hoc_lookup(\"morphology\");",
+ 1245 global_struct_instance());
+
+
+ 1248 printer->pop_block();
+
+
+
+
+ 1253 if (!info.thread_callback_register) {
+
+
+
+ 1257 auto static_thread_data = get_variable_name(
"thread_data",
false);
+ 1258 auto inuse = get_variable_name(
"thread_data_in_use",
false);
+ 1259 auto thread_data_index = info.thread_var_thread_id;
+ 1260 printer->push_block(
"static void thread_mem_init(Datum* _thread) ");
+ 1261 printer->push_block(fmt::format(
"if({})", inuse));
+ 1262 printer->fmt_line(
"_thread[{}] = {{neuron::container::do_not_search, new double[{}]{{}}}};",
+
+ 1264 info.thread_var_data_size + info.top_local_thread_size);
+ 1265 printer->pop_block();
+ 1266 printer->push_block(
"else");
+ 1267 printer->fmt_line(
"_thread[{}] = {{neuron::container::do_not_search, {}}};",
+
+ 1269 static_thread_data);
+ 1270 printer->fmt_line(
"{} = 1;", inuse);
+ 1271 printer->pop_block();
+ 1272 printer->pop_block();
+
+ 1274 printer->push_block(
"static void thread_mem_cleanup(Datum* _thread) ");
+ 1275 printer->fmt_line(
"double * _thread_data_ptr = _thread[{}].get<double*>();", thread_data_index);
+ 1276 printer->push_block(fmt::format(
"if(_thread_data_ptr == {})", static_thread_data));
+ 1277 printer->fmt_line(
"{} = 0;", inuse);
+ 1278 printer->pop_block();
+ 1279 printer->push_block(
"else");
+ 1280 printer->add_line(
"delete[] _thread_data_ptr;");
+ 1281 printer->pop_block();
+ 1282 printer->pop_block();
+
+
+
+
+ 1287 for (
auto const& [var, type]: info.neuron_global_variables) {
+ 1288 auto const name = var->get_name();
+ 1289 printer->fmt_line(
"extern {} {};", type, name);
+
+
+
+
+ 1294 auto const value_initialize = print_initializers ?
"{}" :
"";
+ 1295 printer->add_newline(2);
+ 1296 printer->add_line(
"/** all mechanism instance variables and global variables */");
+ 1297 printer->fmt_push_block(
"struct {} ", instance_struct());
+
+ 1299 for (
auto const& [var, type]: info.neuron_global_variables) {
+ 1300 auto const name = var->get_name();
+ 1301 printer->fmt_line(
"{}* {}{};",
+
+
+ 1304 print_initializers ? fmt::format(
"{{&::{}}}", name) : std::string{});
+
+ 1306 for (
auto& var: codegen_float_variables) {
+ 1307 const auto& name = var->get_name();
+ 1308 printer->fmt_line(
"double* {}{};", name, value_initialize);
+
+ 1310 for (
auto& var: codegen_int_variables) {
+ 1311 const auto& name = var.symbol->get_name();
+
+
+ 1314 }
else if (var.is_index || var.is_integer) {
+
+
+ 1317 auto qualifier = var.is_constant ?
"const " :
"";
+ 1318 auto type = var.is_vdata ?
"void*" : default_float_data_type();
+ 1319 printer->fmt_line(
"{}{}* const* {}{};", qualifier, type, name, value_initialize);
+
+
+
+ 1323 printer->fmt_line(
"{}* {}{};",
+
+
+ 1326 print_initializers ? fmt::format(
"{{&{}}}", global_struct_instance())
+
+ 1328 printer->pop_block(
";");
+
+
+
+ 1332 printer->add_newline(2);
+ 1333 printer->fmt_push_block(
"static {} make_instance_{}(_nrn_mechanism_cache_range& _lmc)",
+
+
+ 1336 printer->fmt_push_block(
"return {}", instance_struct());
+
+ 1338 std::vector<std::string> make_instance_args;
- 1340 std::vector<std::string> make_instance_args;
-
-
- 1343 for (
auto const& [var, type]: info.neuron_global_variables) {
- 1344 auto const name = var->get_name();
- 1345 make_instance_args.push_back(fmt::format(
"&::{}", name));
-
-
-
- 1349 const auto codegen_float_variables_size = codegen_float_variables.size();
- 1350 for (
int i = 0; i < codegen_float_variables_size; ++i) {
- 1351 const auto& float_var = codegen_float_variables[i];
- 1352 if (float_var->is_array()) {
- 1353 make_instance_args.push_back(
- 1354 fmt::format(
"_lmc.template data_array_ptr<{}, {}>()", i, float_var->get_length()));
-
- 1356 make_instance_args.push_back(fmt::format(
"_lmc.template fpfield_ptr<{}>()", i));
-
-
-
- 1360 const auto codegen_int_variables_size = codegen_int_variables.size();
- 1361 for (
size_t i = 0; i < codegen_int_variables_size; ++i) {
- 1362 const auto& var = codegen_int_variables[i];
- 1363 auto name = var.symbol->get_name();
- 1364 auto const variable = [&var, i]() -> std::string {
- 1365 if (var.is_index || var.is_integer) {
+
+ 1341 for (
auto const& [var, type]: info.neuron_global_variables) {
+ 1342 auto const name = var->get_name();
+ 1343 make_instance_args.push_back(fmt::format(
"&::{}", name));
+
+
+
+ 1347 const auto codegen_float_variables_size = codegen_float_variables.size();
+ 1348 for (
int i = 0; i < codegen_float_variables_size; ++i) {
+ 1349 const auto& float_var = codegen_float_variables[i];
+ 1350 if (float_var->is_array()) {
+ 1351 make_instance_args.push_back(
+ 1352 fmt::format(
"_lmc.template data_array_ptr<{}, {}>()", i, float_var->get_length()));
+
+ 1354 make_instance_args.push_back(fmt::format(
"_lmc.template fpfield_ptr<{}>()", i));
+
+
+
+ 1358 const auto codegen_int_variables_size = codegen_int_variables.size();
+ 1359 for (
size_t i = 0; i < codegen_int_variables_size; ++i) {
+ 1360 const auto& var = codegen_int_variables[i];
+ 1361 auto name = var.symbol->get_name();
+ 1362 auto const variable = [&var, i]() -> std::string {
+ 1363 if (var.is_index || var.is_integer) {
+
+ 1365 }
else if (var.is_vdata) {
- 1367 }
else if (var.is_vdata) {
-
-
- 1370 return fmt::format(
"_lmc.template dptr_field_ptr<{}>()", i);
-
-
- 1373 if (variable !=
"") {
- 1374 make_instance_args.push_back(variable);
-
-
+
+ 1368 return fmt::format(
"_lmc.template dptr_field_ptr<{}>()", i);
+
+
+ 1371 if (variable !=
"") {
+ 1372 make_instance_args.push_back(variable);
+
+
+
+ 1376 printer->add_multi_line(fmt::format(
"{}", fmt::join(make_instance_args,
",\n")));
- 1378 printer->add_multi_line(fmt::format(
"{}", fmt::join(make_instance_args,
",\n")));
-
- 1380 printer->pop_block(
";");
- 1381 printer->pop_block();
-
-
-
- 1385 printer->add_newline(2);
- 1386 printer->fmt_push_block(
"struct {} ", node_data_struct());
-
-
- 1389 printer->add_line(
"int const * nodeindices;");
- 1390 printer->add_line(
"double const * node_voltages;");
- 1391 printer->add_line(
"double * node_diagonal;");
- 1392 printer->add_line(
"double * node_rhs;");
- 1393 printer->add_line(
"int nodecount;");
-
- 1395 printer->pop_block(
";");
-
-
-
- 1399 printer->add_newline(2);
- 1400 printer->fmt_push_block(
"static {} make_node_data_{}(NrnThread& nt, Memb_list& _ml_arg)",
-
-
-
- 1404 std::vector<std::string> make_node_data_args = {
"_ml_arg.nodeindices",
- 1405 "nt.node_voltage_storage()",
- 1406 "nt.node_d_storage()",
- 1407 "nt.node_rhs_storage()",
- 1408 "_ml_arg.nodecount"};
-
- 1410 printer->fmt_push_block(
"return {}", node_data_struct());
- 1411 printer->add_multi_line(fmt::format(
"{}", fmt::join(make_node_data_args,
",\n")));
-
- 1413 printer->pop_block(
";");
- 1414 printer->pop_block();
-
-
- 1417 printer->fmt_push_block(
"static {} make_node_data_{}(Prop * _prop)",
-
-
- 1420 printer->add_line(
"static std::vector<int> node_index{0};");
- 1421 printer->add_line(
"Node* _node = _nrn_mechanism_access_node(_prop);");
-
- 1423 make_node_data_args = {
"node_index.data()",
- 1424 "&_nrn_mechanism_access_voltage(_node)",
- 1425 "&_nrn_mechanism_access_d(_node)",
- 1426 "&_nrn_mechanism_access_rhs(_node)",
-
-
- 1429 printer->fmt_push_block(
"return {}", node_data_struct());
- 1430 printer->add_multi_line(fmt::format(
"{}", fmt::join(make_node_data_args,
",\n")));
-
- 1432 printer->pop_block(
";");
- 1433 printer->pop_block();
- 1434 printer->add_newline();
-
-
-
- 1438 if (codegen_thread_variables.empty()) {
-
-
-
- 1442 printer->add_newline(2);
- 1443 printer->fmt_push_block(
"struct {} ", thread_variables_struct());
- 1444 printer->add_line(
"double * thread_data;");
- 1445 printer->add_newline();
+ 1378 printer->pop_block(
";");
+ 1379 printer->pop_block();
+
+
+
+ 1383 printer->add_newline(2);
+ 1384 printer->fmt_push_block(
"struct {} ", node_data_struct());
+
+
+ 1387 printer->add_line(
"int const * nodeindices;");
+ 1388 printer->add_line(
"double const * node_voltages;");
+ 1389 printer->add_line(
"double * node_diagonal;");
+ 1390 printer->add_line(
"double * node_rhs;");
+ 1391 printer->add_line(
"int nodecount;");
+
+ 1393 printer->pop_block(
";");
+
+
+
+ 1397 printer->add_newline(2);
+ 1398 printer->fmt_push_block(
"static {} make_node_data_{}(NrnThread& nt, Memb_list& _ml_arg)",
+
+
+
+ 1402 std::vector<std::string> make_node_data_args = {
"_ml_arg.nodeindices",
+ 1403 "nt.node_voltage_storage()",
+ 1404 "nt.node_d_storage()",
+ 1405 "nt.node_rhs_storage()",
+ 1406 "_ml_arg.nodecount"};
+
+ 1408 printer->fmt_push_block(
"return {}", node_data_struct());
+ 1409 printer->add_multi_line(fmt::format(
"{}", fmt::join(make_node_data_args,
",\n")));
+
+ 1411 printer->pop_block(
";");
+ 1412 printer->pop_block();
+
+
+ 1415 printer->fmt_push_block(
"static {} make_node_data_{}(Prop * _prop)",
+
+
+ 1418 printer->add_line(
"static std::vector<int> node_index{0};");
+ 1419 printer->add_line(
"Node* _node = _nrn_mechanism_access_node(_prop);");
+
+ 1421 make_node_data_args = {
"node_index.data()",
+ 1422 "&_nrn_mechanism_access_voltage(_node)",
+ 1423 "&_nrn_mechanism_access_d(_node)",
+ 1424 "&_nrn_mechanism_access_rhs(_node)",
+
+
+ 1427 printer->fmt_push_block(
"return {}", node_data_struct());
+ 1428 printer->add_multi_line(fmt::format(
"{}", fmt::join(make_node_data_args,
",\n")));
+
+ 1430 printer->pop_block(
";");
+ 1431 printer->pop_block();
+ 1432 printer->add_newline();
+
+
+
+ 1436 if (codegen_thread_variables.empty()) {
+
+
+
+ 1440 printer->add_newline(2);
+ 1441 printer->fmt_push_block(
"struct {} ", thread_variables_struct());
+ 1442 printer->add_line(
"double * thread_data;");
+ 1443 printer->add_newline();
+
+ 1445 std::string simd_width =
"1";
- 1447 std::string simd_width =
"1";
-
-
- 1450 for (
const auto& var_info: codegen_thread_variables) {
- 1451 printer->fmt_push_block(
"double * {}_ptr(size_t id)", var_info.symbol->get_name());
- 1452 printer->fmt_line(
"return thread_data + {} + (id % {});", var_info.offset, simd_width);
- 1453 printer->pop_block();
-
- 1455 printer->fmt_push_block(
"double & {}(size_t id)", var_info.symbol->get_name());
- 1456 printer->fmt_line(
"return thread_data[{} + (id % {})];", var_info.offset, simd_width);
- 1457 printer->pop_block();
-
- 1459 printer->add_newline();
-
- 1461 printer->push_block(fmt::format(
"{}(double * const thread_data)", thread_variables_struct()));
- 1462 printer->fmt_line(
"this->thread_data = thread_data;");
- 1463 printer->pop_block();
-
- 1465 printer->pop_block(
";");
-
-
-
-
-
-
- 1472 for (
auto& statement: read_statements) {
- 1473 printer->add_line(statement);
-
-
-
- 1477 if (node !=
nullptr) {
-
- 1479 print_statement_block(*block,
false,
false);
-
-
-
-
- 1484 for (
auto& statement: write_statements) {
-
- 1486 printer->add_line(text);
-
-
-
-
-
- 1492 const std::string& function_name) {
- 1493 std::string method = function_name.empty() ? compute_method_name(type) : function_name;
- 1494 ParamVector args = {{
"",
"const _nrn_model_sorted_token&",
"",
"_sorted_token"},
- 1495 {
"",
"NrnThread*",
"",
"nt"},
- 1496 {
"",
"Memb_list*",
"",
"_ml_arg"},
- 1497 {
"",
"int",
"",
"_type"}};
- 1498 printer->fmt_push_block(
"void {}({})", method, get_parameter_str(args));
-
- 1500 printer->add_line(
"_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};");
- 1501 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
- 1502 printer->fmt_line(
"auto node_data = make_node_data_{}(*nt, *_ml_arg);", info.mod_suffix);
-
- 1504 printer->add_line(
"auto nodecount = _ml_arg->nodecount;");
- 1505 printer->add_line(
"auto* _thread = _ml_arg->_thread;");
- 1506 if (!codegen_thread_variables.empty()) {
- 1507 printer->fmt_line(
"auto _thread_vars = {}(_thread[{}].get<double*>());",
- 1508 thread_variables_struct(),
- 1509 info.thread_var_thread_id);
-
-
-
-
-
- 1515 printer->add_newline(2);
+
+ 1448 for (
const auto& var_info: codegen_thread_variables) {
+ 1449 printer->fmt_push_block(
"double * {}_ptr(size_t id)", var_info.symbol->get_name());
+ 1450 printer->fmt_line(
"return thread_data + {} + (id % {});", var_info.offset, simd_width);
+ 1451 printer->pop_block();
+
+ 1453 printer->fmt_push_block(
"double & {}(size_t id)", var_info.symbol->get_name());
+ 1454 printer->fmt_line(
"return thread_data[{} + (id % {})];", var_info.offset, simd_width);
+ 1455 printer->pop_block();
+
+ 1457 printer->add_newline();
+
+ 1459 printer->push_block(fmt::format(
"{}(double * const thread_data)", thread_variables_struct()));
+ 1460 printer->fmt_line(
"this->thread_data = thread_data;");
+ 1461 printer->pop_block();
+
+ 1463 printer->pop_block(
";");
+
+
+
+
+
+
+ 1470 for (
auto& statement: read_statements) {
+ 1471 printer->add_line(statement);
+
+
+
+ 1475 if (node !=
nullptr) {
+
+ 1477 print_statement_block(*block,
false,
false);
+
+
+
+
+ 1482 for (
auto& statement: write_statements) {
+
+ 1484 printer->add_line(text);
+
+
+
+
+
+ 1490 const std::string& function_name) {
+ 1491 std::string method = function_name.empty() ? compute_method_name(type) : function_name;
+ 1492 ParamVector args = {{
"",
"const _nrn_model_sorted_token&",
"",
"_sorted_token"},
+ 1493 {
"",
"NrnThread*",
"",
"nt"},
+ 1494 {
"",
"Memb_list*",
"",
"_ml_arg"},
+ 1495 {
"",
"int",
"",
"_type"}};
+ 1496 printer->fmt_push_block(
"void {}({})", method, get_parameter_str(args));
+
+ 1498 printer->add_line(
"_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};");
+ 1499 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
+ 1500 printer->fmt_line(
"auto node_data = make_node_data_{}(*nt, *_ml_arg);", info.mod_suffix);
+
+ 1502 printer->add_line(
"auto nodecount = _ml_arg->nodecount;");
+ 1503 printer->add_line(
"auto* _thread = _ml_arg->_thread;");
+ 1504 if (!codegen_thread_variables.empty()) {
+ 1505 printer->fmt_line(
"auto _thread_vars = {}(_thread[{}].get<double*>());",
+ 1506 thread_variables_struct(),
+ 1507 info.thread_var_thread_id);
+
+
+
+
+
+ 1513 printer->add_newline(2);
+
+
-
+ 1517 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
- 1519 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
-
- 1521 printer->add_line(
"auto* _ppvar = _ml_arg->pdata[id];");
- 1522 if (!info.artificial_cell) {
- 1523 printer->add_line(
"int node_id = node_data.nodeindices[id];");
- 1524 printer->add_line(
"auto v = node_data.node_voltages[node_id];");
-
+ 1519 printer->add_line(
"auto* _ppvar = _ml_arg->pdata[id];");
+ 1520 if (!info.artificial_cell) {
+ 1521 printer->add_line(
"int node_id = node_data.nodeindices[id];");
+ 1522 printer->add_line(
"auto v = node_data.node_voltages[node_id];");
+
+
+ 1525 print_rename_state_vars();
- 1527 print_rename_state_vars();
-
- 1529 if (!info.changed_dt.empty()) {
- 1530 printer->fmt_line(
"double _save_prev_dt = {};",
-
- 1532 printer->fmt_line(
"{} = {};",
-
-
-
+ 1527 if (!info.changed_dt.empty()) {
+ 1528 printer->fmt_line(
"double _save_prev_dt = {};",
+
+ 1530 printer->fmt_line(
"{} = {};",
+
+
+
+
+ 1535 print_initial_block(info.initial_node);
- 1537 print_initial_block(info.initial_node);
-
- 1539 if (!info.changed_dt.empty()) {
-
-
-
- 1543 printer->pop_block();
- 1544 printer->pop_block();
-
-
-
- 1548 printer->add_newline(2);
-
- 1550 ParamVector args = {{
"",
"const _nrn_model_sorted_token&",
"",
"_sorted_token"},
- 1551 {
"",
"NrnThread*",
"",
"nt"},
- 1552 {
"",
"Memb_list*",
"",
"_ml_arg"},
- 1553 {
"",
"int",
"",
"_type"}};
-
- 1555 printer->fmt_push_block(
"static void {}({})",
-
- 1557 get_parameter_str(args));
-
-
- 1560 printer->add_multi_line(
- 1561 "_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};");
-
- 1563 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
- 1564 printer->fmt_line(
"auto node_data = make_node_data_{}(*nt, *_ml_arg);", info.mod_suffix);
- 1565 printer->fmt_line(
"auto nodecount = _ml_arg->nodecount;");
- 1566 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
-
- 1568 if (breakpoint_exist()) {
- 1569 printer->add_line(
"int node_id = node_data.nodeindices[id];");
- 1570 printer->fmt_line(
"node_data.node_diagonal[node_id] {} inst.{}[id];",
-
-
-
-
-
- 1576 printer->pop_block();
- 1577 printer->pop_block();
-
-
-
-
- 1582 printer->add_line(
"Datum* _ppvar = _nrn_mechanism_access_dparam(prop);");
- 1583 printer->add_line(
"_nrn_mechanism_cache_instance _lmc{prop};");
- 1584 printer->add_line(
"const size_t id = 0;");
-
- 1586 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
- 1587 if (!info.artificial_cell) {
- 1588 printer->fmt_line(
"auto node_data = make_node_data_{}(prop);", info.mod_suffix);
-
-
- 1591 if (!codegen_thread_variables.empty()) {
- 1592 printer->fmt_line(
"auto _thread_vars = {}({}_global.thread_data);",
- 1593 thread_variables_struct(),
-
-
-
- 1597 printer->add_newline();
-
-
-
-
- 1602 if (info.constructor_node) {
-
+ 1537 if (!info.changed_dt.empty()) {
+
+
+
+ 1541 printer->pop_block();
+ 1542 printer->pop_block();
+
+
+
+ 1546 printer->add_newline(2);
+
+ 1548 ParamVector args = {{
"",
"const _nrn_model_sorted_token&",
"",
"_sorted_token"},
+ 1549 {
"",
"NrnThread*",
"",
"nt"},
+ 1550 {
"",
"Memb_list*",
"",
"_ml_arg"},
+ 1551 {
"",
"int",
"",
"_type"}};
+
+ 1553 printer->fmt_push_block(
"static void {}({})",
+
+ 1555 get_parameter_str(args));
+
+
+ 1558 printer->add_multi_line(
+ 1559 "_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};");
+
+ 1561 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
+ 1562 printer->fmt_line(
"auto node_data = make_node_data_{}(*nt, *_ml_arg);", info.mod_suffix);
+ 1563 printer->fmt_line(
"auto nodecount = _ml_arg->nodecount;");
+ 1564 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
+
+ 1566 if (breakpoint_exist()) {
+ 1567 printer->add_line(
"int node_id = node_data.nodeindices[id];");
+ 1568 printer->fmt_line(
"node_data.node_diagonal[node_id] {} inst.{}[id];",
+
+
+
+
+
+ 1574 printer->pop_block();
+ 1575 printer->pop_block();
+
+
+
+
+ 1580 printer->add_line(
"Datum* _ppvar = _nrn_mechanism_access_dparam(prop);");
+ 1581 printer->add_line(
"_nrn_mechanism_cache_instance _lmc{prop};");
+ 1582 printer->add_line(
"const size_t id = 0;");
+
+ 1584 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
+ 1585 if (!info.artificial_cell) {
+ 1586 printer->fmt_line(
"auto node_data = make_node_data_{}(prop);", info.mod_suffix);
+
+
+ 1589 if (!codegen_thread_variables.empty()) {
+ 1590 printer->fmt_line(
"auto _thread_vars = {}({}_global.thread_data);",
+ 1591 thread_variables_struct(),
+
+
+
+ 1595 printer->add_newline();
+
+
+
+
+ 1600 if (info.constructor_node) {
+
+
+ 1603 print_callable_preamble_from_prop();
- 1605 print_callable_preamble_from_prop();
-
- 1607 auto block = info.constructor_node->get_statement_block();
- 1608 print_statement_block(*block,
false,
false);
-
- 1610 printer->pop_block();
-
-
-
-
-
-
- 1617 print_callable_preamble_from_prop();
-
- 1619 for (
const auto& rv: info.random_variables) {
- 1620 printer->fmt_line(
"nrnran123_deletestream((nrnran123_State*) {});",
- 1621 get_variable_name(
get_name(rv),
false));
-
-
-
- 1625 if (info.destructor_node) {
- 1626 auto block = info.destructor_node->get_statement_block();
- 1627 print_statement_block(*block,
false,
false);
-
-
- 1630 printer->pop_block();
-
-
-
-
- 1635 printer->add_newline(2);
-
-
- 1638 printer->fmt_push_block(
"static void {}(Prop* _prop)", method);
- 1639 printer->add_line(
"Datum *_ppvar = nullptr;");
-
- 1641 if (info.point_process) {
- 1642 printer->push_block(
"if (nrn_point_prop_)");
- 1643 printer->add_multi_line(R
"CODE(
- 1644 _nrn_mechanism_access_alloc_seq(_prop) = _nrn_mechanism_access_alloc_seq(nrn_point_prop_);
- 1645 _ppvar = _nrn_mechanism_access_dparam(nrn_point_prop_);
-
- 1647 printer->chain_block("else");
-
- 1649 if (info.semantic_variable_count) {
- 1650 printer->fmt_line(
"_ppvar = nrn_prop_datum_alloc(mech_type, {}, _prop);",
- 1651 info.semantic_variable_count);
- 1652 printer->add_line(
"_nrn_mechanism_access_dparam(_prop) = _ppvar;");
-
- 1654 printer->add_multi_line(R
"CODE(
- 1655 _nrn_mechanism_cache_instance _lmc{_prop};
- 1656 size_t const _iml = 0;
-
- 1658 printer->fmt_line("assert(_nrn_mechanism_get_num_vars(_prop) == {});",
- 1659 codegen_float_variables.size());
- 1660 if (float_variables_size()) {
- 1661 printer->add_line(
"/*initialize range parameters*/");
- 1662 for (
size_t i_param = 0; i_param < info.range_parameter_vars.size(); ++i_param) {
- 1663 const auto var = info.range_parameter_vars[i_param];
- 1664 if (var->is_array()) {
-
-
- 1667 const auto& var_name = var->get_name();
- 1668 auto var_pos = position_of_float_var(var_name);
-
- 1670 printer->fmt_line(
"_lmc.template fpfield<{}>(_iml) = {}; /* {} */",
-
- 1672 fmt::format(
"_parameter_defaults[{}]", i_param),
-
-
-
- 1676 if (info.point_process) {
- 1677 printer->pop_block();
-
-
- 1680 if (info.semantic_variable_count) {
- 1681 printer->add_line(
"_nrn_mechanism_access_dparam(_prop) = _ppvar;");
-
+ 1605 auto block = info.constructor_node->get_statement_block();
+ 1606 print_statement_block(*block,
false,
false);
+
+ 1608 printer->pop_block();
+
+
+
+
+
+
+ 1615 print_callable_preamble_from_prop();
+
+ 1617 for (
const auto& rv: info.random_variables) {
+ 1618 printer->fmt_line(
"nrnran123_deletestream((nrnran123_State*) {});",
+ 1619 get_variable_name(
get_name(rv),
false));
+
+
+
+ 1623 if (info.destructor_node) {
+ 1624 auto block = info.destructor_node->get_statement_block();
+ 1625 print_statement_block(*block,
false,
false);
+
+
+ 1628 printer->pop_block();
+
+
+
+
+ 1633 printer->add_newline(2);
+
+
+ 1636 printer->fmt_push_block(
"static void {}(Prop* _prop)", method);
+ 1637 printer->add_line(
"Datum *_ppvar = nullptr;");
+
+ 1639 if (info.point_process) {
+ 1640 printer->push_block(
"if (nrn_point_prop_)");
+ 1641 printer->add_multi_line(R
"CODE(
+ 1642 _nrn_mechanism_access_alloc_seq(_prop) = _nrn_mechanism_access_alloc_seq(nrn_point_prop_);
+ 1643 _ppvar = _nrn_mechanism_access_dparam(nrn_point_prop_);
+
+ 1645 printer->chain_block("else");
+
+ 1647 if (info.semantic_variable_count) {
+ 1648 printer->fmt_line(
"_ppvar = nrn_prop_datum_alloc(mech_type, {}, _prop);",
+ 1649 info.semantic_variable_count);
+ 1650 printer->add_line(
"_nrn_mechanism_access_dparam(_prop) = _ppvar;");
+
+ 1652 printer->add_multi_line(R
"CODE(
+ 1653 _nrn_mechanism_cache_instance _lmc{_prop};
+ 1654 size_t const _iml = 0;
+
+ 1656 printer->fmt_line("assert(_nrn_mechanism_get_num_vars(_prop) == {});",
+ 1657 codegen_float_variables.size());
+ 1658 if (float_variables_size()) {
+ 1659 printer->add_line(
"/*initialize range parameters*/");
+ 1660 for (
size_t i_param = 0; i_param < info.range_parameter_vars.size(); ++i_param) {
+ 1661 const auto var = info.range_parameter_vars[i_param];
+ 1662 if (var->is_array()) {
+
+
+ 1665 const auto& var_name = var->get_name();
+ 1666 auto var_pos = position_of_float_var(var_name);
+
+ 1668 printer->fmt_line(
"_lmc.template fpfield<{}>(_iml) = {}; /* {} */",
+
+ 1670 fmt::format(
"_parameter_defaults[{}]", i_param),
+
+
+
+ 1674 if (info.point_process) {
+ 1675 printer->pop_block();
+
+
+ 1678 if (info.semantic_variable_count) {
+ 1679 printer->add_line(
"_nrn_mechanism_access_dparam(_prop) = _ppvar;");
+
+
+ 1682 const auto codegen_int_variables_size = codegen_int_variables.size();
- 1684 const auto codegen_int_variables_size = codegen_int_variables.size();
-
- 1686 if (info.diam_used || info.area_used) {
- 1687 for (
size_t i = 0; i < codegen_int_variables.size(); ++i) {
- 1688 auto var_info = codegen_int_variables[i];
-
- 1690 printer->fmt_line(
"Prop * morphology_prop = need_memb({}._morphology_sym);",
- 1691 global_struct_instance());
-
- 1693 "_ppvar[{}] = _nrn_mechanism_get_param_handle(morphology_prop, 0);", i);
-
-
- 1696 printer->fmt_line(
"_ppvar[{}] = _nrn_mechanism_get_area_handle(nrn_alloc_node_);",
-
-
-
-
-
- 1702 for (
const auto& ion: info.ions) {
- 1703 printer->fmt_line(
"Symbol * {}_sym = hoc_lookup(\"{}_ion\");", ion.name, ion.name);
- 1704 printer->fmt_line(
"Prop * {}_prop = need_memb({}_sym);", ion.name, ion.name);
-
- 1706 if (ion.is_exterior_conc_written()) {
- 1707 printer->fmt_line(
"nrn_check_conc_write(_prop, {}_prop, 0);", ion.name);
-
-
- 1710 if (ion.is_interior_conc_written()) {
- 1711 printer->fmt_line(
"nrn_check_conc_write(_prop, {}_prop, 1);", ion.name);
-
-
- 1714 int conc = ion.is_conc_written() ? 3 : int(ion.is_conc_read());
- 1715 int rev = ion.is_rev_written() ? 3 : int(ion.is_rev_read());
+ 1684 if (info.diam_used || info.area_used) {
+ 1685 for (
size_t i = 0; i < codegen_int_variables.size(); ++i) {
+ 1686 auto var_info = codegen_int_variables[i];
+
+ 1688 printer->fmt_line(
"Prop * morphology_prop = need_memb({}._morphology_sym);",
+ 1689 global_struct_instance());
+
+ 1691 "_ppvar[{}] = _nrn_mechanism_get_param_handle(morphology_prop, 0);", i);
+
+
+ 1694 printer->fmt_line(
"_ppvar[{}] = _nrn_mechanism_get_area_handle(nrn_alloc_node_);",
+
+
+
+
+
+ 1700 for (
const auto& ion: info.ions) {
+ 1701 printer->fmt_line(
"Symbol * {}_sym = hoc_lookup(\"{}_ion\");", ion.name, ion.name);
+ 1702 printer->fmt_line(
"Prop * {}_prop = need_memb({}_sym);", ion.name, ion.name);
+
+ 1704 if (ion.is_exterior_conc_written()) {
+ 1705 printer->fmt_line(
"nrn_check_conc_write(_prop, {}_prop, 0);", ion.name);
+
+
+ 1708 if (ion.is_interior_conc_written()) {
+ 1709 printer->fmt_line(
"nrn_check_conc_write(_prop, {}_prop, 1);", ion.name);
+
+
+ 1712 int conc = ion.is_conc_written() ? 3 : int(ion.is_conc_read());
+ 1713 int rev = ion.is_rev_written() ? 3 : int(ion.is_rev_read());
+
+ 1715 printer->fmt_line(
"nrn_promote({}_prop, {}, {});", ion.name, conc, rev);
- 1717 printer->fmt_line(
"nrn_promote({}_prop, {}, {});", ion.name, conc, rev);
-
- 1719 for (
size_t i = 0; i < codegen_int_variables_size; ++i) {
- 1720 const auto& var = codegen_int_variables[i];
+ 1717 for (
size_t i = 0; i < codegen_int_variables_size; ++i) {
+ 1718 const auto& var = codegen_int_variables[i];
+
+ 1720 const std::string& var_name = var.symbol->get_name();
- 1722 const std::string& var_name = var.symbol->get_name();
-
-
- 1725 std::string ion_var_name = std::string(var_name.begin() + 4, var_name.end());
- 1726 if (ion.is_ionic_variable(ion_var_name) ||
- 1727 ion.is_current_derivative(ion_var_name) || ion.is_rev_potential(ion_var_name)) {
- 1728 printer->fmt_line(
"_ppvar[{}] = _nrn_mechanism_get_param_handle({}_prop, {});",
-
-
- 1731 ion.variable_index(ion_var_name));
-
-
- 1734 if (ion.is_style(var_name)) {
-
- 1736 "_ppvar[{}] = {{neuron::container::do_not_search, "
- 1737 "&(_nrn_mechanism_access_dparam({}_prop)[0].literal_value<int>())}};",
-
-
-
-
-
-
-
- 1745 if (!info.random_variables.empty()) {
- 1746 for (
const auto& rv: info.random_variables) {
- 1747 printer->fmt_line(
"{} = nrnran123_newstream();",
- 1748 get_variable_name(
get_name(rv),
false));
-
- 1750 printer->fmt_line(
"nrn_mech_inst_destruct[mech_type] = {};",
-
-
-
- 1754 if (info.point_process || info.artificial_cell) {
- 1755 printer->fmt_push_block(
"if(!nrn_point_prop_)");
-
- 1757 if (info.constructor_node) {
-
-
- 1760 printer->pop_block();
-
-
- 1763 printer->pop_block();
-
-
-
+
+ 1723 std::string ion_var_name = std::string(var_name.begin() + 4, var_name.end());
+ 1724 if (ion.is_ionic_variable(ion_var_name) ||
+ 1725 ion.is_current_derivative(ion_var_name) || ion.is_rev_potential(ion_var_name)) {
+ 1726 printer->fmt_line(
"_ppvar[{}] = _nrn_mechanism_get_param_handle({}_prop, {});",
+
+
+ 1729 ion.variable_index(ion_var_name));
+
+
+ 1732 if (ion.is_style(var_name)) {
+
+ 1734 "_ppvar[{}] = {{neuron::container::do_not_search, "
+ 1735 "&(_nrn_mechanism_access_dparam({}_prop)[0].literal_value<int>())}};",
+
+
+
+
+
+
+
+ 1743 if (!info.random_variables.empty()) {
+ 1744 for (
const auto& rv: info.random_variables) {
+ 1745 printer->fmt_line(
"{} = nrnran123_newstream();",
+ 1746 get_variable_name(
get_name(rv),
false));
+
+ 1748 printer->fmt_line(
"nrn_mech_inst_destruct[mech_type] = {};",
+
+
+
+ 1752 if (info.point_process || info.artificial_cell) {
+ 1753 printer->fmt_push_block(
"if(!nrn_point_prop_)");
+
+ 1755 if (info.constructor_node) {
+
+
+ 1758 printer->pop_block();
+
+
+ 1761 printer->pop_block();
+
+
+
+
+
-
-
-
-
- 1772 if (!nrn_state_required()) {
-
-
-
- 1776 printer->add_newline(2);
-
-
- 1779 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
- 1780 printer->add_line(
"int node_id = node_data.nodeindices[id];");
- 1781 printer->add_line(
"auto* _ppvar = _ml_arg->pdata[id];");
- 1782 printer->add_line(
"auto v = node_data.node_voltages[node_id];");
-
-
-
-
-
- 1788 if (ion_variable_struct_required()) {
- 1789 throw std::runtime_error(
"Not implemented.");
-
-
-
- 1793 for (
auto& statement: read_statements) {
- 1794 printer->add_line(statement);
-
-
- 1797 if (info.nrn_state_block) {
- 1798 info.nrn_state_block->visit_children(*
this);
-
-
- 1801 if (info.currents.empty() && info.breakpoint_node !=
nullptr) {
- 1802 auto block = info.breakpoint_node->get_statement_block();
- 1803 print_statement_block(*block,
false,
false);
-
-
-
- 1807 for (
auto& statement: write_statements) {
- 1808 const auto& text = process_shadow_update_statement(statement,
BlockType::State);
- 1809 printer->add_line(text);
-
-
- 1812 printer->pop_block();
- 1813 printer->pop_block();
-
-
-
+
+
+ 1770 if (!nrn_state_required()) {
+
+
+
+ 1774 printer->add_newline(2);
+
+
+ 1777 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
+ 1778 printer->add_line(
"int node_id = node_data.nodeindices[id];");
+ 1779 printer->add_line(
"auto* _ppvar = _ml_arg->pdata[id];");
+ 1780 printer->add_line(
"auto v = node_data.node_voltages[node_id];");
+
+
+
+
+
+ 1786 if (ion_variable_struct_required()) {
+ 1787 throw std::runtime_error(
"Not implemented.");
+
+
+
+ 1791 for (
auto& statement: read_statements) {
+ 1792 printer->add_line(statement);
+
+
+ 1795 if (info.nrn_state_block) {
+ 1796 info.nrn_state_block->visit_children(*
this);
+
+
+ 1799 if (info.currents.empty() && info.breakpoint_node !=
nullptr) {
+ 1800 auto block = info.breakpoint_node->get_statement_block();
+ 1801 print_statement_block(*block,
false,
false);
+
+
+
+ 1805 for (
auto& statement: write_statements) {
+ 1806 const auto& text = process_shadow_update_statement(statement,
BlockType::State);
+ 1807 printer->add_line(text);
+
+
+ 1810 printer->pop_block();
+ 1811 printer->pop_block();
+
+
+
+
+
-
-
-
-
- 1822 return get_arg_str(nrn_current_parameters());
-
-
-
-
- 1827 if (ion_variable_struct_required()) {
- 1828 throw std::runtime_error(
"Not implemented.");
-
-
- 1831 ParamVector params = {{
"",
"_nrn_mechanism_cache_range&",
"",
"_lmc"},
- 1832 {
"",
"NrnThread*",
"",
"nt"},
- 1833 {
"",
"Datum*",
"",
"_ppvar"},
- 1834 {
"",
"Datum*",
"",
"_thread"}};
-
- 1836 if (info.thread_callback_register) {
- 1837 auto type_name = fmt::format(
"{}&", thread_variables_struct());
- 1838 params.emplace_back(
"", type_name,
"",
"_thread_vars");
-
- 1840 params.emplace_back(
"",
"size_t",
"",
"id");
- 1841 params.emplace_back(
"", fmt::format(
"{}&", instance_struct()),
"",
"inst");
- 1842 params.emplace_back(
"", fmt::format(
"{}&", node_data_struct()),
"",
"node_data");
- 1843 params.emplace_back(
"",
"double",
"",
"v");
-
-
-
-
-
- 1849 const auto& args = nrn_current_parameters();
-
- 1851 printer->add_newline(2);
- 1852 printer->fmt_push_block(
"inline double nrn_current_{}({})",
-
- 1854 get_parameter_str(args));
- 1855 printer->add_line(
"double current = 0.0;");
- 1856 print_statement_block(*block,
false,
false);
- 1857 for (
auto& current: info.currents) {
- 1858 const auto& name = get_variable_name(current);
- 1859 printer->fmt_line(
"current += {};", name);
-
- 1861 printer->add_line(
"return current;");
- 1862 printer->pop_block();
-
-
-
-
-
- 1868 print_statement_block(*block,
false,
false);
- 1869 if (!info.currents.empty()) {
-
- 1871 for (
const auto& current: info.currents) {
- 1872 auto var = breakpoint_current(current);
- 1873 sum += get_variable_name(var);
- 1874 if (¤t != &info.currents.back()) {
-
-
-
- 1878 printer->fmt_line(
"double rhs = {};", sum);
-
-
-
- 1882 for (
const auto& conductance: info.conductances) {
- 1883 auto var = breakpoint_current(conductance.variable);
- 1884 sum += get_variable_name(var);
- 1885 if (&conductance != &info.conductances.back()) {
-
-
-
- 1889 printer->fmt_line(
"double g = {};", sum);
-
- 1891 for (
const auto& conductance: info.conductances) {
- 1892 if (!conductance.ion.empty()) {
-
-
- 1895 const auto& rhs = get_variable_name(conductance.variable);
-
-
- 1898 printer->add_line(text);
-
-
-
-
-
-
- 1905 printer->fmt_line(
"double I1 = nrn_current_{}({}+0.001);",
-
- 1907 nrn_current_arguments());
- 1908 for (
auto& ion: info.ions) {
- 1909 for (
auto& var: ion.writes) {
- 1910 if (ion.is_ionic_current(var)) {
- 1911 const auto& name = get_variable_name(var);
- 1912 printer->fmt_line(
"double di{} = {};", ion.name, name);
-
-
-
- 1916 printer->fmt_line(
"double I0 = nrn_current_{}({});", info.mod_suffix, nrn_current_arguments());
- 1917 printer->add_line(
"double rhs = I0;");
-
- 1919 printer->add_line(
"double g = (I1-I0)/0.001;");
- 1920 for (
auto& ion: info.ions) {
- 1921 for (
auto& var: ion.writes) {
- 1922 if (ion.is_ionic_current(var)) {
-
- 1924 auto rhs = fmt::format(
"(di{}-{})/0.001", ion.name, get_variable_name(var));
- 1925 if (info.point_process) {
-
- 1927 rhs += fmt::format(
"*1.e2/{}", area);
-
-
-
- 1931 printer->add_line(text);
-
-
-
-
-
-
-
- 1939 printer->add_line(
"int node_id = node_data.nodeindices[id];");
- 1940 printer->add_line(
"double v = node_data.node_voltages[node_id];");
- 1941 printer->add_line(
"auto* _ppvar = _ml_arg->pdata[id];");
-
- 1943 for (
auto& statement: read_statements) {
- 1944 printer->add_line(statement);
-
-
- 1947 if (info.conductances.empty()) {
- 1948 print_nrn_cur_non_conductance_kernel();
-
- 1950 print_nrn_cur_conductance_kernel(node);
-
-
-
- 1954 for (
auto& statement: write_statements) {
-
- 1956 printer->add_line(text);
-
-
- 1959 if (info.point_process) {
-
- 1961 printer->fmt_line(
"double mfactor = 1.e2/{};", area);
- 1962 printer->add_line(
"g = g*mfactor;");
- 1963 printer->add_line(
"rhs = rhs*mfactor;");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1978 if (!nrn_cur_required()) {
-
-
-
- 1982 if (info.conductances.empty()) {
- 1983 print_nrn_current(*info.breakpoint_node);
-
-
- 1986 printer->add_newline(2);
- 1987 printer->add_line(
"/** update current */");
-
-
- 1990 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
- 1991 print_nrn_cur_kernel(*info.breakpoint_node);
-
-
-
-
-
+
+
+ 1820 return get_arg_str(nrn_current_parameters());
+
+
+
+
+ 1825 if (ion_variable_struct_required()) {
+ 1826 throw std::runtime_error(
"Not implemented.");
+
+
+ 1829 ParamVector params = {{
"",
"_nrn_mechanism_cache_range&",
"",
"_lmc"},
+ 1830 {
"",
"NrnThread*",
"",
"nt"},
+ 1831 {
"",
"Datum*",
"",
"_ppvar"},
+ 1832 {
"",
"Datum*",
"",
"_thread"}};
+
+ 1834 if (info.thread_callback_register) {
+ 1835 auto type_name = fmt::format(
"{}&", thread_variables_struct());
+ 1836 params.emplace_back(
"", type_name,
"",
"_thread_vars");
+
+ 1838 params.emplace_back(
"",
"size_t",
"",
"id");
+ 1839 params.emplace_back(
"", fmt::format(
"{}&", instance_struct()),
"",
"inst");
+ 1840 params.emplace_back(
"", fmt::format(
"{}&", node_data_struct()),
"",
"node_data");
+ 1841 params.emplace_back(
"",
"double",
"",
"v");
+
+
+
+
+
+ 1847 const auto& args = nrn_current_parameters();
+
+ 1849 printer->add_newline(2);
+ 1850 printer->fmt_push_block(
"inline double nrn_current_{}({})",
+
+ 1852 get_parameter_str(args));
+ 1853 printer->add_line(
"double current = 0.0;");
+ 1854 print_statement_block(*block,
false,
false);
+ 1855 for (
auto& current: info.currents) {
+ 1856 const auto& name = get_variable_name(current);
+ 1857 printer->fmt_line(
"current += {};", name);
+
+ 1859 printer->add_line(
"return current;");
+ 1860 printer->pop_block();
+
+
+
+
+
+ 1866 print_statement_block(*block,
false,
false);
+ 1867 if (!info.currents.empty()) {
+
+ 1869 for (
const auto& current: info.currents) {
+ 1870 auto var = breakpoint_current(current);
+ 1871 sum += get_variable_name(var);
+ 1872 if (¤t != &info.currents.back()) {
+
+
+
+ 1876 printer->fmt_line(
"double rhs = {};", sum);
+
+
+
+ 1880 for (
const auto& conductance: info.conductances) {
+ 1881 auto var = breakpoint_current(conductance.variable);
+ 1882 sum += get_variable_name(var);
+ 1883 if (&conductance != &info.conductances.back()) {
+
+
+
+ 1887 printer->fmt_line(
"double g = {};", sum);
+
+ 1889 for (
const auto& conductance: info.conductances) {
+ 1890 if (!conductance.ion.empty()) {
+
+
+ 1893 const auto& rhs = get_variable_name(conductance.variable);
+
+
+ 1896 printer->add_line(text);
+
+
+
+
+
+
+ 1903 printer->fmt_line(
"double I1 = nrn_current_{}({}+0.001);",
+
+ 1905 nrn_current_arguments());
+ 1906 for (
auto& ion: info.ions) {
+ 1907 for (
auto& var: ion.writes) {
+ 1908 if (ion.is_ionic_current(var)) {
+ 1909 const auto& name = get_variable_name(var);
+ 1910 printer->fmt_line(
"double di{} = {};", ion.name, name);
+
+
+
+ 1914 printer->fmt_line(
"double I0 = nrn_current_{}({});", info.mod_suffix, nrn_current_arguments());
+ 1915 printer->add_line(
"double rhs = I0;");
+
+ 1917 printer->add_line(
"double g = (I1-I0)/0.001;");
+ 1918 for (
auto& ion: info.ions) {
+ 1919 for (
auto& var: ion.writes) {
+ 1920 if (ion.is_ionic_current(var)) {
+
+ 1922 auto rhs = fmt::format(
"(di{}-{})/0.001", ion.name, get_variable_name(var));
+ 1923 if (info.point_process) {
+
+ 1925 rhs += fmt::format(
"*1.e2/{}", area);
+
+
+
+ 1929 printer->add_line(text);
+
+
+
+
+
+
+
+ 1937 printer->add_line(
"int node_id = node_data.nodeindices[id];");
+ 1938 printer->add_line(
"double v = node_data.node_voltages[node_id];");
+ 1939 printer->add_line(
"auto* _ppvar = _ml_arg->pdata[id];");
+
+ 1941 for (
auto& statement: read_statements) {
+ 1942 printer->add_line(statement);
+
+
+ 1945 if (info.conductances.empty()) {
+ 1946 print_nrn_cur_non_conductance_kernel();
+
+ 1948 print_nrn_cur_conductance_kernel(node);
+
+
+
+ 1952 for (
auto& statement: write_statements) {
+
+ 1954 printer->add_line(text);
+
+
+ 1957 if (info.point_process) {
+
+ 1959 printer->fmt_line(
"double mfactor = 1.e2/{};", area);
+ 1960 printer->add_line(
"g = g*mfactor;");
+ 1961 printer->add_line(
"rhs = rhs*mfactor;");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1976 if (!nrn_cur_required()) {
+
+
+
+ 1980 if (info.conductances.empty()) {
+ 1981 print_nrn_current(*info.breakpoint_node);
+
+
+ 1984 printer->add_newline(2);
+ 1985 printer->add_line(
"/** update current */");
+
+
+ 1988 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
+ 1989 print_nrn_cur_kernel(*info.breakpoint_node);
+
+
+
+
+
+
+ 1996 printer->fmt_line(
"node_data.node_rhs[node_id] {} rhs;", operator_for_rhs());
- 1998 printer->fmt_line(
"node_data.node_rhs[node_id] {} rhs;", operator_for_rhs());
-
- 2000 if (breakpoint_exist()) {
- 2001 printer->fmt_line(
"inst.{}[id] = g;",
-
-
-
- 2005 printer->pop_block();
-
-
-
-
-
-
-
-
-
- 2015 printer->pop_block();
-
-
-
+ 1998 if (breakpoint_exist()) {
+ 1999 printer->fmt_line(
"inst.{}[id] = g;",
+
+
+
+ 2003 printer->pop_block();
+
+
+
+
+
+
+
+
+
+ 2013 printer->pop_block();
+
+
+
+
+
-
-
-
-
- 2024 print_standard_includes();
- 2025 print_neuron_includes();
-
- 2027 if (info.thread_callback_register) {
- 2028 printer->add_line(
"extern void _nrn_thread_reg(int, int, void(*)(Datum*));");
-
-
-
-
-
- 2034 print_global_macros();
- 2035 print_mechanism_variables_macros();
-
- 2037 printer->add_line(
"extern Node* nrn_alloc_node_;");
-
-
-
-
- 2042 printer->add_newline();
- 2043 printer->add_line(
"/* NEURON global macro definitions */");
- 2044 if (info.vectorize) {
- 2045 printer->add_multi_line(R
"CODE(
-
- 2047 #define NRN_VECTORIZED 1
-
-
- 2050 printer->add_multi_line(R
"CODE(
- 2051 /* NOT VECTORIZED */
- 2052 #define NRN_VECTORIZED 0
-
-
-
-
-
-
- 2059 printer->add_newline();
- 2060 printer->add_line(
"static constexpr auto number_of_datum_variables = ",
-
-
- 2063 printer->add_line(
"static constexpr auto number_of_floating_point_variables = ",
-
-
- 2066 printer->add_newline();
- 2067 printer->add_multi_line(R
"CODE(
-
- 2069 template <typename T>
- 2070 using _nrn_mechanism_std_vector = std::vector<T>;
- 2071 using _nrn_model_sorted_token = neuron::model_sorted_token;
- 2072 using _nrn_mechanism_cache_range = neuron::cache::MechanismRange<number_of_floating_point_variables, number_of_datum_variables>;
- 2073 using _nrn_mechanism_cache_instance = neuron::cache::MechanismInstance<number_of_floating_point_variables, number_of_datum_variables>;
- 2074 using _nrn_non_owning_id_without_container = neuron::container::non_owning_identifier_without_container;
- 2075 template <typename T>
- 2076 using _nrn_mechanism_field = neuron::mechanism::field<T>;
- 2077 template <typename... Args>
- 2078 void _nrn_mechanism_register_data_fields(Args&&... args) {
- 2079 neuron::mechanism::register_data_fields(std::forward<Args>(args)...);
-
-
-
-
- 2084 if (info.point_process) {
- 2085 printer->add_line(
"extern Prop* nrn_point_prop_;");
-
- 2087 printer->add_line(
"Prop* hoc_getdata_range(int type);");
-
-
- 2090 if (info.table_count > 0) {
- 2091 printer->add_line(
"void _nrn_thread_table_reg(int, nrn_thread_table_check_t);");
-
-
-
-
-
- 2097 print_mechanism_global_var_structure(print_initializers);
- 2098 print_mechanism_range_var_structure(print_initializers);
- 2099 print_node_data_structure(print_initializers);
- 2100 print_thread_variables_structure(print_initializers);
- 2101 print_make_instance();
- 2102 print_make_node_data();
-
-
-
-
- 2107 if (!info.vectorize) {
-
-
- 2110 printer->add_multi_line(R
"CODE(
-
- 2112 inst->v_unused[id] = v;
-
-
-
-
-
-
- 2119 printer->add_multi_line(R
"CODE(
-
- 2121 inst->g_unused[id] = g;
-
-
-
-
-
-
- 2128 print_hoc_py_wrapper_function_definitions();
- 2129 for (
const auto& procedure: info.procedures) {
- 2130 print_procedure(*procedure);
-
- 2132 for (
const auto&
function: info.functions) {
- 2133 print_function(*
function);
-
-
-
-
-
- 2139 print_net_receive();
-
-
-
-
- 2144 print_backend_info();
- 2145 print_headers_include();
- 2146 print_macro_definitions();
- 2147 print_neuron_global_variable_declarations();
- 2148 print_namespace_start();
- 2149 print_nmodl_constants();
- 2150 print_prcellstate_macros();
- 2151 print_mechanism_info();
- 2152 print_data_structures(
true);
- 2153 print_nrn_constructor();
- 2154 print_nrn_destructor();
-
- 2156 print_function_prototypes();
- 2157 print_functors_definitions();
- 2158 print_global_variables_for_hoc();
- 2159 print_thread_memory_callbacks();
- 2160 print_compute_functions();
- 2161 print_sdlists_init(
true);
- 2162 print_mechanism_register();
- 2163 print_namespace_stop();
-
-
-
- 2167 throw std::runtime_error(
"Not implemented.");
-
-
-
-
-
-
- 2174 if (printing_net_init) {
- 2175 throw std::runtime_error(
"Not implemented. [jfiwoei]");
-
-
- 2178 std::string weight_pointer =
"nullptr";
-
-
- 2181 if (!printing_net_receive) {
- 2182 point_process +=
".get<Point_process*>()";
-
- 2184 const auto& tqitem = get_variable_name(
"tqitem",
false);
-
- 2186 printer->fmt_text(
"{}(/* tqitem */ &{}, {}, {}, {} + ",
- 2187 info.artificial_cell ?
"artcell_net_send" :
"net_send",
-
-
-
- 2191 get_variable_name(
"t"));
- 2192 print_vector_elements(arguments,
", ");
- 2193 printer->add_text(
')');
-
-
-
- 2197 const auto& point_process = get_variable_name(
"point_process",
false);
- 2198 const auto& tqitem = get_variable_name(
"tqitem",
false);
-
- 2200 printer->fmt_text(
"{}(/* tqitem */ &{}, {}, ",
- 2201 info.artificial_cell ?
"artcell_net_move" :
"net_move",
-
-
-
-
- 2206 printer->add_text(
')');
-
-
-
-
-
- 2212 printer->fmt_text(
"net_event({}, t)", point_process);
-
-
-
-
-
-
-
-
-
-
+
+
+ 2022 print_standard_includes();
+ 2023 print_neuron_includes();
+
+ 2025 if (info.thread_callback_register) {
+ 2026 printer->add_line(
"extern void _nrn_thread_reg(int, int, void(*)(Datum*));");
+
+
+
+
+
+ 2032 print_global_macros();
+ 2033 print_mechanism_variables_macros();
+
+ 2035 printer->add_line(
"extern Node* nrn_alloc_node_;");
+
+
+
+
+ 2040 printer->add_newline();
+ 2041 printer->add_line(
"/* NEURON global macro definitions */");
+ 2042 if (info.vectorize) {
+ 2043 printer->add_multi_line(R
"CODE(
+
+ 2045 #define NRN_VECTORIZED 1
+
+
+ 2048 printer->add_multi_line(R
"CODE(
+ 2049 /* NOT VECTORIZED */
+ 2050 #define NRN_VECTORIZED 0
+
+
+
+
+
+
+ 2057 printer->add_newline();
+ 2058 printer->add_line(
"static constexpr auto number_of_datum_variables = ",
+
+
+ 2061 printer->add_line(
"static constexpr auto number_of_floating_point_variables = ",
+
+
+ 2064 printer->add_newline();
+ 2065 printer->add_multi_line(R
"CODE(
+
+ 2067 template <typename T>
+ 2068 using _nrn_mechanism_std_vector = std::vector<T>;
+ 2069 using _nrn_model_sorted_token = neuron::model_sorted_token;
+ 2070 using _nrn_mechanism_cache_range = neuron::cache::MechanismRange<number_of_floating_point_variables, number_of_datum_variables>;
+ 2071 using _nrn_mechanism_cache_instance = neuron::cache::MechanismInstance<number_of_floating_point_variables, number_of_datum_variables>;
+ 2072 using _nrn_non_owning_id_without_container = neuron::container::non_owning_identifier_without_container;
+ 2073 template <typename T>
+ 2074 using _nrn_mechanism_field = neuron::mechanism::field<T>;
+ 2075 template <typename... Args>
+ 2076 void _nrn_mechanism_register_data_fields(Args&&... args) {
+ 2077 neuron::mechanism::register_data_fields(std::forward<Args>(args)...);
+
+
+
+
+ 2082 if (info.point_process) {
+ 2083 printer->add_line(
"extern Prop* nrn_point_prop_;");
+
+ 2085 printer->add_line(
"Prop* hoc_getdata_range(int type);");
+
+
+ 2088 if (info.table_count > 0) {
+ 2089 printer->add_line(
"void _nrn_thread_table_reg(int, nrn_thread_table_check_t);");
+
+
+
+
+
+ 2095 print_mechanism_global_var_structure(print_initializers);
+ 2096 print_mechanism_range_var_structure(print_initializers);
+ 2097 print_node_data_structure(print_initializers);
+ 2098 print_thread_variables_structure(print_initializers);
+ 2099 print_make_instance();
+ 2100 print_make_node_data();
+
+
+
+
+ 2105 if (!info.vectorize) {
+
+
+ 2108 printer->add_multi_line(R
"CODE(
+
+ 2110 inst->v_unused[id] = v;
+
+
+
+
+
+
+ 2117 printer->add_multi_line(R
"CODE(
+
+ 2119 inst->g_unused[id] = g;
+
+
+
+
+
+
+ 2126 print_hoc_py_wrapper_function_definitions();
+ 2127 for (
const auto& procedure: info.procedures) {
+ 2128 print_procedure(*procedure);
+
+ 2130 for (
const auto&
function: info.functions) {
+ 2131 print_function(*
function);
+
+
+
+
+
+ 2137 print_net_receive();
+
+
+
+
+ 2142 print_backend_info();
+ 2143 print_headers_include();
+ 2144 print_macro_definitions();
+ 2145 print_neuron_global_variable_declarations();
+ 2146 print_namespace_start();
+ 2147 print_nmodl_constants();
+ 2148 print_prcellstate_macros();
+ 2149 print_mechanism_info();
+ 2150 print_data_structures(
true);
+ 2151 print_nrn_constructor();
+ 2152 print_nrn_destructor();
+
+ 2154 print_function_prototypes();
+ 2155 print_functors_definitions();
+ 2156 print_global_variables_for_hoc();
+ 2157 print_thread_memory_callbacks();
+ 2158 print_compute_functions();
+ 2159 print_sdlists_init(
true);
+ 2160 print_mechanism_register();
+ 2161 print_namespace_stop();
+
+
+
+ 2165 throw std::runtime_error(
"Not implemented.");
+
+
+
+
+
+
+ 2172 if (printing_net_init) {
+ 2173 throw std::runtime_error(
"Not implemented. [jfiwoei]");
+
+
+ 2176 std::string weight_pointer =
"nullptr";
+
+
+ 2179 if (!printing_net_receive) {
+ 2180 point_process +=
".get<Point_process*>()";
+
+ 2182 const auto& tqitem = get_variable_name(
"tqitem",
false);
+
+ 2184 printer->fmt_text(
"{}(/* tqitem */ &{}, {}, {}, {} + ",
+ 2185 info.artificial_cell ?
"artcell_net_send" :
"net_send",
+
+
+
+ 2189 get_variable_name(
"t"));
+ 2190 print_vector_elements(arguments,
", ");
+ 2191 printer->add_text(
')');
+
+
+
+ 2195 const auto& point_process = get_variable_name(
"point_process",
false);
+ 2196 const auto& tqitem = get_variable_name(
"tqitem",
false);
+
+ 2198 printer->fmt_text(
"{}(/* tqitem */ &{}, {}, ",
+ 2199 info.artificial_cell ?
"artcell_net_move" :
"net_move",
+
+
+
+
+ 2204 printer->add_text(
')');
+
+
+
+
+
+ 2210 printer->fmt_text(
"net_event({}, t)", point_process);
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- 2236 auto n_parameters = parameters.size();
- 2237 for (
size_t i = 0; i < n_parameters; ++i) {
- 2238 const auto& name = parameters[i]->get_node_name();
-
-
-
-
-
-
-
-
-
- 2248 printing_net_receive =
true;
- 2249 auto node = info.net_receive_node;
-
-
-
-
- 2254 ParamVector args = {{
"",
"Point_process*",
"",
"_pnt"},
- 2255 {
"",
"double*",
"",
"_args"},
- 2256 {
"",
"double",
"",
"flag"}};
-
- 2258 printer->fmt_push_block(
"static void nrn_net_receive_{}({})",
-
- 2260 get_parameter_str(args));
+
+
+
+
+
+
+
+
+
+
+ 2234 auto n_parameters = parameters.size();
+ 2235 for (
size_t i = 0; i < n_parameters; ++i) {
+ 2236 const auto& name = parameters[i]->get_node_name();
+
+
+
+
+
+
+
+
+
+ 2246 printing_net_receive =
true;
+ 2247 auto node = info.net_receive_node;
+
+
+
+
+ 2252 ParamVector args = {{
"",
"Point_process*",
"",
"_pnt"},
+ 2253 {
"",
"double*",
"",
"_args"},
+ 2254 {
"",
"double",
"",
"flag"}};
+
+ 2256 printer->fmt_push_block(
"static void nrn_net_receive_{}({})",
+
+ 2258 get_parameter_str(args));
+
+
-
-
- 2264 printer->add_line(
"_nrn_mechanism_cache_instance _lmc{_pnt->prop};");
- 2265 printer->add_line(
"auto * nt = static_cast<NrnThread*>(_pnt->_vnt);");
- 2266 printer->add_line(
"auto * _ppvar = _nrn_mechanism_access_dparam(_pnt->prop);");
-
- 2268 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
- 2269 if (!info.artificial_cell) {
- 2270 printer->fmt_line(
"auto node_data = make_node_data_{}(_pnt->prop);", info.mod_suffix);
-
- 2272 printer->fmt_line(
"// nocmodl has a nullptr dereference for thread variables.");
- 2273 printer->fmt_line(
"// NMODL will fail to compile at a later point, because of");
- 2274 printer->fmt_line(
"// missing '_thread_vars'.");
- 2275 printer->fmt_line(
"Datum * _thread = nullptr;");
-
- 2277 printer->add_line(
"size_t id = 0;");
- 2278 printer->add_line(
"double t = nt->_t;");
+ 2262 printer->add_line(
"_nrn_mechanism_cache_instance _lmc{_pnt->prop};");
+ 2263 printer->add_line(
"auto * nt = static_cast<NrnThread*>(_pnt->_vnt);");
+ 2264 printer->add_line(
"auto * _ppvar = _nrn_mechanism_access_dparam(_pnt->prop);");
+
+ 2266 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
+ 2267 if (!info.artificial_cell) {
+ 2268 printer->fmt_line(
"auto node_data = make_node_data_{}(_pnt->prop);", info.mod_suffix);
+
+ 2270 printer->fmt_line(
"// nocmodl has a nullptr dereference for thread variables.");
+ 2271 printer->fmt_line(
"// NMODL will fail to compile at a later point, because of");
+ 2272 printer->fmt_line(
"// missing '_thread_vars'.");
+ 2273 printer->fmt_line(
"Datum * _thread = nullptr;");
+
+ 2275 printer->add_line(
"size_t id = 0;");
+ 2276 printer->add_line(
"double t = nt->_t;");
+
+ 2278 print_statement_block(*node->get_statement_block(),
false,
false);
- 2280 print_statement_block(*node->get_statement_block(),
false,
false);
-
- 2282 printer->add_newline();
- 2283 printer->pop_block();
- 2284 printing_net_receive =
false;
-
-
-
+ 2280 printer->add_newline();
+ 2281 printer->pop_block();
+ 2282 printing_net_receive =
false;
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
static constexpr char RANDOM_SEMANTIC[]
semantic type for RANDOM variable
static bool starts_with(const std::string &haystack, const std::string &needle)
Check if haystack starts with needle.
-void print_nrn_destructor() override
Print nrn_destructor function definition.
-void print_callable_preamble_from_prop()
Print the set of common variables from a Prop only.
+void print_nrn_destructor() override
Print nrn_destructor function definition.
+void print_callable_preamble_from_prop()
Print the set of common variables from a Prop only.
Base class for all AST node.
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_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_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
void print_neuron_includes()
Print includes from NEURON.
static constexpr char NRN_JACOB_METHOD[]
nrn_jacob method in generated code
-void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
+void print_nrn_init(bool skip_init_check=true)
Print the nrn_init function definition.
void print_hoc_py_wrapper_function_body(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
std::string internal_method_arguments() override
Arguments for functions that are defined and used internally.
std::shared_ptr< symtab::Symbol > SymbolType
-void print_nrn_alloc() override
Print nrn_alloc function definition.
+void print_nrn_alloc() override
Print nrn_alloc function definition.
std::string register_mechanism_arguments() const override
Arguments for register_mech or point_register_mech function.
int position_of_int_var(const std::string &name) const override
Determine the position in the data array for a given int variable.
const ArgumentVector & get_parameters() const noexcept override
Getter for member variable NetReceiveBlock::parameters.
-std::string nrn_current_arguments()
+std::string nrn_current_arguments()
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.
@@ -2433,31 +2431,31 @@
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.
-ParamVector nrn_current_parameters()
-void print_global_param_default_values()
Print global struct with default value of RANGE PARAMETERs.
+ParamVector nrn_current_parameters()
+void print_global_param_default_values()
Print global struct with default value of RANGE PARAMETERs.
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.
+void print_nrn_state() override
Print nrn_state / state update function definition.
virtual bool is_function_block() const noexcept
Check if the ast node is an instance of ast::FunctionBlock.
static constexpr char NRN_ALLOC_METHOD[]
nrn_alloc method in generated code
-void print_initial_block(const ast::InitialBlock *node)
Print the initial block.
+void print_initial_block(const ast::InitialBlock *node)
Print the initial block.
bool is_integer
if this is an integer (e.g.
-void print_global_function_common_code(BlockType type, const std::string &function_name="") override
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
+void print_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.
std::string extra_conc_pointer_name() const
std::shared_ptr< StatementBlock > get_statement_block() const noexcept override
Getter for member variable BreakpointBlock::statement_block.
void print_hoc_py_wrapper_function_definitions()
std::string rev_potential_pointer_name() const
-void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
-void print_ion_variable() override
+void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
+void print_ion_variable() override
static constexpr char CONDUCTANCE_VARIABLE[]
range variable for conductance
ParamVector functor_params() override
The parameters of the Newton solver "functor".
Visitor for printing C++ code compatible with legacy api of CoreNEURON
@@ -2470,62 +2468,62 @@
@ 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.
+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_global_variables_for_hoc() override
Print byte arrays that register scalar and vector variables for hoc interface.
void print_standard_includes() override
Print standard C/C++ includes.
-void print_mechanism_range_var_structure(bool print_initializers) override
Print the structure that wraps all range and int variables required for the NMODL.
+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.
std::string hoc_function_signature(const std::string &function_or_procedure_name) const
Get the signature of the hoc <func_or_proc_name> function.
-void print_thread_variables_structure(bool print_initializers)
Print the data structure used to access thread variables.
+void print_thread_variables_structure(bool print_initializers)
Print the data structure used to access thread variables.
std::string to_string(const T &obj)
-void print_compute_functions() override
Print all compute functions for every backend.
+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.
-void print_thread_memory_callbacks()
Print thread variable (de-)initialization functions.
+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_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.
+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_nrn_jacob()
Print nrn_jacob function definition.
-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_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.
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...
size_t offset
The global variables ahead of this one require offset doubles to store.
-void print_node_data_structure(bool print_initializers)
Print the structure that wraps all node variables required for the NMODL.
+void print_node_data_structure(bool print_initializers)
Print the structure that wraps all node variables required for the NMODL.
static constexpr char INST_GLOBAL_MEMBER[]
instance struct member pointing to the global variable structure
-void print_make_instance() const
Print make_*_instance.
+void print_make_instance() const
Print make_*_instance.
void print_atomic_reduction_pragma() override
Print atomic update pragma for reduction statements.
NmodlType
NMODL variable properties.
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_nrn_constructor() override
Print nrn_constructor function definition.
+void print_mechanism_variables_macros()
Print mechanism variables' related macros.
+void print_nrn_constructor() override
Print nrn_constructor function definition.
void print_check_table_function_prototypes()
Print all check_* function declarations.
BlockType
Helper to represent various block types.
-void print_headers_include() override
Print all includes.
+void print_headers_include() override
Print all includes.
const ParamVector external_method_parameters(bool table=false) noexcept override
Parameters for functions in generated code that are called back from external code.
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.
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.
+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.
std::string simulator_name() override
Name of the simulator the code was generated for.
void print_function_procedure_helper(const ast::Block &node) override
Common helper function to help printing function or procedure blocks.
@@ -2542,7 +2540,7 @@
static constexpr char NRN_DESTRUCTOR_METHOD[]
nrn_destructor method in generated code
static constexpr char CONDUCTANCE_UNUSED_VARIABLE[]
range variable when conductance is not used (for vectorized model)
-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.
static constexpr char NRN_POINTERINDEX[]
hoc_nrnpointerindex name
@@ -2550,11 +2548,11 @@
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.
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.
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 449d1856f..a5816d15e 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-09-13T13:21:26.468523Z",
- "iopub.status.busy": "2024-09-13T13:21:26.467981Z",
- "iopub.status.idle": "2024-09-13T13:21:27.296565Z",
- "shell.execute_reply": "2024-09-13T13:21:27.295794Z"
+ "iopub.execute_input": "2024-09-17T08:23:29.281163Z",
+ "iopub.status.busy": "2024-09-17T08:23:29.280577Z",
+ "iopub.status.idle": "2024-09-17T08:23:30.102117Z",
+ "shell.execute_reply": "2024-09-17T08:23:30.101171Z"
}
},
"outputs": [],
@@ -169,10 +169,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:27.299629Z",
- "iopub.status.busy": "2024-09-13T13:21:27.299393Z",
- "iopub.status.idle": "2024-09-13T13:21:27.331267Z",
- "shell.execute_reply": "2024-09-13T13:21:27.330451Z"
+ "iopub.execute_input": "2024-09-17T08:23:30.105683Z",
+ "iopub.status.busy": "2024-09-17T08:23:30.105134Z",
+ "iopub.status.idle": "2024-09-17T08:23:30.135751Z",
+ "shell.execute_reply": "2024-09-17T08:23:30.135048Z"
}
},
"outputs": [],
@@ -277,10 +277,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:27.334526Z",
- "iopub.status.busy": "2024-09-13T13:21:27.334162Z",
- "iopub.status.idle": "2024-09-13T13:21:27.339151Z",
- "shell.execute_reply": "2024-09-13T13:21:27.338449Z"
+ "iopub.execute_input": "2024-09-17T08:23:30.138815Z",
+ "iopub.status.busy": "2024-09-17T08:23:30.138554Z",
+ "iopub.status.idle": "2024-09-17T08:23:30.143783Z",
+ "shell.execute_reply": "2024-09-17T08:23:30.143090Z"
}
},
"outputs": [
@@ -323,10 +323,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:27.372469Z",
- "iopub.status.busy": "2024-09-13T13:21:27.372039Z",
- "iopub.status.idle": "2024-09-13T13:21:27.376596Z",
- "shell.execute_reply": "2024-09-13T13:21:27.375913Z"
+ "iopub.execute_input": "2024-09-17T08:23:30.175024Z",
+ "iopub.status.busy": "2024-09-17T08:23:30.174461Z",
+ "iopub.status.idle": "2024-09-17T08:23:30.178914Z",
+ "shell.execute_reply": "2024-09-17T08:23:30.178200Z"
}
},
"outputs": [
@@ -367,10 +367,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:27.379225Z",
- "iopub.status.busy": "2024-09-13T13:21:27.378735Z",
- "iopub.status.idle": "2024-09-13T13:21:27.382491Z",
- "shell.execute_reply": "2024-09-13T13:21:27.381789Z"
+ "iopub.execute_input": "2024-09-17T08:23:30.181579Z",
+ "iopub.status.busy": "2024-09-17T08:23:30.181182Z",
+ "iopub.status.idle": "2024-09-17T08:23:30.185150Z",
+ "shell.execute_reply": "2024-09-17T08:23:30.184475Z"
},
"scrolled": true
},
@@ -412,10 +412,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:27.385236Z",
- "iopub.status.busy": "2024-09-13T13:21:27.384729Z",
- "iopub.status.idle": "2024-09-13T13:21:27.388733Z",
- "shell.execute_reply": "2024-09-13T13:21:27.388133Z"
+ "iopub.execute_input": "2024-09-17T08:23:30.187395Z",
+ "iopub.status.busy": "2024-09-17T08:23:30.187197Z",
+ "iopub.status.idle": "2024-09-17T08:23:30.191191Z",
+ "shell.execute_reply": "2024-09-17T08:23:30.190529Z"
},
"scrolled": true
},
@@ -459,10 +459,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:27.391206Z",
- "iopub.status.busy": "2024-09-13T13:21:27.390869Z",
- "iopub.status.idle": "2024-09-13T13:21:27.395589Z",
- "shell.execute_reply": "2024-09-13T13:21:27.394888Z"
+ "iopub.execute_input": "2024-09-17T08:23:30.193827Z",
+ "iopub.status.busy": "2024-09-17T08:23:30.193411Z",
+ "iopub.status.idle": "2024-09-17T08:23:30.197708Z",
+ "shell.execute_reply": "2024-09-17T08:23:30.197042Z"
}
},
"outputs": [
diff --git a/notebooks/nmodl-python-tutorial.ipynb b/notebooks/nmodl-python-tutorial.ipynb
index 0a57422b5..891e9b77e 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-09-13T13:21:32.616407Z",
- "iopub.status.busy": "2024-09-13T13:21:32.615919Z",
- "iopub.status.idle": "2024-09-13T13:21:33.449926Z",
- "shell.execute_reply": "2024-09-13T13:21:33.449057Z"
+ "iopub.execute_input": "2024-09-17T08:23:35.612345Z",
+ "iopub.status.busy": "2024-09-17T08:23:35.611785Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.423158Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.422273Z"
}
},
"outputs": [],
@@ -63,10 +63,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.453289Z",
- "iopub.status.busy": "2024-09-13T13:21:33.452805Z",
- "iopub.status.idle": "2024-09-13T13:21:33.485155Z",
- "shell.execute_reply": "2024-09-13T13:21:33.484459Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.426536Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.426301Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.456065Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.455241Z"
}
},
"outputs": [],
@@ -86,10 +86,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.488714Z",
- "iopub.status.busy": "2024-09-13T13:21:33.488267Z",
- "iopub.status.idle": "2024-09-13T13:21:33.492075Z",
- "shell.execute_reply": "2024-09-13T13:21:33.491440Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.459171Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.458892Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.462842Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.462269Z"
}
},
"outputs": [],
@@ -152,10 +152,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.494612Z",
- "iopub.status.busy": "2024-09-13T13:21:33.494290Z",
- "iopub.status.idle": "2024-09-13T13:21:33.498174Z",
- "shell.execute_reply": "2024-09-13T13:21:33.497510Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.465415Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.465054Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.468979Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.468412Z"
}
},
"outputs": [],
@@ -183,10 +183,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.500806Z",
- "iopub.status.busy": "2024-09-13T13:21:33.500497Z",
- "iopub.status.idle": "2024-09-13T13:21:33.504713Z",
- "shell.execute_reply": "2024-09-13T13:21:33.504011Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.471549Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.471123Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.475246Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.474544Z"
}
},
"outputs": [
@@ -235,10 +235,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.507261Z",
- "iopub.status.busy": "2024-09-13T13:21:33.506857Z",
- "iopub.status.idle": "2024-09-13T13:21:33.510730Z",
- "shell.execute_reply": "2024-09-13T13:21:33.510216Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.477846Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.477461Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.481767Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.481232Z"
}
},
"outputs": [],
@@ -260,10 +260,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.513274Z",
- "iopub.status.busy": "2024-09-13T13:21:33.512910Z",
- "iopub.status.idle": "2024-09-13T13:21:33.516532Z",
- "shell.execute_reply": "2024-09-13T13:21:33.515882Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.484393Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.484008Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.488074Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.487354Z"
}
},
"outputs": [
@@ -297,10 +297,10 @@
"execution_count": 8,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.519022Z",
- "iopub.status.busy": "2024-09-13T13:21:33.518650Z",
- "iopub.status.idle": "2024-09-13T13:21:33.526267Z",
- "shell.execute_reply": "2024-09-13T13:21:33.525559Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.490686Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.490304Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.497661Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.496988Z"
}
},
"outputs": [
@@ -365,10 +365,10 @@
"execution_count": 9,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.528752Z",
- "iopub.status.busy": "2024-09-13T13:21:33.528540Z",
- "iopub.status.idle": "2024-09-13T13:21:33.532864Z",
- "shell.execute_reply": "2024-09-13T13:21:33.532193Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.500111Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.499905Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.504188Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.503524Z"
}
},
"outputs": [
@@ -416,10 +416,10 @@
"execution_count": 10,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.535416Z",
- "iopub.status.busy": "2024-09-13T13:21:33.535212Z",
- "iopub.status.idle": "2024-09-13T13:21:33.538729Z",
- "shell.execute_reply": "2024-09-13T13:21:33.538088Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.506664Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.506463Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.509864Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.509225Z"
}
},
"outputs": [],
@@ -441,10 +441,10 @@
"execution_count": 11,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.541119Z",
- "iopub.status.busy": "2024-09-13T13:21:33.540913Z",
- "iopub.status.idle": "2024-09-13T13:21:33.544770Z",
- "shell.execute_reply": "2024-09-13T13:21:33.544125Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.512376Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.511890Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.515771Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.515061Z"
}
},
"outputs": [
@@ -510,10 +510,10 @@
"execution_count": 12,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.547227Z",
- "iopub.status.busy": "2024-09-13T13:21:33.547023Z",
- "iopub.status.idle": "2024-09-13T13:21:33.550437Z",
- "shell.execute_reply": "2024-09-13T13:21:33.549800Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.518310Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.517944Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.521378Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.520732Z"
}
},
"outputs": [
@@ -548,10 +548,10 @@
"execution_count": 13,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.553036Z",
- "iopub.status.busy": "2024-09-13T13:21:33.552669Z",
- "iopub.status.idle": "2024-09-13T13:21:33.556212Z",
- "shell.execute_reply": "2024-09-13T13:21:33.555593Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.523901Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.523520Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.527108Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.526478Z"
}
},
"outputs": [
@@ -584,10 +584,10 @@
"execution_count": 14,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.558808Z",
- "iopub.status.busy": "2024-09-13T13:21:33.558419Z",
- "iopub.status.idle": "2024-09-13T13:21:33.562026Z",
- "shell.execute_reply": "2024-09-13T13:21:33.561350Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.529588Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.529205Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.533019Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.532355Z"
}
},
"outputs": [
@@ -622,10 +622,10 @@
"execution_count": 15,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.564751Z",
- "iopub.status.busy": "2024-09-13T13:21:33.564363Z",
- "iopub.status.idle": "2024-09-13T13:21:33.568465Z",
- "shell.execute_reply": "2024-09-13T13:21:33.567813Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.535580Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.535191Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.539604Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.538934Z"
}
},
"outputs": [
@@ -669,10 +669,10 @@
"execution_count": 16,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.571108Z",
- "iopub.status.busy": "2024-09-13T13:21:33.570714Z",
- "iopub.status.idle": "2024-09-13T13:21:33.576347Z",
- "shell.execute_reply": "2024-09-13T13:21:33.575666Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.541963Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.541758Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.547167Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.546452Z"
}
},
"outputs": [
@@ -733,10 +733,10 @@
"execution_count": 17,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.578801Z",
- "iopub.status.busy": "2024-09-13T13:21:33.578404Z",
- "iopub.status.idle": "2024-09-13T13:21:33.581921Z",
- "shell.execute_reply": "2024-09-13T13:21:33.581326Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.549814Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.549417Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.553109Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.552551Z"
}
},
"outputs": [],
@@ -761,10 +761,10 @@
"execution_count": 18,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.584507Z",
- "iopub.status.busy": "2024-09-13T13:21:33.584128Z",
- "iopub.status.idle": "2024-09-13T13:21:33.594572Z",
- "shell.execute_reply": "2024-09-13T13:21:33.593982Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.555695Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.555349Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.565776Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.565212Z"
}
},
"outputs": [],
@@ -857,10 +857,10 @@
"execution_count": 19,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.597259Z",
- "iopub.status.busy": "2024-09-13T13:21:33.596843Z",
- "iopub.status.idle": "2024-09-13T13:21:33.600516Z",
- "shell.execute_reply": "2024-09-13T13:21:33.599867Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.568201Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.567875Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.571721Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.571041Z"
}
},
"outputs": [
@@ -897,10 +897,10 @@
"execution_count": 20,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:33.603373Z",
- "iopub.status.busy": "2024-09-13T13:21:33.602975Z",
- "iopub.status.idle": "2024-09-13T13:21:33.608654Z",
- "shell.execute_reply": "2024-09-13T13:21:33.607979Z"
+ "iopub.execute_input": "2024-09-17T08:23:36.574198Z",
+ "iopub.status.busy": "2024-09-17T08:23:36.573880Z",
+ "iopub.status.idle": "2024-09-17T08:23:36.579386Z",
+ "shell.execute_reply": "2024-09-17T08:23:36.578703Z"
}
},
"outputs": [
diff --git a/notebooks/nmodl-sympy-conductance.ipynb b/notebooks/nmodl-sympy-conductance.ipynb
index 754327e6f..6286ef398 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-09-13T13:21:36.064255Z",
- "iopub.status.busy": "2024-09-13T13:21:36.064070Z",
- "iopub.status.idle": "2024-09-13T13:21:36.869392Z",
- "shell.execute_reply": "2024-09-13T13:21:36.868640Z"
+ "iopub.execute_input": "2024-09-17T08:23:39.122236Z",
+ "iopub.status.busy": "2024-09-17T08:23:39.122028Z",
+ "iopub.status.idle": "2024-09-17T08:23:39.965595Z",
+ "shell.execute_reply": "2024-09-17T08:23:39.964763Z"
}
},
"outputs": [],
@@ -103,10 +103,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:36.872445Z",
- "iopub.status.busy": "2024-09-13T13:21:36.872230Z",
- "iopub.status.idle": "2024-09-13T13:21:36.902732Z",
- "shell.execute_reply": "2024-09-13T13:21:36.902044Z"
+ "iopub.execute_input": "2024-09-17T08:23:39.968917Z",
+ "iopub.status.busy": "2024-09-17T08:23:39.968486Z",
+ "iopub.status.idle": "2024-09-17T08:23:40.000203Z",
+ "shell.execute_reply": "2024-09-17T08:23:39.999483Z"
}
},
"outputs": [],
@@ -149,10 +149,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:36.905648Z",
- "iopub.status.busy": "2024-09-13T13:21:36.905434Z",
- "iopub.status.idle": "2024-09-13T13:21:37.189706Z",
- "shell.execute_reply": "2024-09-13T13:21:37.188937Z"
+ "iopub.execute_input": "2024-09-17T08:23:40.003567Z",
+ "iopub.status.busy": "2024-09-17T08:23:40.003094Z",
+ "iopub.status.idle": "2024-09-17T08:23:40.298840Z",
+ "shell.execute_reply": "2024-09-17T08:23:40.298037Z"
}
},
"outputs": [
@@ -196,10 +196,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:37.192598Z",
- "iopub.status.busy": "2024-09-13T13:21:37.192190Z",
- "iopub.status.idle": "2024-09-13T13:21:37.327865Z",
- "shell.execute_reply": "2024-09-13T13:21:37.327104Z"
+ "iopub.execute_input": "2024-09-17T08:23:40.301998Z",
+ "iopub.status.busy": "2024-09-17T08:23:40.301381Z",
+ "iopub.status.idle": "2024-09-17T08:23:40.435812Z",
+ "shell.execute_reply": "2024-09-17T08:23:40.435099Z"
}
},
"outputs": [
@@ -243,10 +243,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:37.330816Z",
- "iopub.status.busy": "2024-09-13T13:21:37.330349Z",
- "iopub.status.idle": "2024-09-13T13:21:37.339408Z",
- "shell.execute_reply": "2024-09-13T13:21:37.338686Z"
+ "iopub.execute_input": "2024-09-17T08:23:40.438455Z",
+ "iopub.status.busy": "2024-09-17T08:23:40.438231Z",
+ "iopub.status.idle": "2024-09-17T08:23:40.447042Z",
+ "shell.execute_reply": "2024-09-17T08:23:40.446310Z"
}
},
"outputs": [
@@ -290,10 +290,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:37.342065Z",
- "iopub.status.busy": "2024-09-13T13:21:37.341646Z",
- "iopub.status.idle": "2024-09-13T13:21:37.361397Z",
- "shell.execute_reply": "2024-09-13T13:21:37.360757Z"
+ "iopub.execute_input": "2024-09-17T08:23:40.449569Z",
+ "iopub.status.busy": "2024-09-17T08:23:40.449351Z",
+ "iopub.status.idle": "2024-09-17T08:23:40.469089Z",
+ "shell.execute_reply": "2024-09-17T08:23:40.468372Z"
}
},
"outputs": [
@@ -337,10 +337,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:37.363936Z",
- "iopub.status.busy": "2024-09-13T13:21:37.363729Z",
- "iopub.status.idle": "2024-09-13T13:21:37.484898Z",
- "shell.execute_reply": "2024-09-13T13:21:37.484150Z"
+ "iopub.execute_input": "2024-09-17T08:23:40.471624Z",
+ "iopub.status.busy": "2024-09-17T08:23:40.471399Z",
+ "iopub.status.idle": "2024-09-17T08:23:40.591514Z",
+ "shell.execute_reply": "2024-09-17T08:23:40.590844Z"
}
},
"outputs": [
@@ -400,10 +400,10 @@
"execution_count": 8,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:37.487819Z",
- "iopub.status.busy": "2024-09-13T13:21:37.487375Z",
- "iopub.status.idle": "2024-09-13T13:21:37.584427Z",
- "shell.execute_reply": "2024-09-13T13:21:37.583709Z"
+ "iopub.execute_input": "2024-09-17T08:23:40.594242Z",
+ "iopub.status.busy": "2024-09-17T08:23:40.593984Z",
+ "iopub.status.idle": "2024-09-17T08:23:40.689767Z",
+ "shell.execute_reply": "2024-09-17T08:23:40.689058Z"
}
},
"outputs": [
@@ -456,10 +456,10 @@
"execution_count": 9,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:37.587278Z",
- "iopub.status.busy": "2024-09-13T13:21:37.586867Z",
- "iopub.status.idle": "2024-09-13T13:21:37.663947Z",
- "shell.execute_reply": "2024-09-13T13:21:37.663246Z"
+ "iopub.execute_input": "2024-09-17T08:23:40.692817Z",
+ "iopub.status.busy": "2024-09-17T08:23:40.692387Z",
+ "iopub.status.idle": "2024-09-17T08:23:40.767811Z",
+ "shell.execute_reply": "2024-09-17T08:23:40.767116Z"
}
},
"outputs": [
diff --git a/notebooks/nmodl-sympy-solver-cnexp.ipynb b/notebooks/nmodl-sympy-solver-cnexp.ipynb
index 51b8452c2..5bbdfcc25 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-09-13T13:21:39.671181Z",
- "iopub.status.busy": "2024-09-13T13:21:39.671000Z",
- "iopub.status.idle": "2024-09-13T13:21:40.471382Z",
- "shell.execute_reply": "2024-09-13T13:21:40.470567Z"
+ "iopub.execute_input": "2024-09-17T08:23:42.560315Z",
+ "iopub.status.busy": "2024-09-17T08:23:42.559757Z",
+ "iopub.status.idle": "2024-09-17T08:23:43.380527Z",
+ "shell.execute_reply": "2024-09-17T08:23:43.379701Z"
}
},
"outputs": [],
@@ -79,10 +79,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:40.474656Z",
- "iopub.status.busy": "2024-09-13T13:21:40.474222Z",
- "iopub.status.idle": "2024-09-13T13:21:40.505292Z",
- "shell.execute_reply": "2024-09-13T13:21:40.504658Z"
+ "iopub.execute_input": "2024-09-17T08:23:43.383787Z",
+ "iopub.status.busy": "2024-09-17T08:23:43.383320Z",
+ "iopub.status.idle": "2024-09-17T08:23:43.415357Z",
+ "shell.execute_reply": "2024-09-17T08:23:43.414667Z"
}
},
"outputs": [],
@@ -123,10 +123,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:40.508246Z",
- "iopub.status.busy": "2024-09-13T13:21:40.507747Z",
- "iopub.status.idle": "2024-09-13T13:21:40.925418Z",
- "shell.execute_reply": "2024-09-13T13:21:40.924708Z"
+ "iopub.execute_input": "2024-09-17T08:23:43.418506Z",
+ "iopub.status.busy": "2024-09-17T08:23:43.418148Z",
+ "iopub.status.idle": "2024-09-17T08:23:43.871967Z",
+ "shell.execute_reply": "2024-09-17T08:23:43.871204Z"
}
},
"outputs": [
@@ -165,10 +165,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:40.928625Z",
- "iopub.status.busy": "2024-09-13T13:21:40.928027Z",
- "iopub.status.idle": "2024-09-13T13:21:41.054013Z",
- "shell.execute_reply": "2024-09-13T13:21:41.053179Z"
+ "iopub.execute_input": "2024-09-17T08:23:43.874817Z",
+ "iopub.status.busy": "2024-09-17T08:23:43.874363Z",
+ "iopub.status.idle": "2024-09-17T08:23:43.987677Z",
+ "shell.execute_reply": "2024-09-17T08:23:43.986911Z"
}
},
"outputs": [
@@ -207,10 +207,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:41.057159Z",
- "iopub.status.busy": "2024-09-13T13:21:41.056621Z",
- "iopub.status.idle": "2024-09-13T13:21:41.260106Z",
- "shell.execute_reply": "2024-09-13T13:21:41.259468Z"
+ "iopub.execute_input": "2024-09-17T08:23:43.990510Z",
+ "iopub.status.busy": "2024-09-17T08:23:43.989961Z",
+ "iopub.status.idle": "2024-09-17T08:23:44.192105Z",
+ "shell.execute_reply": "2024-09-17T08:23:44.191427Z"
}
},
"outputs": [
@@ -255,10 +255,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:41.262658Z",
- "iopub.status.busy": "2024-09-13T13:21:41.262454Z",
- "iopub.status.idle": "2024-09-13T13:21:41.421672Z",
- "shell.execute_reply": "2024-09-13T13:21:41.420961Z"
+ "iopub.execute_input": "2024-09-17T08:23:44.194808Z",
+ "iopub.status.busy": "2024-09-17T08:23:44.194402Z",
+ "iopub.status.idle": "2024-09-17T08:23:44.378232Z",
+ "shell.execute_reply": "2024-09-17T08:23:44.377387Z"
}
},
"outputs": [
@@ -303,10 +303,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:41.424326Z",
- "iopub.status.busy": "2024-09-13T13:21:41.424077Z",
- "iopub.status.idle": "2024-09-13T13:21:43.163447Z",
- "shell.execute_reply": "2024-09-13T13:21:43.162826Z"
+ "iopub.execute_input": "2024-09-17T08:23:44.381657Z",
+ "iopub.status.busy": "2024-09-17T08:23:44.381403Z",
+ "iopub.status.idle": "2024-09-17T08:23:46.164718Z",
+ "shell.execute_reply": "2024-09-17T08:23:46.164052Z"
}
},
"outputs": [
@@ -351,10 +351,10 @@
"execution_count": 8,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:43.165924Z",
- "iopub.status.busy": "2024-09-13T13:21:43.165700Z",
- "iopub.status.idle": "2024-09-13T13:21:45.366892Z",
- "shell.execute_reply": "2024-09-13T13:21:45.366214Z"
+ "iopub.execute_input": "2024-09-17T08:23:46.167379Z",
+ "iopub.status.busy": "2024-09-17T08:23:46.166955Z",
+ "iopub.status.idle": "2024-09-17T08:23:48.403188Z",
+ "shell.execute_reply": "2024-09-17T08:23:48.402488Z"
}
},
"outputs": [
diff --git a/notebooks/nmodl-sympy-solver-derivimplicit.ipynb b/notebooks/nmodl-sympy-solver-derivimplicit.ipynb
index 1249126e3..5aa1806cb 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-09-13T13:21:47.101319Z",
- "iopub.status.busy": "2024-09-13T13:21:47.100935Z",
- "iopub.status.idle": "2024-09-13T13:21:47.893348Z",
- "shell.execute_reply": "2024-09-13T13:21:47.892481Z"
+ "iopub.execute_input": "2024-09-17T08:23:50.292397Z",
+ "iopub.status.busy": "2024-09-17T08:23:50.291995Z",
+ "iopub.status.idle": "2024-09-17T08:23:51.113066Z",
+ "shell.execute_reply": "2024-09-17T08:23:51.112288Z"
}
},
"outputs": [],
@@ -56,10 +56,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:47.896641Z",
- "iopub.status.busy": "2024-09-13T13:21:47.896423Z",
- "iopub.status.idle": "2024-09-13T13:21:47.926430Z",
- "shell.execute_reply": "2024-09-13T13:21:47.925795Z"
+ "iopub.execute_input": "2024-09-17T08:23:51.116270Z",
+ "iopub.status.busy": "2024-09-17T08:23:51.115998Z",
+ "iopub.status.idle": "2024-09-17T08:23:51.147749Z",
+ "shell.execute_reply": "2024-09-17T08:23:51.147051Z"
}
},
"outputs": [],
@@ -100,10 +100,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:47.929043Z",
- "iopub.status.busy": "2024-09-13T13:21:47.928745Z",
- "iopub.status.idle": "2024-09-13T13:21:48.418593Z",
- "shell.execute_reply": "2024-09-13T13:21:48.417838Z"
+ "iopub.execute_input": "2024-09-17T08:23:51.150706Z",
+ "iopub.status.busy": "2024-09-17T08:23:51.150432Z",
+ "iopub.status.idle": "2024-09-17T08:23:51.651974Z",
+ "shell.execute_reply": "2024-09-17T08:23:51.651195Z"
}
},
"outputs": [
@@ -165,10 +165,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:48.421533Z",
- "iopub.status.busy": "2024-09-13T13:21:48.421034Z",
- "iopub.status.idle": "2024-09-13T13:21:48.710976Z",
- "shell.execute_reply": "2024-09-13T13:21:48.710243Z"
+ "iopub.execute_input": "2024-09-17T08:23:51.654706Z",
+ "iopub.status.busy": "2024-09-17T08:23:51.654443Z",
+ "iopub.status.idle": "2024-09-17T08:23:51.947506Z",
+ "shell.execute_reply": "2024-09-17T08:23:51.946766Z"
}
},
"outputs": [
diff --git a/notebooks/nmodl-sympy-solver-sparse.ipynb b/notebooks/nmodl-sympy-solver-sparse.ipynb
index e4c0e8d87..35ab6c97e 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-09-13T13:21:50.049341Z",
- "iopub.status.busy": "2024-09-13T13:21:50.049138Z",
- "iopub.status.idle": "2024-09-13T13:21:50.836829Z",
- "shell.execute_reply": "2024-09-13T13:21:50.835930Z"
+ "iopub.execute_input": "2024-09-17T08:23:53.457951Z",
+ "iopub.status.busy": "2024-09-17T08:23:53.457293Z",
+ "iopub.status.idle": "2024-09-17T08:23:54.271443Z",
+ "shell.execute_reply": "2024-09-17T08:23:54.270700Z"
}
},
"outputs": [],
@@ -56,10 +56,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:50.839917Z",
- "iopub.status.busy": "2024-09-13T13:21:50.839684Z",
- "iopub.status.idle": "2024-09-13T13:21:50.870239Z",
- "shell.execute_reply": "2024-09-13T13:21:50.869472Z"
+ "iopub.execute_input": "2024-09-17T08:23:54.274762Z",
+ "iopub.status.busy": "2024-09-17T08:23:54.274348Z",
+ "iopub.status.idle": "2024-09-17T08:23:54.305378Z",
+ "shell.execute_reply": "2024-09-17T08:23:54.304696Z"
}
},
"outputs": [],
@@ -100,10 +100,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:50.873051Z",
- "iopub.status.busy": "2024-09-13T13:21:50.872724Z",
- "iopub.status.idle": "2024-09-13T13:21:51.361587Z",
- "shell.execute_reply": "2024-09-13T13:21:51.360941Z"
+ "iopub.execute_input": "2024-09-17T08:23:54.308622Z",
+ "iopub.status.busy": "2024-09-17T08:23:54.308195Z",
+ "iopub.status.idle": "2024-09-17T08:23:54.806569Z",
+ "shell.execute_reply": "2024-09-17T08:23:54.805871Z"
}
},
"outputs": [
@@ -165,10 +165,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-09-13T13:21:51.364202Z",
- "iopub.status.busy": "2024-09-13T13:21:51.363946Z",
- "iopub.status.idle": "2024-09-13T13:21:51.669646Z",
- "shell.execute_reply": "2024-09-13T13:21:51.669001Z"
+ "iopub.execute_input": "2024-09-17T08:23:54.809971Z",
+ "iopub.status.busy": "2024-09-17T08:23:54.809721Z",
+ "iopub.status.idle": "2024-09-17T08:23:55.117952Z",
+ "shell.execute_reply": "2024-09-17T08:23:55.117284Z"
}
},
"outputs": [