Go to the documentation of this file.
132 printf(
"register_mech %s %d\n", m[1], type);
134 if (memb_func[type].sym) {
135 assert(strcmp(memb_func[type].sym, m[1]) == 0);
137 memb_func[type].sym = (
char*)
emalloc(strlen(m[1]) + 1);
138 strcpy(memb_func[type].sym, m[1]);
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;
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;
198 if (psize != pold || dpsize != dpold) {
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;
238 int i = name[0] ==
'#' ? 1 : 0;
240 memb_func[type].dparam_semantics[ix] = etype +
i * 1000;
247 printf(
"dparam semantics %s ix=%d %s %d\n",
251 memb_func[type].dparam_semantics[ix]);
262 if (ion_write_depend_.size() < memb_func.size()) {
263 ion_write_depend_.resize(memb_func.size());
266 int size = !ion_write_depend_[etype].empty() ? ion_write_depend_[etype][0] + 1 : 2;
268 ion_write_depend_[etype].resize(size, 0);
269 ion_write_depend_[etype][0] = size;
270 ion_write_depend_[etype][size - 1] = type;
273 static int depend_append(
int idep,
int* dependencies,
int deptype,
int type) {
276 if (deptype == type) {
279 for (
int i = 0;
i < idep; ++
i) {
280 if (deptype == dependencies[
i]) {
286 dependencies[idep++] = deptype;
299 for (
int i = 0;
i < dpsize; ++
i) {
300 if (ds[
i] > 0 && ds[
i] < 1000) {
302 int idepnew =
depend_append(idep, dependencies, deptype, type);
307 for (
int j = 1; j < size; ++j) {
308 idepnew =
depend_append(idepnew, dependencies, iwd[j], type);
326 static int next_pointtype = 1;
399 printf(
"before-after processing type %d for %s not implemented\n",
448 if (
sym !=
nullptr) {
auto & get_mech_data_layout()
static void ion_write_depend(int type, int etype)
void(*)(int, int, double *, Datum *, ThreadDatum *, NrnThread *, Memb_list *, int) thread_table_check_t
void add_nrn_artcell(int type, int qi)
int * nrn_fornetcon_type_
int nrn_get_mechtype(const char *name)
Get mechanism type by the mechanism name.
void(*)(Point_process *, int, double) pnt_receive_t
void alloc_mech(int memb_func_size_)
void _nrn_thread_reg1(int i, void(*f)(ThreadDatum *))
void * ecalloc(size_t n, size_t size)
int * nrn_fornetcon_index_
void(*)(NrnThread *, Memb_list *) nrn_watch_check_t
auto & get_net_buf_send_type()
void register_all_variables_offsets(int mech_id, SerializedNames variable_names)
auto & get_is_artificial()
void _nrn_thread_table_reg(int i, thread_table_check_t f)
void hoc_reg_ba(int, mod_f_t, int)
void add_nrn_fornetcons(int, int)
auto & get_memb_func(size_t idx)
auto & get_bbcore_write()
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)
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)
auto & get_ion_write_dependency()
void register_destructor(mod_f_t d)
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
void _nrn_layout_reg(int, int)
void register_constructor(mod_f_t constructor)
void hoc_register_net_receive_buffering(NetBufReceive_t, int)
auto & get_prop_dparam_size()
auto & get_has_net_event()
void(*)(NrnThread *, Memb_list *, int) mod_f_t
#define BEFORE_BREAKPOINT
void _nrn_setdata_reg(int i, void(*call)(double *, Datum *))
int state_discon_allowed_
int nrn_mech_depend(int type, int *dependencies)
void state_discontinuity(int, double *pd, double d)
void(*)(double *, Datum *, int) mod_alloc_t
auto & get_artcell_qindex()
auto & get_pnt_receive_init()
void nrn_writes_conc(int, int)
void(*)(double *, int *, int *, int *, int, int, double *, Datum *, ThreadDatum *, NrnThread *, Memb_list *, double) bbcore_read_t
void hoc_register_net_send_buffering(int)
static int depend_append(int idep, int *dependencies, int deptype, int type)
int point_reg_helper(const Symbol *s2)
auto & get_net_buf_receive()
auto & get_different_mechanism_type()
void hoc_register_watch_check(nrn_watch_check_t, int)
void add_nrn_has_net_event(int)
void hoc_register_dparam_semantics(int type, int, const char *name)
static void * emalloc(size_t size)
auto & get_prop_param_size()
void hoc_reg_bbcore_write(int type, bbcore_write_t f)
void * erealloc(void *ptr, size_t size)
void(*)(double *, int *, int *, int *, int, int, double *, Datum *, ThreadDatum *, NrnThread *, Memb_list *, double) bbcore_write_t
void set_pnt_receive(int type, pnt_receive_t pnt_receive, pnt_receive_t pnt_receive_init, short size)
void hoc_register_prop_size(int, int, int)
void hoc_reg_bbcore_read(int type, bbcore_read_t f)
void(*)(NrnThread *) NetBufReceive_t
void _nrn_thread_reg0(int i, void(*f)(ThreadDatum *))
auto & get_pnt_receive_size()