1 #include "../../nrnconf.h"
23 std::map<void*, int>& pnt2index) {
24 int header_printed = 0;
28 int inode = ml->nodeindices[
i];
29 if (cellnodes[inode] >= 0) {
30 if (!header_printed) {
34 if (receives_events) {
35 fprintf(f,
"%d nri %lu\n", cellnodes[inode], pnt2index.size());
37 pnt2index.emplace(pp, pnt2index.size());
39 for (
int j = 0;
j < size; ++
j) {
47 if (pnt2index.empty()) {
54 NetConList** nclist =
new NetConList*[pnt2index.size()];
55 for (
size_t i = 0;
i < pnt2index.size(); ++
i) {
56 nclist[
i] =
new NetConList(1);
65 const auto& it = pnt2index.find(pp);
66 if (it != pnt2index.end()) {
67 nclist[it->second]->append(nc);
71 fprintf(f,
"netcons %d\n", nc_cnt);
72 fprintf(f,
" pntindex srcgid active delay weights\n");
73 for (
size_t i = 0;
i < pnt2index.size(); ++
i) {
74 for (
int j = 0;
j < nclist[
i]->count(); ++
j) {
81 }
else if (srcgid < 0 && nc->src_ && nc->
src_->
ssrc_) {
87 for (
int k = 0;
k < wcnt; ++
k) {
94 for (
size_t i = 0;
i < pnt2index.size(); ++
i) {
130 while (rnode >= nt.
ncell) {
136 int* cellnodes =
new int[nt.
end];
137 for (
int i = 0;
i < nt.
end; ++
i) {
141 cellnodes[rnode] =
cnt++;
144 cellnodes[
i] =
cnt++;
147 fprintf(f,
"%d nodes %d is the threshold node\n",
cnt, cellnodes[inode] - 1);
149 fprintf(f,
"inode parent area a b\n");
150 for (
int i = 0;
i < nt.
end; ++
i)
151 if (cellnodes[
i] >= 0) {
154 "%d %d %.*g %.*g %.*g\n",
165 for (
int i = 0;
i < nt.
end; ++
i)
166 if (cellnodes[
i] >= 0) {
172 std::map<void*, int> pnt2index;
175 pr_memb(tml->index, tml->ml, cellnodes, nt, f, pnt2index);
const char * secname(Section *sec)
sprintf(buf, " if (secondorder) {\n" " int _i;\n" " for (_i = 0; _i < %d; ++_i) {\n" " _p[_slist%d[_i]] += dt*_p[_dlist%d[_i]];\n" " }}\n", numeqn, listnum, listnum)
void hoc_execerror(const char *, const char *)
Symbol * hoc_lookup(const char *)
#define ITERATE(itm, lst)
PreSyn * nrn_gid2outputpresyn(int gid)
ReceiveFunc * pnt_receive
int * nrn_prop_param_size_
static philox4x32_key_t k
declarePtrList(NetConList, NetCon)
implementPtrList(NetConList, NetCon)
static void pr_netcon(NrnThread &nt, FILE *f, const std::map< void *, int > &pnt2index)
static void pr_realcell(PreSyn &ps, NrnThread &nt, FILE *f)
void nrn_prcellstate(int gid, const char *filesuffix)
static void pr_memb(int type, Memb_list *ml, int *cellnodes, NrnThread &nt, FILE *f, std::map< void *, int > &pnt2index)
Represent main neuron object computed by single thread.
struct NrnThreadMembList * next
HocStruct cTemplate * ctemplate