/* See {nmsim_pop_net_parms.h} */ /* Last edited on 2018-04-11 10:51:19 by jstolfi */ #define _GNU_SOURCE #include #include #include #include #include #include #include #include nmsim_pop_net_parms_t *nmsim_pop_net_parms_new ( nmsim_pop_count_t np, nmsim_bundle_count_t nb ) { nmsim_pop_net_parms_t *pp = notnull(malloc(sizeof(nmsim_pop_net_parms_t)), "no mem"); pp->np = np; pp->nb = nb; pp->ppop = notnull(malloc(np*sizeof(nmsim_neuron_parms_t*)), "no mem"); pp->nn = notnull(malloc(np*sizeof(nmsim_neuron_count_t)), "no mem"); pp->deg_in = notnull(malloc(np*sizeof(nmsim_pop_count_t)), "no mem"); pp->deg_ot = notnull(malloc(np*sizeof(nmsim_pop_count_t)), "no mem"); pp->pbun = notnull(malloc(np*sizeof(nmsim_bundle_parms_t*)), "no mem"); return pp; }