CoreNEURON
register_mech.cpp
Go to the documentation of this file.
1 /*
2 # =============================================================================
3 # Copyright (c) 2016 - 2021 Blue Brain Project/EPFL
4 #
5 # See top-level LICENSE file for details.
6 # =============================================================================.
7 */
8 
9 #include <cstring>
10 
11 #include "coreneuron/nrnconf.h"
19 
20 namespace coreneuron {
21 int secondorder = 0;
22 double t, dt, celsius, pi;
23 int rev_dt;
24 
25 using Pfrv = void (*)();
26 
27 static void ion_write_depend(int type, int etype);
28 
30  if (type == -1) {
31  return;
32  }
33  corenrn.get_bbcore_read()[type] = f;
34 }
36  if (type == -1) {
37  return;
38  }
39  corenrn.get_bbcore_write()[type] = f;
40 }
41 
42 void add_nrn_has_net_event(int type) {
43  if (type == -1) {
44  return;
45  }
46  corenrn.get_has_net_event().push_back(type);
47 }
48 
49 /* values are type numbers of mechanisms which have FOR_NETCONS statement */
50 int nrn_fornetcon_cnt_; /* how many models have a FOR_NETCONS statement */
51 int* nrn_fornetcon_type_; /* what are the type numbers */
52 int* nrn_fornetcon_index_; /* what is the index into the ppvar array */
53 
54 void add_nrn_fornetcons(int type, int indx) {
55  if (type == -1)
56  return;
57 
58  int i = nrn_fornetcon_cnt_++;
59  nrn_fornetcon_type_ = (int*) erealloc(nrn_fornetcon_type_, (i + 1) * sizeof(int));
60  nrn_fornetcon_index_ = (int*) erealloc(nrn_fornetcon_index_, (i + 1) * sizeof(int));
61  nrn_fornetcon_type_[i] = type;
62  nrn_fornetcon_index_[i] = indx;
63 }
64 
65 void add_nrn_artcell(int type, int qi) {
66  if (type == -1) {
67  return;
68  }
69 
70  corenrn.get_is_artificial()[type] = 1;
71  corenrn.get_artcell_qindex()[type] = qi;
72 }
73 
74 void set_pnt_receive(int type,
75  pnt_receive_t pnt_receive,
76  pnt_receive_t pnt_receive_init,
77  short size) {
78  if (type == -1) {
79  return;
80  }
81  corenrn.get_pnt_receive()[type] = pnt_receive;
82  corenrn.get_pnt_receive_init()[type] = pnt_receive_init;
83  corenrn.get_pnt_receive_size()[type] = size;
84 }
85 
86 void alloc_mech(int memb_func_size_) {
87  corenrn.get_memb_funcs().resize(memb_func_size_);
88  corenrn.get_pnt_map().resize(memb_func_size_);
89  corenrn.get_pnt_receive().resize(memb_func_size_);
90  corenrn.get_pnt_receive_init().resize(memb_func_size_);
91  corenrn.get_pnt_receive_size().resize(memb_func_size_);
92  corenrn.get_watch_check().resize(memb_func_size_);
93  corenrn.get_is_artificial().resize(memb_func_size_, false);
94  corenrn.get_artcell_qindex().resize(memb_func_size_);
95  corenrn.get_prop_param_size().resize(memb_func_size_);
96  corenrn.get_prop_dparam_size().resize(memb_func_size_);
97  corenrn.get_mech_data_layout().resize(memb_func_size_, 1);
98  corenrn.get_bbcore_read().resize(memb_func_size_);
99  corenrn.get_bbcore_write().resize(memb_func_size_);
100 }
101 
102 void initnrn() {
103  secondorder = DEF_secondorder; /* >0 means crank-nicolson. 2 means currents
104  adjusted to t+dt/2 */
105  t = 0.; /* msec */
106  dt = DEF_dt; /* msec */
107  rev_dt = (int) (DEF_rev_dt); /* 1/msec */
108  celsius = DEF_celsius; /* degrees celsius */
109 }
110 
111 /* if vectorized then thread_data_size added to it */
112 int register_mech(const char** m,
113  mod_alloc_t alloc,
114  mod_f_t cur,
115  mod_f_t jacob,
116  mod_f_t stat,
117  mod_f_t initialize,
118  mod_f_t private_constructor,
119  mod_f_t private_destructor,
120  int /* nrnpointerindex */,
121  int vectorized) {
122  auto& memb_func = corenrn.get_memb_funcs();
123 
124  int type = nrn_get_mechtype(m[1]);
125 
126  // No mechanism in the .dat files
127  if (type == -1)
128  return type;
129 
130  assert(type);
131 #ifdef DEBUG
132  printf("register_mech %s %d\n", m[1], type);
133 #endif
134  if (memb_func[type].sym) {
135  assert(strcmp(memb_func[type].sym, m[1]) == 0);
136  } else {
137  memb_func[type].sym = (char*) emalloc(strlen(m[1]) + 1);
138  strcpy(memb_func[type].sym, m[1]);
139  }
140  memb_func[type].current = cur;
141  memb_func[type].jacob = jacob;
142  memb_func[type].alloc = alloc;
143  memb_func[type].state = stat;
144  memb_func[type].initialize = initialize;
145  memb_func[type].constructor = nullptr;
146  memb_func[type].destructor = nullptr;
147  memb_func[type].private_constructor = private_constructor;
148  memb_func[type].private_destructor = private_destructor;
149 #if VECTORIZE
150  memb_func[type].vectorized = vectorized ? 1 : 0;
151  memb_func[type].thread_size_ = vectorized ? (vectorized - 1) : 0;
152  memb_func[type].thread_mem_init_ = nullptr;
153  memb_func[type].thread_cleanup_ = nullptr;
154  memb_func[type].thread_table_check_ = nullptr;
155  memb_func[type].is_point = 0;
156  memb_func[type].setdata_ = nullptr;
157  memb_func[type].dparam_semantics = nullptr;
158 #endif
159  register_all_variables_offsets(type, &m[2]);
160  return type;
161 }
162 
163 void nrn_writes_conc(int type, int /* unused */) {
164  static int lastion = EXTRACELL + 1;
165  if (type == -1)
166  return;
167 
168 #if CORENRN_DEBUG
169  printf("%s reordered from %d to %d\n", corenrn.get_memb_func(type).sym, type, lastion);
170 #endif
171  if (nrn_is_ion(type)) {
172  ++lastion;
173  }
174 }
175 
176 void _nrn_layout_reg(int type, int layout) {
177  corenrn.get_mech_data_layout()[type] = layout;
178 }
179 
181  corenrn.get_net_buf_receive().emplace_back(f, type);
182 }
183 
185  corenrn.get_net_buf_send_type().push_back(type);
186 }
187 
189  corenrn.get_watch_check()[type] = nwc;
190 }
191 
192 void hoc_register_prop_size(int type, int psize, int dpsize) {
193  if (type == -1)
194  return;
195 
196  int pold = corenrn.get_prop_param_size()[type];
197  int dpold = corenrn.get_prop_dparam_size()[type];
198  if (psize != pold || dpsize != dpold) {
199  corenrn.get_different_mechanism_type().push_back(type);
200  }
201  corenrn.get_prop_param_size()[type] = psize;
202  corenrn.get_prop_dparam_size()[type] = dpsize;
203  if (dpsize) {
204  corenrn.get_memb_func(type).dparam_semantics = (int*) ecalloc(dpsize, sizeof(int));
205  }
206 }
207 void hoc_register_dparam_semantics(int type, int ix, const char* name) {
208  /* needed for SoA to possibly reorder name_ion and some "pointer" pointers. */
209  /* only interested in area, iontype, cvode_ieq,
210  netsend, pointer, pntproc, bbcorepointer, watch, diam, fornetcon
211  xx_ion and #xx_ion which will get
212  a semantics value of -1, -2, -3,
213  -4, -5, -6, -7, -8, -9, -10,
214  type, and type+1000 respectively
215  */
216  auto& memb_func = corenrn.get_memb_funcs();
217  if (strcmp(name, "area") == 0) {
218  memb_func[type].dparam_semantics[ix] = -1;
219  } else if (strcmp(name, "iontype") == 0) {
220  memb_func[type].dparam_semantics[ix] = -2;
221  } else if (strcmp(name, "cvodeieq") == 0) {
222  memb_func[type].dparam_semantics[ix] = -3;
223  } else if (strcmp(name, "netsend") == 0) {
224  memb_func[type].dparam_semantics[ix] = -4;
225  } else if (strcmp(name, "pointer") == 0) {
226  memb_func[type].dparam_semantics[ix] = -5;
227  } else if (strcmp(name, "pntproc") == 0) {
228  memb_func[type].dparam_semantics[ix] = -6;
229  } else if (strcmp(name, "bbcorepointer") == 0) {
230  memb_func[type].dparam_semantics[ix] = -7;
231  } else if (strcmp(name, "watch") == 0) {
232  memb_func[type].dparam_semantics[ix] = -8;
233  } else if (strcmp(name, "diam") == 0) {
234  memb_func[type].dparam_semantics[ix] = -9;
235  } else if (strcmp(name, "fornetcon") == 0) {
236  memb_func[type].dparam_semantics[ix] = -10;
237  } else {
238  int i = name[0] == '#' ? 1 : 0;
239  int etype = nrn_get_mechtype(name + i);
240  memb_func[type].dparam_semantics[ix] = etype + i * 1000;
241  /* note that if style is needed (i==1), then we are writing a concentration */
242  if (i) {
243  ion_write_depend(type, etype);
244  }
245  }
246 #if CORENRN_DEBUG
247  printf("dparam semantics %s ix=%d %s %d\n",
248  memb_func[type].sym,
249  ix,
250  name,
251  memb_func[type].dparam_semantics[ix]);
252 #endif
253 }
254 
255 /* only ion type ion_write_depend_ are non-nullptr */
256 /* and those are array of integers with first integer being array size */
257 /* and remaining size-1 integers containing the mechanism types that write concentrations to that
258  * ion */
259 static void ion_write_depend(int type, int etype) {
260  auto& memb_func = corenrn.get_memb_funcs();
261  auto& ion_write_depend_ = corenrn.get_ion_write_dependency();
262  if (ion_write_depend_.size() < memb_func.size()) {
263  ion_write_depend_.resize(memb_func.size());
264  }
265 
266  int size = !ion_write_depend_[etype].empty() ? ion_write_depend_[etype][0] + 1 : 2;
267 
268  ion_write_depend_[etype].resize(size, 0);
269  ion_write_depend_[etype][0] = size;
270  ion_write_depend_[etype][size - 1] = type;
271 }
272 
273 static int depend_append(int idep, int* dependencies, int deptype, int type) {
274  /* append only if not already in dependencies and != type*/
275  bool add = true;
276  if (deptype == type) {
277  return idep;
278  }
279  for (int i = 0; i < idep; ++i) {
280  if (deptype == dependencies[i]) {
281  add = false;
282  break;
283  }
284  }
285  if (add) {
286  dependencies[idep++] = deptype;
287  }
288  return idep;
289 }
290 
291 /* return list of types that this type depends on (10 should be more than enough) */
292 /* dependencies must be an array that is large enough to hold that array */
293 /* number of dependencies is returned */
294 int nrn_mech_depend(int type, int* dependencies) {
295  int dpsize = corenrn.get_prop_dparam_size()[type];
296  int* ds = corenrn.get_memb_func(type).dparam_semantics;
297  int idep = 0;
298  if (ds)
299  for (int i = 0; i < dpsize; ++i) {
300  if (ds[i] > 0 && ds[i] < 1000) {
301  int deptype = ds[i];
302  int idepnew = depend_append(idep, dependencies, deptype, type);
303  if ((idepnew > idep) && !corenrn.get_ion_write_dependency().empty() &&
304  !corenrn.get_ion_write_dependency()[deptype].empty()) {
305  auto& iwd = corenrn.get_ion_write_dependency()[deptype];
306  int size = iwd[0];
307  for (int j = 1; j < size; ++j) {
308  idepnew = depend_append(idepnew, dependencies, iwd[j], type);
309  }
310  }
311  idep = idepnew;
312  }
313  }
314  return idep;
315 }
316 
318  corenrn.get_memb_funcs().back().constructor = c;
319 }
320 
322  corenrn.get_memb_funcs().back().destructor = d;
323 }
324 
325 int point_reg_helper(const Symbol* s2) {
326  static int next_pointtype = 1; /* starts at 1 since 0 means not point in pnt_map */
327  int type = nrn_get_mechtype(s2);
328 
329  // No mechanism in the .dat files
330  if (type == -1)
331  return type;
332 
333  corenrn.get_pnt_map()[type] = next_pointtype++;
334  corenrn.get_memb_func(type).is_point = 1;
335 
336  return corenrn.get_pnt_map()[type];
337 }
338 
339 int point_register_mech(const char** m,
340  mod_alloc_t alloc,
341  mod_f_t cur,
342  mod_f_t jacob,
343  mod_f_t stat,
344  mod_f_t initialize,
345  mod_f_t private_constructor,
346  mod_f_t private_destructor,
347  int nrnpointerindex,
348  mod_f_t constructor,
349  mod_f_t destructor,
350  int vectorized) {
351  const Symbol* s = m[1];
352  register_mech(m,
353  alloc,
354  cur,
355  jacob,
356  stat,
357  initialize,
358  private_constructor,
359  private_destructor,
360  nrnpointerindex,
361  vectorized);
362  register_constructor(constructor);
363  register_destructor(destructor);
364  return point_reg_helper(s);
365 }
366 
367 void _modl_cleanup() {}
368 
371 void state_discontinuity(int /* i */, double* pd, double d) {
373  *pd = d;
374  /*printf("state_discontinuity t=%g pd=%lx d=%g\n", t, (long)pd, d);*/
375  }
376 }
377 
378 void hoc_reg_ba(int mt, mod_f_t f, int type) {
379  if (type == -1)
380  return;
381 
382  switch (type) { /* see bablk in src/nmodl/nocpout.c */
383  case 11:
384  type = BEFORE_BREAKPOINT;
385  break;
386  case 22:
387  type = AFTER_SOLVE;
388  break;
389  case 13:
390  type = BEFORE_INITIAL;
391  break;
392  case 23:
393  type = AFTER_INITIAL;
394  break;
395  case 14:
396  type = BEFORE_STEP;
397  break;
398  default:
399  printf("before-after processing type %d for %s not implemented\n",
400  type,
401  corenrn.get_memb_func(mt).sym);
402  nrn_exit(1);
403  }
404  auto bam = (BAMech*) emalloc(sizeof(BAMech));
405  bam->f = f;
406  bam->type = mt;
407  bam->next = nullptr;
408  // keep in call order
409  if (!corenrn.get_bamech()[type]) {
410  corenrn.get_bamech()[type] = bam;
411  } else {
412  BAMech* last;
413  for (last = corenrn.get_bamech()[type]; last->next; last = last->next) {
414  }
415  last->next = bam;
416  }
417 }
418 
419 void _nrn_thread_reg0(int i, void (*f)(ThreadDatum*)) {
420  if (i == -1)
421  return;
422 
423  corenrn.get_memb_func(i).thread_cleanup_ = f;
424 }
425 
426 void _nrn_thread_reg1(int i, void (*f)(ThreadDatum*)) {
427  if (i == -1)
428  return;
429 
430  corenrn.get_memb_func(i).thread_mem_init_ = f;
431 }
432 
434  if (i == -1)
435  return;
436 
437  corenrn.get_memb_func(i).thread_table_check_ = f;
438 }
439 
440 void _nrn_setdata_reg(int i, void (*call)(double*, Datum*)) {
441  if (i == -1)
442  return;
443 
444  corenrn.get_memb_func(i).setdata_ = call;
445 }
446 
448  if (sym != nullptr) {
449  free(sym);
450  }
451  if (dparam_semantics != nullptr) {
452  free(dparam_semantics);
453  }
454 }
455 
456 } // namespace coreneuron
coreneuron::CoreNeuron::get_mech_data_layout
auto & get_mech_data_layout()
Definition: coreneuron.hpp:174
coreneuron::_modl_cleanup
void _modl_cleanup()
Definition: register_mech.cpp:367
coreneuron::ion_write_depend
static void ion_write_depend(int type, int etype)
Definition: register_mech.cpp:259
coreneuron::thread_table_check_t
void(*)(int, int, double *, Datum *, ThreadDatum *, NrnThread *, Memb_list *, int) thread_table_check_t
Definition: membfunc.hpp:27
coreneuron::add_nrn_artcell
void add_nrn_artcell(int type, int qi)
Definition: register_mech.cpp:65
coreneuron::nrn_fornetcon_type_
int * nrn_fornetcon_type_
Definition: register_mech.cpp:51
coreneuron::nrn_get_mechtype
int nrn_get_mechtype(const char *name)
Get mechanism type by the mechanism name.
Definition: mk_mech.cpp:138
coreneuron::Memb_func::sym
Symbol * sym
Definition: membfunc.hpp:45
membfunc.hpp
coreneuron::nrn_fornetcon_cnt_
int nrn_fornetcon_cnt_
Definition: register_mech.cpp:50
coreneuron::pnt_receive_t
void(*)(Point_process *, int, double) pnt_receive_t
Definition: membfunc.hpp:25
coreneuron::alloc_mech
void alloc_mech(int memb_func_size_)
Definition: register_mech.cpp:86
coreneuron::_nrn_thread_reg1
void _nrn_thread_reg1(int i, void(*f)(ThreadDatum *))
Definition: register_mech.cpp:426
coreneuron::ecalloc
void * ecalloc(size_t n, size_t size)
Definition: nrnoc_aux.cpp:85
coreneuron::rev_dt
int rev_dt
Definition: register_mech.cpp:23
eion.hpp
coreneuron::nrn_fornetcon_index_
int * nrn_fornetcon_index_
Definition: register_mech.cpp:52
coreneuron::nrn_watch_check_t
void(*)(NrnThread *, Memb_list *) nrn_watch_check_t
Definition: membfunc.hpp:119
coreneuron::Datum
int Datum
Definition: nrnconf.h:23
coreneuron::CoreNeuron::get_net_buf_send_type
auto & get_net_buf_send_type()
Definition: coreneuron.hpp:158
coreneuron::register_all_variables_offsets
void register_all_variables_offsets(int mech_id, SerializedNames variable_names)
Definition: mech_mapping.cpp:58
nrnoc_aux.hpp
coreneuron::CoreNeuron::get_is_artificial
auto & get_is_artificial()
Definition: coreneuron.hpp:178
coreneuron::_nrn_thread_table_reg
void _nrn_thread_table_reg(int i, thread_table_check_t f)
Definition: register_mech.cpp:433
coreneuron::hoc_reg_ba
void hoc_reg_ba(int, mod_f_t, int)
Definition: register_mech.cpp:378
coreneuron::add_nrn_fornetcons
void add_nrn_fornetcons(int, int)
Definition: register_mech.cpp:54
coreneuron::CoreNeuron::get_memb_func
auto & get_memb_func(size_t idx)
Definition: coreneuron.hpp:138
DEF_dt
#define DEF_dt
Definition: membrane_definitions.h:13
DEF_celsius
#define DEF_celsius
Definition: membrane_definitions.h:20
coreneuron::CoreNeuron::get_bbcore_write
auto & get_bbcore_write()
Definition: coreneuron.hpp:214
coreneuron::point_register_mech
int point_register_mech(const char **, mod_alloc_t alloc, mod_f_t cur, mod_f_t jacob, mod_f_t stat, mod_f_t initialize, mod_f_t private_constructor, mod_f_t private_destructor, int nrnpointerindex, mod_f_t constructor, mod_f_t destructor, int vectorized)
Definition: register_mech.cpp:339
coreneuron::state_discon_flag_
int state_discon_flag_
Definition: register_mech.cpp:370
coreneuron::register_mech
int register_mech(const char **m, mod_alloc_t alloc, mod_f_t cur, mod_f_t jacob, mod_f_t stat, mod_f_t initialize, mod_f_t private_constructor, mod_f_t private_destructor, int nrnpointerindex, int vectorized)
Definition: register_mech.cpp:112
coreneuron::initnrn
void initnrn()
Definition: register_mech.cpp:102
coreneuron::Memb_func::~Memb_func
~Memb_func()
Definition: register_mech.cpp:447
coreneuron::CoreNeuron::get_ion_write_dependency
auto & get_ion_write_dependency()
Definition: coreneuron.hpp:150
coreneuron::register_destructor
void register_destructor(mod_f_t d)
Definition: register_mech.cpp:321
coreneuron.hpp
coreneuron
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
Definition: corenrn_parameters.cpp:12
coreneuron::_nrn_layout_reg
void _nrn_layout_reg(int, int)
Definition: register_mech.cpp:176
coreneuron::t
double t
Definition: register_mech.cpp:22
coreneuron::i
int i
Definition: cellorder.cpp:485
coreneuron::BAMech::next
struct BAMech * next
Definition: membfunc.hpp:76
coreneuron::nrn_is_ion
int nrn_is_ion(int)
coreneuron::register_constructor
void register_constructor(mod_f_t constructor)
Definition: register_mech.cpp:317
coreneuron::Symbol
char Symbol
Definition: nrnconf.h:25
coreneuron::Memb_func::dparam_semantics
int * dparam_semantics
Definition: membfunc.hpp:53
coreneuron::dt
double dt
Definition: register_mech.cpp:22
coreneuron::hoc_register_net_receive_buffering
void hoc_register_net_receive_buffering(NetBufReceive_t, int)
Definition: register_mech.cpp:180
mech_mapping.hpp
coreneuron::CoreNeuron::get_prop_dparam_size
auto & get_prop_dparam_size()
Definition: coreneuron.hpp:170
AFTER_INITIAL
#define AFTER_INITIAL
Definition: membfunc.hpp:68
DEF_rev_dt
#define DEF_rev_dt
Definition: membrane_definitions.h:14
coreneuron::CoreNeuron::get_memb_funcs
auto & get_memb_funcs()
Definition: coreneuron.hpp:134
coreneuron::CoreNeuron::get_has_net_event
auto & get_has_net_event()
Definition: coreneuron.hpp:202
coreneuron::CoreNeuron::get_bbcore_read
auto & get_bbcore_read()
Definition: coreneuron.hpp:210
coreneuron::CoreNeuron::get_watch_check
auto & get_watch_check()
Definition: coreneuron.hpp:198
coreneuron::mod_f_t
void(*)(NrnThread *, Memb_list *, int) mod_f_t
Definition: membfunc.hpp:24
EXTRACELL
#define EXTRACELL
Definition: membfunc.hpp:61
coreneuron::nrn_exit
void nrn_exit(int err)
Definition: nrnoc_aux.cpp:30
BEFORE_BREAKPOINT
#define BEFORE_BREAKPOINT
Definition: membfunc.hpp:69
coreneuron::_nrn_setdata_reg
void _nrn_setdata_reg(int i, void(*call)(double *, Datum *))
Definition: register_mech.cpp:440
coreneuron::state_discon_allowed_
int state_discon_allowed_
Definition: register_mech.cpp:369
coreneuron::nrn_mech_depend
int nrn_mech_depend(int type, int *dependencies)
Definition: register_mech.cpp:294
coreneuron::state_discontinuity
void state_discontinuity(int, double *pd, double d)
Definition: register_mech.cpp:371
coreneuron::mod_alloc_t
void(*)(double *, Datum *, int) mod_alloc_t
Definition: membfunc.hpp:23
coreneuron::CoreNeuron::get_artcell_qindex
auto & get_artcell_qindex()
Definition: coreneuron.hpp:182
coreneuron::CoreNeuron::get_pnt_receive_init
auto & get_pnt_receive_init()
Definition: coreneuron.hpp:190
coreneuron::corenrn
CoreNeuron corenrn
Definition: multicore.cpp:53
coreneuron::nrn_writes_conc
void nrn_writes_conc(int, int)
Definition: register_mech.cpp:163
coreneuron::bbcore_read_t
void(*)(double *, int *, int *, int *, int, int, double *, Datum *, ThreadDatum *, NrnThread *, Memb_list *, double) bbcore_read_t
Definition: membfunc.hpp:205
coreneuron::hoc_register_net_send_buffering
void hoc_register_net_send_buffering(int)
Definition: register_mech.cpp:184
coreneuron::depend_append
static int depend_append(int idep, int *dependencies, int deptype, int type)
Definition: register_mech.cpp:273
BEFORE_INITIAL
#define BEFORE_INITIAL
Definition: membfunc.hpp:67
AFTER_SOLVE
#define AFTER_SOLVE
Definition: membfunc.hpp:70
coreneuron::ThreadDatum
Definition: mechanism.hpp:26
coreneuron::point_reg_helper
int point_reg_helper(const Symbol *s2)
Definition: register_mech.cpp:325
membrane_definitions.h
coreneuron::CoreNeuron::get_net_buf_receive
auto & get_net_buf_receive()
Definition: coreneuron.hpp:154
coreneuron::CoreNeuron::get_different_mechanism_type
auto & get_different_mechanism_type()
Definition: coreneuron.hpp:142
coreneuron::hoc_register_watch_check
void hoc_register_watch_check(nrn_watch_check_t, int)
Definition: register_mech.cpp:188
nrnconf.h
coreneuron::add_nrn_has_net_event
void add_nrn_has_net_event(int)
Definition: register_mech.cpp:42
coreneuron::hoc_register_dparam_semantics
void hoc_register_dparam_semantics(int type, int, const char *name)
Definition: register_mech.cpp:207
DEF_secondorder
#define DEF_secondorder
Definition: membrane_definitions.h:15
coreneuron::CoreNeuron::get_pnt_map
auto & get_pnt_map()
Definition: coreneuron.hpp:146
coreneuron::Pfrv
void(*)() Pfrv
Definition: register_mech.cpp:25
coreneuron::BAMech
Definition: membfunc.hpp:73
coreneuron::emalloc
static void * emalloc(size_t size)
Definition: mpispike.cpp:30
multicore.hpp
coreneuron::CoreNeuron::get_prop_param_size
auto & get_prop_param_size()
Definition: coreneuron.hpp:166
coreneuron::celsius
double celsius
Definition: register_mech.cpp:22
coreneuron::secondorder
int secondorder
Definition: register_mech.cpp:21
coreneuron::hoc_reg_bbcore_write
void hoc_reg_bbcore_write(int type, bbcore_write_t f)
Definition: register_mech.cpp:35
coreneuron::erealloc
void * erealloc(void *ptr, size_t size)
Definition: nrnoc_aux.cpp:94
coreneuron::bbcore_write_t
void(*)(double *, int *, int *, int *, int, int, double *, Datum *, ThreadDatum *, NrnThread *, Memb_list *, double) bbcore_write_t
Definition: membfunc.hpp:218
coreneuron::CoreNeuron::get_bamech
auto & get_bamech()
Definition: coreneuron.hpp:162
coreneuron::pi
double pi
Definition: register_mech.cpp:22
coreneuron::set_pnt_receive
void set_pnt_receive(int type, pnt_receive_t pnt_receive, pnt_receive_t pnt_receive_init, short size)
Definition: register_mech.cpp:74
coreneuron::hoc_register_prop_size
void hoc_register_prop_size(int, int, int)
Definition: register_mech.cpp:192
coreneuron::hoc_reg_bbcore_read
void hoc_reg_bbcore_read(int type, bbcore_read_t f)
Definition: register_mech.cpp:29
coreneuron::NetBufReceive_t
void(*)(NrnThread *) NetBufReceive_t
Definition: membfunc.hpp:114
coreneuron::_nrn_thread_reg0
void _nrn_thread_reg0(int i, void(*f)(ThreadDatum *))
Definition: register_mech.cpp:419
BEFORE_STEP
#define BEFORE_STEP
Definition: membfunc.hpp:71
coreneuron::CoreNeuron::get_pnt_receive_size
auto & get_pnt_receive_size()
Definition: coreneuron.hpp:194
coreneuron::CoreNeuron::get_pnt_receive
auto & get_pnt_receive()
Definition: coreneuron.hpp:186