![]() |
NEURON
|
#include <vector>#include <unordered_map>#include "nrncore_callbacks.h"#include "nrnconf.h"#include "nrnmpi.h"#include "section.h"#include "netcon.h"#include "nrncvode.h"#include "nrniv_mf.h"#include "hocdec.h"#include "nrncore_write/utils/nrncore_utils.h"#include "nrncore_write/data/cell_group.h"#include "nrncore_write/io/nrncore_io.h"#include "parse.hpp"#include "nrnran123.h"#include "netcvode.h"#include "vrecitem.h"Go to the source code of this file.
Macros | |
| #define | NRN_SENTINAL 100000000000 |
Functions | |
| TQueue * | net_cvode_instance_event_queue (NrnThread *) |
| double | nrn_ion_charge (Symbol *) |
| void * | nrn_interthread_enqueue (NrnThread *) |
| void | map_coreneuron_callbacks (void *handle) |
| Populate function pointers by mapping function pointers for callback. More... | |
| void | write_memb_mech_types_direct (std::ostream &s) |
| int | get_global_int_item (const char *name) |
| void * | get_global_dbl_item (void *p, const char *&name, int &size, double *&val) |
| void | nrnthreads_all_weights_return (std::vector< double *> &weights) |
| Copy weights from all coreneuron::NrnThread to NetCon instances. More... | |
| size_t | nrnthreads_type_return (int type, int tid, double *&data, double **&mdata) |
| Return location for CoreNEURON to copy data into. More... | |
| void | nrnthread_group_ids (int *grp) |
| int | nrnthread_dat1 (int tid, int &n_presyn, int &n_netcon, int *&output_gid, int *&netcon_srcgid, std::vector< int > &netcon_negsrcgid_tid) |
| int | nrnthread_dat2_1 (int tid, int &ngid, int &n_real_gid, int &nnode, int &ndiam, int &nmech, int *&tml_index, int *&ml_nodecount, int &nidata, int &nvdata, int &nweight) |
| int | nrnthread_dat2_2 (int tid, int *&v_parent_index, double *&a, double *&b, double *&area, double *&v, double *&diamvec) |
| int | nrnthread_dat2_mech (int tid, size_t i, int dsz_inst, int *&nodeindices, double *&data, int *&pdata, std::vector< int > &pointer2type) |
| int | nrnthread_dat2_3 (int tid, int nweight, int *&output_vindex, double *&output_threshold, int *&netcon_pnttype, int *&netcon_pntindex, double *&weights, double *&delays) |
| int | nrnthread_dat2_corepointer (int tid, int &n) |
| int | nrnthread_dat2_corepointer_mech (int tid, int type, int &icnt, int &dcnt, int *&iArray, double *&dArray) |
| int | core2nrn_corepointer_mech (int tid, int type, int icnt, int dcnt, int *iArray, double *dArray) |
| int * | datum2int (int type, Memb_list *ml, NrnThread &nt, CellGroup &cg, DatumIndices &di, int ml_vdata_offset, std::vector< int > &pointer2type) |
| void | part2_clean () |
| int | nrnthread_dat2_vecplay (int tid, std::vector< int > &indices) |
| int | nrnthread_dat2_vecplay_inst (int tid, int i, int &vptype, int &mtype, int &ix, int &sz, double *&yvec, double *&tvec, int &last_index, int &discon_index, int &ubound_index) |
| void | core2nrn_vecplay (int tid, int i, int last_index, int discon_index, int ubound_index) |
| getting one item at a time from CoreNEURON More... | |
| void | core2nrn_vecplay_events () |
| start the vecplay events More... | |
| void | nrn2core_transfer_WatchCondition (WatchCondition *wc, void(*cb)(int, int, int, int, int)) |
| getting one item at a time from nrn2core_transfer_WATCH More... | |
| static void | setup_type2semantics () |
| static void | set_info (TQItem *tqi, int tid, NrnCoreTransferEvents *core_te, std::unordered_map< NetCon *, std::vector< size_t > > &netcon2intdata, std::unordered_map< PreSyn *, std::vector< size_t > > &presyn2intdata, std::unordered_map< double *, std::vector< size_t > > &weight2intdata) |
| NrnCoreTransferEvents * | nrn2core_transfer_tqueue (int tid) |
| void | core2nrn_clear_queues (double time) |
| Initialize queues before transfer Probably aleady clear, but if binq then must be initialized to time. More... | |
| void | core2nrn_NetCon_event (int tid, double td, size_t nc_index) |
| Called from CoreNEURON core2nrn_tqueue_item. More... | |
| static void | core2nrn_SelfEvent_helper (int tid, double td, int tar_type, int tar_index, double flag, double *weight, int is_movable) |
| void | core2nrn_SelfEvent_event (int tid, double td, int tar_type, int tar_index, double flag, size_t nc_index, int is_movable) |
| void | core2nrn_SelfEvent_event_noweight (int tid, double td, int tar_type, int tar_index, double flag, int is_movable) |
| void | core2nrn_PreSyn_flag (int tid, std::set< int > presyns_flag_true) |
| void | nrn2core_PreSyn_flag (int tid, std::set< int > &presyns_flag_true) |
| void | core2nrn_watch_activate (int tid, int type, int watch_begin, Core2NrnWatchInfo &wi) |
| void * | nrn_patternstim_info_ref (Datum *) |
| void | nrn2core_patternstim (void **info) |
Variables | |
| bbcore_write_t * | nrn_bbcore_write_ |
| bbcore_write_t * | nrn_bbcore_read_ |
| short * | nrn_is_artificial_ |
| bool | corenrn_direct |
| int * | bbcore_dparam_size |
| CellGroup * | cellgroups_ |
| NetCvode * | net_cvode_instance |
| char * | pnt_map |
| static std::map< int, int > | type2movable |
| static int | patternstim_type |
| #define NRN_SENTINAL 100000000000 |
| void core2nrn_clear_queues | ( | double | time | ) |
Initialize queues before transfer Probably aleady clear, but if binq then must be initialized to time.
Definition at line 969 of file nrncore_callbacks.cpp.
| int core2nrn_corepointer_mech | ( | int | tid, |
| int | type, | ||
| int | icnt, | ||
| int | dcnt, | ||
| int * | iArray, | ||
| double * | dArray | ||
| ) |
Definition at line 479 of file nrncore_callbacks.cpp.
Called from CoreNEURON core2nrn_tqueue_item.
Definition at line 976 of file nrncore_callbacks.cpp.
Definition at line 1050 of file nrncore_callbacks.cpp.
| void core2nrn_SelfEvent_event | ( | int | tid, |
| double | td, | ||
| int | tar_type, | ||
| int | tar_index, | ||
| double | flag, | ||
| size_t | nc_index, | ||
| int | is_movable | ||
| ) |
Definition at line 1022 of file nrncore_callbacks.cpp.
| void core2nrn_SelfEvent_event_noweight | ( | int | tid, |
| double | td, | ||
| int | tar_type, | ||
| int | tar_index, | ||
| double | flag, | ||
| int | is_movable | ||
| ) |
Definition at line 1040 of file nrncore_callbacks.cpp.
|
static |
Definition at line 988 of file nrncore_callbacks.cpp.
getting one item at a time from CoreNEURON
Definition at line 669 of file nrncore_callbacks.cpp.
| void core2nrn_vecplay_events | ( | ) |
start the vecplay events
Definition at line 680 of file nrncore_callbacks.cpp.
| void core2nrn_watch_activate | ( | int | tid, |
| int | type, | ||
| int | watch_begin, | ||
| Core2NrnWatchInfo & | wi | ||
| ) |
Definition at line 1110 of file nrncore_callbacks.cpp.
| int* datum2int | ( | int | type, |
| Memb_list * | ml, | ||
| NrnThread & | nt, | ||
| CellGroup & | cg, | ||
| DatumIndices & | di, | ||
| int | ml_vdata_offset, | ||
| std::vector< int > & | pointer2type | ||
| ) |
Definition at line 502 of file nrncore_callbacks.cpp.
Definition at line 103 of file nrncore_callbacks.cpp.
| int get_global_int_item | ( | const char * | name | ) |
Definition at line 90 of file nrncore_callbacks.cpp.
Populate function pointers by mapping function pointers for callback.
Definition at line 49 of file nrncore_callbacks.cpp.
Definition at line 297 of file netcvode.cpp.
Definition at line 1145 of file nrncore_callbacks.cpp.
Definition at line 1087 of file nrncore_callbacks.cpp.
| NrnCoreTransferEvents* nrn2core_transfer_tqueue | ( | int | tid | ) |
Definition at line 881 of file nrncore_callbacks.cpp.
getting one item at a time from nrn2core_transfer_WATCH
Definition at line 692 of file nrncore_callbacks.cpp.
Definition at line 6730 of file netcvode.cpp.
| int nrnthread_dat1 | ( | int | tid, |
| int & | n_presyn, | ||
| int & | n_netcon, | ||
| int *& | output_gid, | ||
| int *& | netcon_srcgid, | ||
| std::vector< int > & | netcon_negsrcgid_tid | ||
| ) |
Definition at line 223 of file nrncore_callbacks.cpp.
| int nrnthread_dat2_1 | ( | int | tid, |
| int & | ngid, | ||
| int & | n_real_gid, | ||
| int & | nnode, | ||
| int & | ndiam, | ||
| int & | nmech, | ||
| int *& | tml_index, | ||
| int *& | ml_nodecount, | ||
| int & | nidata, | ||
| int & | nvdata, | ||
| int & | nweight | ||
| ) |
Definition at line 238 of file nrncore_callbacks.cpp.
| int nrnthread_dat2_2 | ( | int | tid, |
| int *& | v_parent_index, | ||
| double *& | a, | ||
| double *& | b, | ||
| double *& | area, | ||
| double *& | v, | ||
| double *& | diamvec | ||
| ) |
Definition at line 281 of file nrncore_callbacks.cpp.
| int nrnthread_dat2_3 | ( | int | tid, |
| int | nweight, | ||
| int *& | output_vindex, | ||
| double *& | output_threshold, | ||
| int *& | netcon_pnttype, | ||
| int *& | netcon_pntindex, | ||
| double *& | weights, | ||
| double *& | delays | ||
| ) |
Definition at line 388 of file nrncore_callbacks.cpp.
Definition at line 427 of file nrncore_callbacks.cpp.
| int nrnthread_dat2_corepointer_mech | ( | int | tid, |
| int | type, | ||
| int & | icnt, | ||
| int & | dcnt, | ||
| int *& | iArray, | ||
| double *& | dArray | ||
| ) |
Definition at line 442 of file nrncore_callbacks.cpp.
| int nrnthread_dat2_mech | ( | int | tid, |
| size_t | i, | ||
| int | dsz_inst, | ||
| int *& | nodeindices, | ||
| double *& | data, | ||
| int *& | pdata, | ||
| std::vector< int > & | pointer2type | ||
| ) |
Definition at line 326 of file nrncore_callbacks.cpp.
Definition at line 600 of file nrncore_callbacks.cpp.
| int nrnthread_dat2_vecplay_inst | ( | int | tid, |
| int | i, | ||
| int & | vptype, | ||
| int & | mtype, | ||
| int & | ix, | ||
| int & | sz, | ||
| double *& | yvec, | ||
| double *& | tvec, | ||
| int & | last_index, | ||
| int & | discon_index, | ||
| int & | ubound_index | ||
| ) |
Definition at line 626 of file nrncore_callbacks.cpp.
Definition at line 215 of file nrncore_callbacks.cpp.
| void nrnthreads_all_weights_return | ( | std::vector< double *> & | weights | ) |
Copy weights from all coreneuron::NrnThread to NetCon instances.
This depends on the CoreNEURON weight order for each thread to be the same as was originally sent from NEURON. See how that order was constructed in CellGroup::mk_cgs_netcon_info.
Definition at line 142 of file nrncore_callbacks.cpp.
Return location for CoreNEURON to copy data into.
The type is mechanism type or special negative type for voltage, i_membrane_, or time. See coreneuron/io/nrn_setup.cpp:stdindex2ptr. We allow coreneuron to copy to NEURON's AoS data as CoreNEURON knows how its data is arranged (SoA and possibly permuted). This function figures out the size (just for sanity check) and data pointer to be returned based on type and thread id. The ARTIFICIAL_CELL type case is special as there is no thread specific Memb_list for those.
Definition at line 170 of file nrncore_callbacks.cpp.
| void part2_clean | ( | ) |
Definition at line 557 of file nrncore_callbacks.cpp.
|
static |
Definition at line 752 of file nrncore_callbacks.cpp.
|
static |
Definition at line 734 of file nrncore_callbacks.cpp.
| void write_memb_mech_types_direct | ( | std::ostream & | s | ) |
Definition at line 64 of file nrncore_callbacks.cpp.
| int* bbcore_dparam_size |
Definition at line 132 of file nrncore_write.cpp.
| CellGroup* cellgroups_ |
Definition at line 147 of file nrncore_write.cpp.
| bool corenrn_direct |
Definition at line 154 of file nrncore_write.cpp.
| NetCvode* net_cvode_instance |
Definition at line 27 of file cvodestb.cpp.
| bbcore_write_t* nrn_bbcore_read_ |
| bbcore_write_t* nrn_bbcore_write_ |
|
static |
Definition at line 1142 of file nrncore_callbacks.cpp.
Definition at line 733 of file nrncore_callbacks.cpp.