Skip to content

Commit

Permalink
References for 'BlueBrain/nmodl#1364'.
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions Bot committed Oct 8, 2024
1 parent 1b84e18 commit e8c05cf
Show file tree
Hide file tree
Showing 84 changed files with 6,845 additions and 306 deletions.
10 changes: 7 additions & 3 deletions at_time/neuron/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ namespace neuron {

/* Mechanism procedures and functions */
inline double f_example(_nrn_mechanism_cache_range& _lmc, example_Instance& inst, example_NodeData& node_data, size_t id, Datum* _ppvar, Datum* _thread, NrnThread* nt, double _lx);
static void _apply_diffusion_function(ldifusfunc2_t _f, const _nrn_model_sorted_token& _sorted_token, NrnThread& _nt) {
}

/* Neuron setdata functions */
extern void _nrn_setdata_reg(int, void(*)(Prop*));
static void _setdata(Prop* _prop) {
Expand Down Expand Up @@ -226,11 +229,11 @@ namespace neuron {


void nrn_init_example(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_example(_lmc);
auto node_data = make_node_data_example(*nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
Expand All @@ -240,9 +243,10 @@ namespace neuron {


static void nrn_jacob_example(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_example(_lmc);
auto node_data = make_node_data_example(*nt, *_ml_arg);
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
}
Expand Down
10 changes: 7 additions & 3 deletions builtin_functions/neuron/compile_only.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ namespace neuron {

/* Mechanism procedures and functions */
inline double call_nrn_ghk_compile_only(_nrn_mechanism_cache_range& _lmc, compile_only_Instance& inst, compile_only_NodeData& node_data, size_t id, Datum* _ppvar, Datum* _thread, NrnThread* nt);
static void _apply_diffusion_function(ldifusfunc2_t _f, const _nrn_model_sorted_token& _sorted_token, NrnThread& _nt) {
}

/* Neuron setdata functions */
extern void _nrn_setdata_reg(int, void(*)(Prop*));
static void _setdata(Prop* _prop) {
Expand Down Expand Up @@ -226,11 +229,11 @@ namespace neuron {


void nrn_init_compile_only(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_compile_only(_lmc);
auto node_data = make_node_data_compile_only(*nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
Expand All @@ -240,9 +243,10 @@ namespace neuron {


static void nrn_jacob_compile_only(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_compile_only(_lmc);
auto node_data = make_node_data_compile_only(*nt, *_ml_arg);
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
}
Expand Down
10 changes: 7 additions & 3 deletions constant/neuron/constant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ namespace neuron {

/* Mechanism procedures and functions */
inline double foo_constant_mod(_nrn_mechanism_cache_range& _lmc, constant_mod_Instance& inst, constant_mod_NodeData& node_data, size_t id, Datum* _ppvar, Datum* _thread, NrnThread* nt);
static void _apply_diffusion_function(ldifusfunc2_t _f, const _nrn_model_sorted_token& _sorted_token, NrnThread& _nt) {
}

/* Neuron setdata functions */
extern void _nrn_setdata_reg(int, void(*)(Prop*));
static void _setdata(Prop* _prop) {
Expand Down Expand Up @@ -231,11 +234,11 @@ namespace neuron {


void nrn_init_constant_mod(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_constant_mod(_lmc);
auto node_data = make_node_data_constant_mod(*nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
Expand All @@ -245,9 +248,10 @@ namespace neuron {


static void nrn_jacob_constant_mod(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_constant_mod(_lmc);
auto node_data = make_node_data_constant_mod(*nt, *_ml_arg);
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
}
Expand Down
13 changes: 8 additions & 5 deletions constructor/neuron/art_ctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ namespace neuron {


/* Mechanism procedures and functions */
static void _apply_diffusion_function(ldifusfunc2_t _f, const _nrn_model_sorted_token& _sorted_token, NrnThread& _nt) {
}

/* Point Process specific functions */
static void* _hoc_create_pnt(Object* _ho) {
return create_point_process(_pointtype, _ho);
Expand Down Expand Up @@ -262,22 +265,22 @@ namespace neuron {


void nrn_init_art_ctor(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_art_ctor(_lmc);
auto node_data = make_node_data_art_ctor(*nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
auto* _thread = _ml_arg->_thread;
auto _thread_vars = art_ctor_ThreadVariables(_thread[0].get<double*>());
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
auto* _ppvar = _ml_arg->pdata[id];
}
}


static void nrn_jacob_art_ctor(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_art_ctor(_lmc);
auto node_data = make_node_data_art_ctor(*nt, *_ml_arg);
auto* _thread = _ml_arg->_thread;
auto _thread_vars = art_ctor_ThreadVariables(_thread[0].get<double*>());
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
}
Expand Down
11 changes: 8 additions & 3 deletions constructor/neuron/ctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ namespace neuron {


/* Mechanism procedures and functions */
static void _apply_diffusion_function(ldifusfunc2_t _f, const _nrn_model_sorted_token& _sorted_token, NrnThread& _nt) {
}

/* Point Process specific functions */
static void* _hoc_create_pnt(Object* _ho) {
return create_point_process(_pointtype, _ho);
Expand Down Expand Up @@ -262,12 +265,12 @@ namespace neuron {


void nrn_init_ctor(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_ctor(_lmc);
auto node_data = make_node_data_ctor(*nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
auto* _thread = _ml_arg->_thread;
auto _thread_vars = ctor_ThreadVariables(_thread[0].get<double*>());
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
Expand All @@ -277,9 +280,11 @@ namespace neuron {


static void nrn_jacob_ctor(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_ctor(_lmc);
auto node_data = make_node_data_ctor(*nt, *_ml_arg);
auto* _thread = _ml_arg->_thread;
auto _thread_vars = ctor_ThreadVariables(_thread[0].get<double*>());
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
}
Expand Down
18 changes: 11 additions & 7 deletions electrode_current/neuron/leonhard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ namespace neuron {


/* Mechanism procedures and functions */
static void _apply_diffusion_function(ldifusfunc2_t _f, const _nrn_model_sorted_token& _sorted_token, NrnThread& _nt) {
}

/* Neuron setdata functions */
extern void _nrn_setdata_reg(int, void(*)(Prop*));
static void _setdata(Prop* _prop) {
Expand Down Expand Up @@ -191,11 +194,11 @@ namespace neuron {


void nrn_init_leonhard(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_leonhard(_lmc);
auto node_data = make_node_data_leonhard(*nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
Expand All @@ -214,11 +217,11 @@ namespace neuron {

/** update current */
void nrn_cur_leonhard(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_leonhard(_lmc);
auto node_data = make_node_data_leonhard(*nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
int node_id = node_data.nodeindices[id];
double v = node_data.node_voltages[node_id];
Expand All @@ -234,11 +237,11 @@ namespace neuron {


void nrn_state_leonhard(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_leonhard(_lmc);
auto node_data = make_node_data_leonhard(*nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
int node_id = node_data.nodeindices[id];
auto* _ppvar = _ml_arg->pdata[id];
Expand All @@ -248,9 +251,10 @@ namespace neuron {


static void nrn_jacob_leonhard(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_leonhard(_lmc);
auto node_data = make_node_data_leonhard(*nt, *_ml_arg);
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
int node_id = node_data.nodeindices[id];
Expand Down
10 changes: 7 additions & 3 deletions external/neuron/dst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ namespace neuron {
/* Mechanism procedures and functions */
inline double get_gbl_dst(_nrn_mechanism_cache_range& _lmc, dst_Instance& inst, dst_NodeData& node_data, size_t id, Datum* _ppvar, Datum* _thread, NrnThread* nt);
inline double get_param_dst(_nrn_mechanism_cache_range& _lmc, dst_Instance& inst, dst_NodeData& node_data, size_t id, Datum* _ppvar, Datum* _thread, NrnThread* nt);
static void _apply_diffusion_function(ldifusfunc2_t _f, const _nrn_model_sorted_token& _sorted_token, NrnThread& _nt) {
}

/* Neuron setdata functions */
extern void _nrn_setdata_reg(int, void(*)(Prop*));
static void _setdata(Prop* _prop) {
Expand Down Expand Up @@ -273,11 +276,11 @@ namespace neuron {


void nrn_init_dst(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_dst(_lmc);
auto node_data = make_node_data_dst(*nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
Expand All @@ -287,9 +290,10 @@ namespace neuron {


static void nrn_jacob_dst(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_dst(_lmc);
auto node_data = make_node_data_dst(*nt, *_ml_arg);
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
}
Expand Down
10 changes: 7 additions & 3 deletions external/neuron/src.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ namespace neuron {


/* Mechanism procedures and functions */
static void _apply_diffusion_function(ldifusfunc2_t _f, const _nrn_model_sorted_token& _sorted_token, NrnThread& _nt) {
}

/* Neuron setdata functions */
extern void _nrn_setdata_reg(int, void(*)(Prop*));
static void _setdata(Prop* _prop) {
Expand Down Expand Up @@ -193,11 +196,11 @@ namespace neuron {


void nrn_init_src(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_src(_lmc);
auto node_data = make_node_data_src(*nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
Expand All @@ -207,9 +210,10 @@ namespace neuron {


static void nrn_jacob_src(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_src(_lmc);
auto node_data = make_node_data_src(*nt, *_ml_arg);
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
}
Expand Down
12 changes: 7 additions & 5 deletions function/neuron/artificial_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ namespace neuron {
/* Mechanism procedures and functions */
inline double x_plus_a_art_functions(_nrn_mechanism_cache_range& _lmc, art_functions_Instance& inst, size_t id, Datum* _ppvar, Datum* _thread, NrnThread* nt, double _la);
inline double identity_art_functions(_nrn_mechanism_cache_range& _lmc, art_functions_Instance& inst, size_t id, Datum* _ppvar, Datum* _thread, NrnThread* nt, double _lv);
static void _apply_diffusion_function(ldifusfunc2_t _f, const _nrn_model_sorted_token& _sorted_token, NrnThread& _nt) {
}

/* Point Process specific functions */
static void* _hoc_create_pnt(Object* _ho) {
return create_point_process(_pointtype, _ho);
Expand Down Expand Up @@ -282,11 +285,10 @@ namespace neuron {


void nrn_init_art_functions(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_art_functions(_lmc);
auto node_data = make_node_data_art_functions(*nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
auto* _ppvar = _ml_arg->pdata[id];
inst.z[id] = inst.global->z0;
Expand All @@ -297,9 +299,9 @@ namespace neuron {


static void nrn_jacob_art_functions(const _nrn_model_sorted_token& _sorted_token, NrnThread* nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};
_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _ml_arg->type()};
auto inst = make_instance_art_functions(_lmc);
auto node_data = make_node_data_art_functions(*nt, *_ml_arg);
auto* _thread = _ml_arg->_thread;
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
}
Expand Down
Loading

0 comments on commit e8c05cf

Please sign in to comment.