NEURON
coreneuron Namespace Reference

THIS FILE IS AUTO GENERATED DONT MODIFY IT. More...

Namespaces

 coreneuron
 
 detail
 
 Instrumentor
 
 lfputils
 
 nrn_partrans
 
 scopmath
 
 units
 

Classes

struct  corenrn_parameters_data
 
struct  corenrn_parameters
 
struct  version
 Project version information. More...
 
class  CoreNeuron
 A class representing the CoreNEURON state, holding pointers to the various data structures. More...
 
struct  comp
 
struct  LFPCalculator
 LFPCalculator allows calculation of LFP given membrane currents. More...
 
class  CheckPoints
 
struct  NrnThreadChkpnt
 
class  FileHandler
 
struct  SecMapping
 Section to segment mapping. More...
 
struct  CellMapping
 Compartment mapping information for a cell. More...
 
struct  NrnThreadMappingInfo
 Compartment mapping information for NrnThread. More...
 
class  Phase1
 
class  Phase2
 
class  Phase3
 
struct  SummationReport
 
struct  SummationReportMapping
 
struct  SpikesInfo
 
struct  ReportConfiguration
 
class  ReportHandler
 
class  SonataReportHandler
 
struct  UserParams
 This structure is data needed is several part of nrn_setup, phase1 and phase2. More...
 
struct  Elm
 
struct  Item
 
struct  SparseObj
 
struct  cmp_str
 
union  ThreadDatum
 
struct  Point_process
 
struct  NetReceiveBuffer_t
 
struct  NetSendBuffer_t
 
struct  Memb_list
 
struct  Memb_func
 
struct  BAMech
 
struct  DoubScal
 
struct  DoubVec
 
struct  VoidFunc
 
struct  NRNMPI_Spikebuf
 
struct  NRNMPI_Spike
 
struct  mpi_manager_t
 
struct  mpi_function_base
 
struct  mpi_function
 
struct  nrnmpi_init_ret_t
 
struct  DiscreteEvent
 
class  NetCon
 
class  SelfEvent
 
class  ConditionEvent
 
class  PreSyn
 
class  InputPreSyn
 
class  NetParEvent
 
struct  InterThreadEvent
 
class  NetCvodeThreadData
 
class  NetCvode
 
class  SidInfo
 
struct  SPTREE
 
class  TQItem
 
struct  less_time
 
class  BinQ
 
class  TQueue
 
struct  BAType
 
struct  NrnThreadMembList
 
struct  NrnThreadBAList
 
struct  NrnFastImem
 
struct  TrajectoryRequests
 
struct  PreSynHelper
 
struct  NrnThread
 
struct  NewtonSpace
 
class  fixed_vector
 
struct  nrnran123_State
 
class  PlayRecordEvent
 
class  PlayRecord
 
class  VecPlayContinuous
 

Typedefs

using DependencyTable = std::vector< std::vector< int > >
 
using NRB_P = std::pair< int, int >
 
using Core2NrnWatchInfoItem = std::vector< std::pair< int, bool > >
 All activated WATCH statements need activation on NEURON side. More...
 
using Core2NrnWatchInfo = std::vector< Core2NrnWatchInfoItem >
 
using SelfEventWeightMap = std::map< int, std::vector< TQItem * > >
 
using PSD = std::pair< std::size_t, double * >
 
using N2V = std::map< std::string, PSD >
 
using segvec_type = std::vector< int >
 type to store every section and associated segments More...
 
using secseg_map_type = std::map< int, segvec_type >
 
using secseg_it_type = secseg_map_type::iterator
 
using List = Item
 
using Offset = size_t
 
using MechId = int
 
using VariableName = const char *
 
using MechNamesMapping = std::map< MechId, std::map< VariableName, Offset, cmp_str > >
 
using SerializedNames = const char **
 
using Pfrpdat = Datum *(*)(void)
 
using mod_alloc_t = void(*)(double *, Datum *, int)
 
using mod_f_t = void(*)(NrnThread *, Memb_list *, int)
 
using pnt_receive_t = void(*)(Point_process *, int, double)
 
using thread_table_check_t = void(*)(int, int, double *, Datum *, ThreadDatum *, NrnThread *, Memb_list *, int)
 
using NetBufReceive_t = void(*)(NrnThread *)
 
using nrn_watch_check_t = void(*)(NrnThread *, Memb_list *)
 
using bbcore_read_t = void(*)(double *, int *, int *, int *, int, int, double *, Datum *, ThreadDatum *, NrnThread *, Memb_list *, double)
 
using bbcore_write_t = void(*)(double *, int *, int *, int *, int, int, double *, Datum *, ThreadDatum *, NrnThread *, Memb_list *, double)
 
using Pfrv = void(*)()
 
using TQPair = std::pair< double, TQItem * >
 
using Datum = int
 
using Pfri = int(*)()
 
using Symbol = char
 
using IvocVect = fixed_vector< double >
 

Enumerations

enum  LFPCalculatorType { LineSource , PointSource }
 
enum class  TargetType {
  Compartment = 0 , Cell = 1 , SectionSoma = 2 , SectionAxon = 3 ,
  SectionDendrite = 4 , SectionApical = 5 , SectionSomaAll = 6 , SectionAxonAll = 7 ,
  SectionDendriteAll = 8 , SectionApicalAll = 9
}
 
enum  ReportType {
  SomaReport , CompartmentReport , SynapseReport , IMembraneReport ,
  SectionReport , SummationReport , LFPReport
}
 
enum  SectionType {
  Cell , Cell = 1 , Soma , Axon ,
  Dendrite , Apical , All
}
 
enum  container { spltree , pq_que }
 
enum  mech_type { voltage = -1 , i_membrane_ = -2 }
 Mechanism type to be used from legacy_index2pointer and nrn_dblpntr2nrncore (in Neuron) Values of the mechanism types should be negative numbers to avoid any conflict with mechanism types of Memb_list(>0) or time(0) passed from Neuron. More...
 
enum  Layout { SoA = 0 , AoS = 1 }
 

Functions

std::string cnrn_version ()
 
std::ostream & operator<< (std::ostream &os, const corenrn_parameters &corenrn_param)
 
void call_prcellstate_for_prcellgid (int prcellgid, int compute_gpu, int is_init)
 
void get_nrn_trajectory_requests (int bsize)
 
void nrn_init_and_load_data (int argc, char *argv[], CheckPoints &checkPoints, bool is_mapping_needed, bool run_setup_cleanup)
 
void handle_forward_skip (double forwardskip, int prcellgid)
 
static void trajectory_return ()
 
std::unique_ptr< ReportHandlercreate_report_handler (const ReportConfiguration &config, const SpikesInfo &spikes_info)
 
void nrn_init_capacitance (NrnThread *, Memb_list *, int)
 
void nrn_cur_capacitance (NrnThread *_nt, Memb_list *ml, int type)
 
void nrn_alloc_capacitance (double *data, Datum *pdata, int type)
 
void nrn_init_ion (NrnThread *, Memb_list *, int)
 
void nrn_cur_ion (NrnThread *_nt, Memb_list *ml, int type)
 
void nrn_alloc_ion (double *data, Datum *pdata, int type)
 
void second_order_cur (NrnThread *_nt, int secondorder)
 
void nrn_ion_global_map_copyto_device ()
 
void nrn_ion_global_map_delete_from_device ()
 
void nrn_VecPlay_copyto_device (NrnThread *nt, void **d_vecplay)
 
void nrn_VecPlay_delete_from_device (NrnThread *nt)
 
void cnrn_target_copyin_debug (std::string_view file, int line, std::size_t sizeof_T, std::type_info const &typeid_T, void const *h_ptr, std::size_t len, void *d_ptr)
 
void cnrn_target_delete_debug (std::string_view file, int line, std::size_t sizeof_T, std::type_info const &typeid_T, void const *h_ptr, std::size_t len)
 
void cnrn_target_deviceptr_debug (std::string_view file, int line, std::type_info const &typeid_T, void const *h_ptr, void *d_ptr)
 
void cnrn_target_is_present_debug (std::string_view file, int line, std::type_info const &typeid_T, void const *h_ptr, void *d_ptr)
 
void cnrn_target_memcpy_to_device_debug (std::string_view file, int line, std::size_t sizeof_T, std::type_info const &typeid_T, void const *h_ptr, std::size_t len, void *d_ptr)
 
int cnrn_target_get_num_devices ()
 
void cnrn_target_set_default_device (int device_num)
 
void setup_nrnthreads_on_device (NrnThread *threads, int nthreads)
 
void copy_ivoc_vect_to_device (const IvocVect &from, IvocVect &to)
 
void delete_ivoc_vect_from_device (IvocVect &vec)
 
void realloc_net_receive_buffer (NrnThread *nt, Memb_list *ml)
 
static void net_receive_buffer_order (NetReceiveBuffer_t *nrb)
 
void update_net_receive_buffer (NrnThread *nt)
 
void update_net_send_buffer_on_host (NrnThread *nt, NetSendBuffer_t *nsb)
 
void update_nrnthreads_on_host (NrnThread *threads, int nthreads)
 
void update_weights_from_gpu (NrnThread *threads, int nthreads)
 Copy weights from GPU to CPU. More...
 
void delete_nrnthreads_on_device (NrnThread *threads, int nthreads)
 Cleanup device memory that is being tracked by the OpenACC runtime. More...
 
void nrn_newtonspace_copyto_device (NewtonSpace *ns)
 
void nrn_newtonspace_delete_from_device (NewtonSpace *ns)
 
void nrn_sparseobj_copyto_device (SparseObj *so)
 
void nrn_sparseobj_delete_from_device (SparseObj *so)
 
void init_gpu ()
 
static void inverse_permute_copy (size_t n, double *permuted_src, double *dest, int *permute)
 permuted array copied to unpermuted array If permute is NULL then just a copy More...
 
template<bool needs_permute>
static void soaos_copy_cnrn2nrn_impl (size_t n, int stride, double const *const src, std::vector< double * > &dest, const std::vector< int > &array_dims, int *permute)
 
static void soaos_copy_cnrn2nrn (size_t n, int stride, double const *const src, std::vector< double * > &dest, const std::vector< int > &array_dims, int *permute)
 SoAoS unpermuted mechanism data copied to unpermuted SoAoS data. More...
 
static void aos2aos_copy (size_t n, int sz, double *src, std::vector< double * > &dest)
 AoS mechanism data copied to AoS data. More...
 
static void core2nrn_corepointer (int tid, NrnThreadMembList *tml)
 Copy back COREPOINTER info to NEURON. More...
 
std::vector< int > & nrn_mech_random_indices (int type)
 
static void c2n_nmodlrandom (int tid, NrnThreadMembList *tml)
 Copy back NMODL RANDOM sequence to NEURON. More...
 
static void core2nrn_tqueue (NrnThread &)
 Copy event queue and related state back to NEURON. More...
 
static void core2nrn_watch ()
 Callbacks into NEURON for WatchCondition. More...
 
static void core2nrn_vecplay ()
 Transfer VecPlay indices to NEURON. More...
 
void core2nrn_data_return ()
 copy data back to NEURON. More...
 
static void core2nrn_PreSyn_flag (NrnThread &nt)
 
void nrn2core_PreSyn_flag_receive (int tid)
 
static void clear_inv_perm_for_selfevent_targets ()
 
static bool core2nrn_tqueue_item (TQItem *q, SelfEventWeightMap &sewm, NrnThread &nt)
 
void watch_datum_indices (int type, int &first, int &last)
 return first and last datum indices of WATCH statements More...
 
void hoc_register_var (DoubScal *ds, DoubVec *dv, VoidFunc *)
 
void set_globals (const char *path, bool cli_global_seed, int cli_global_seed_value)
 
void write_mech_report ()
 display global mechanism count More...
 
int nrn_soa_padded_size (int cnt, int layout)
 calculate size after padding for specific memory layout More...
 
size_t nrn_soa_byte_align (size_t size)
 return the new offset considering the byte aligment settings More...
 
int nrn_i_layout (int icnt, int cnt, int isz, int sz, int layout)
 This function return the index in a flat array of a matrix coordinate (icnt, isz). More...
 
std::array< int, 3 > legacy2soaos_index (int legacy_index, const std::vector< int > &array_dims)
 Split a legacy index into the three SoAoS indices. More...
 
int soaos2cnrn_index (const std::array< int, 3 > &soaos_indices, const std::vector< int > &array_dims, int padded_node_count, int *permute)
 Compute the CoreNEURON index given an SoAoS index. More...
 
static void mk_mech ()
 
static void mk_mech (std::istream &)
 
void mk_mech (const char *datpath)
 Read meta data about the mechanisms and allocate corresponding mechanism management data structures. More...
 
int nrn_get_mechtype (const char *name)
 Get mechanism type by the mechanism name. More...
 
const char * nrn_get_mechname (int type)
 
static void nrn2core_tqueue ()
 Copy each thread's queue from NEURON. More...
 
static void watch_activate_clear ()
 
static void nrn2core_transfer_watch_condition (int, int, int, int, int)
 
static void vec_play_activate ()
 
static void nrn2core_patstim_share_info ()
 
void direct_mode_initialize ()
 All state from NEURON necessary to continue a run. More...
 
static void setup_type2semantics ()
 
void ** pattern_stim_info_ref (int icnt, int cnt, double *_p, Datum *_ppvar, ThreadDatum *_thread, NrnThread *_nt, Memb_list *ml, double v)
 
int checkpoint_save_patternstim (_threadargsproto_)
 
void checkpoint_restore_patternstim (int, double, _threadargsproto_)
 
static int nrn_original_aos_index (int etype, int ix, NrnThread &nt, int **ml_pinv)
 
int * inverse_permute (int *p, int n)
 
void nrn_inverse_i_layout (int i, int &icnt, int cnt, int &isz, int sz, int layout)
 
void nrn_read_filesdat (int &ngrp, int *&grp, const char *filesdat)
 
void netpar_tid_gid2ps (int tid, int gid, PreSyn **ps, InputPreSyn **psi)
 
void determine_inputpresyn ()
 
void nrn_setup_cleanup ()
 Clean up. More...
 
void nrn_setup (const char *filesdat, bool is_mapping_needed, CheckPoints &checkPoints, bool run_setup_cleanup, const char *datpath, const char *restore_path, double *mindelay)
 
void setup_ThreadData (NrnThread &nt)
 
void read_phasegap (NrnThread &nt, UserParams &userParams)
 
double * legacy_index2pointer (int mtype, int index, NrnThread &nt)
 
void nrn_cleanup_ion_map ()
 Cleanup global ion map created during mechanism registration. More...
 
void delete_fornetcon_info (NrnThread &nt)
 
void nrn_cleanup ()
 
void delete_trajectory_requests (NrnThread &nt)
 
void read_phase1 (NrnThread &nt, UserParams &userParams)
 
void read_phase2 (NrnThread &nt, UserParams &userParams)
 
void read_phase3 (NrnThread &nt, UserParams &userParams)
 read mapping information for neurons More...
 
size_t memb_list_size (NrnThreadMembList *tml, bool include_data)
 
size_t output_presyn_size (void)
 Approximate count of number of bytes for the gid2out map. More...
 
size_t input_presyn_size (void)
 
size_t model_size (bool detailed_report)
 
void nrn_init_and_load_data (int argc, char **argv, CheckPoints &checkPoints, bool is_mapping_needed=false, bool run_setup_cleanup=true)
 
void allocate_data_in_mechanism_nrn_init ()
 
void mk_spikevec_buffer (int sz)
 
void spikevec_lock ()
 
void spikevec_unlock ()
 
static void local_spikevec_sort (std::vector< double > &isvect, std::vector< int > &isvecg, std::vector< double > &osvect, std::vector< int > &osvecg)
 
static void output_spikes_serial (const char *outpath)
 
void output_spikes (const char *outpath, const SpikesInfo &spikes_info)
 
void clear_spike_vectors ()
 
void validation (std::vector< std::pair< double, int >> &res)
 
template<typename T >
void mech_data_layout_transform (T *data, int cnt, const std::vector< int > &array_dims, int layout)
 
template<typename T >
void mech_data_layout_transform (T *data, int cnt, int sz, int layout)
 
static int permute (int i, NrnThread &nt)
 
static int inv_permute (int i, NrnThread &nt)
 
static int ml_permute (int i, Memb_list *ml)
 
static void pr_memb (int type, Memb_list *ml, int *cellnodes, NrnThread &nt, FILE *f)
 
static void pr_netcon (NrnThread &nt, FILE *f)
 
static void pr_realcell (PreSyn &ps, NrnThread &nt, FILE *f)
 
int prcellstate (int gid, const char *suffix)
 
void nrn_flush_reports (double t)
 
void setup_report_engine (double dt_report, double mindelay)
 in the current implementation, we call flush during every spike exchange interval. More...
 
void set_report_buffer_size (int n)
 
void finalize_report ()
 
std::vector< ReportConfigurationcreate_report_configurations (const std::string &filename, const std::string &output_dir, SpikesInfo &spikes_info)
 
void parse_filter_string (const std::string &filter, ReportConfiguration &config)
 
void register_target_type (ReportConfiguration &report, ReportType report_type)
 
template<typename T >
std::vector< T > intersection_gids (const NrnThread &nt, std::vector< T > &target_gids)
 
static int * fornetcon_slot (const int mtype, const int instance, const int fnslot, const NrnThread &nt)
 If FOR_NETCON in use, setup NrnThread fornetcon related info. More...
 
void setup_fornetcon_info (NrnThread &nt)
 If FOR_NETCON in use, setup NrnThread fornetcon related info. More...
 
void nrn_jacob_capacitance (NrnThread *, Memb_list *, int)
 
void nrn_div_capacity (NrnThread *, Memb_list *, int)
 
void nrn_mul_capacity (NrnThread *, Memb_list *, int)
 
void capacitance_reg (void)
 
int nrn_is_ion (int)
 
void ion_reg (const char *, double)
 
void _passive_reg (void)
 
void _stim_reg (void)
 
void _hh_reg (void)
 
void _netstim_reg (void)
 
void _expsyn_reg (void)
 
void _exp2syn_reg (void)
 
void _svclmp_reg (void)
 
void modl_reg ()
 Mechanism registration function. More...
 
void _nrn_destroy_sparseobj_thread (SparseObj *so)
 
template<typename F >
int euler_thread (int neqn, int *var, int *der, F fun, _threadargsproto_)
 
template<typename F >
int derivimplicit_thread (int n, int *slist, int *dlist, F fun, _threadargsproto_)
 
static void set_an_offset (int mech_id, const char *variable_name, int offset)
 
double * get_var_location_from_var_name (int mech_id, const char *variable_name, Memb_list *ml, int node_index)
 
void register_all_variables_offsets (int mech_id, SerializedNames variable_names)
 
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)
 
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)
 
void register_constructor (mod_f_t constructor)
 
void hoc_register_net_receive_buffering (NetBufReceive_t, int)
 
void hoc_register_net_send_buffering (int)
 
void hoc_register_watch_check (nrn_watch_check_t, int)
 
void nrn_writes_conc (int, int)
 
constexpr double ktf (double celsius)
 
constexpr double nrn_nernst (double ci, double co, double z, double celsius)
 
constexpr void nrn_wrote_conc (int type, double *p1, int p2, int it, double **gimap, double celsius, int _cntml_padded)
 
double nrn_ghk (double v, double ci, double co, double z, double celsius)
 
void hoc_register_prop_size (int, int, int)
 
void hoc_register_dparam_semantics (int type, int, const char *name)
 
void hoc_reg_ba (int, mod_f_t, int)
 
void _nrn_layout_reg (int, int)
 
void _nrn_thread_reg0 (int i, void(*f)(ThreadDatum *))
 
void _nrn_thread_reg1 (int i, void(*f)(ThreadDatum *))
 
int nrn_mech_depend (int type, int *dependencies)
 
void add_nrn_fornetcons (int, int)
 
void add_nrn_has_net_event (int)
 
void net_event (Point_process *, double)
 
void net_send (void **, int, Point_process *, double, double)
 
void net_move (void **, Point_process *, double)
 
void artcell_net_send (void **, int, Point_process *, double, double)
 
void artcell_net_move (void **, Point_process *, double)
 
void nrn2ncs_outputevent (int netcon_output_index, double firetime)
 
void net_sem_from_gpu (int sendtype, int i_vdata, int, int ith, int ipnt, double, double)
 
void hoc_malchk (void)
 
void * hoc_Emalloc (size_t)
 
void _pattern_reg (void)
 
void pattern_stim_setup_helper (int size, double *tvec, int *gidvec, int icnt, int cnt, double *_p, Datum *_ppvar, ThreadDatum *_thread, NrnThread *_nt, Memb_list *ml, double v)
 
static size_t read_raster_file (const char *fname, double **tvec, int **gidvec, double tstop)
 
void nrn_set_extra_thread0_vdata ()
 
void nrn_mkPatternStim (const char *fname, double tstop)
 
static NrnThreadMembListalloc_nrn_thread_memb (NrnThread *nt, int type)
 
Point_processnrn_artcell_instantiate (const char *mechname)
 
static void ion_write_depend (int type, int etype)
 
void hoc_reg_bbcore_read (int type, bbcore_read_t f)
 
void hoc_reg_bbcore_write (int type, bbcore_write_t f)
 
void add_nrn_artcell (int type, int qi)
 
void set_pnt_receive (int type, pnt_receive_t pnt_receive, pnt_receive_t pnt_receive_init, short size)
 
void alloc_mech (int memb_func_size_)
 
void initnrn ()
 
static int depend_append (int idep, int *dependencies, int deptype, int type)
 
void register_destructor (mod_f_t d)
 
int point_reg_helper (const Symbol *s2)
 
void _modl_cleanup ()
 
void state_discontinuity (int, double *pd, double d)
 
void _nrn_thread_table_reg (int i, thread_table_check_t f)
 
void _nrn_setdata_reg (int i, void(*call)(double *, Datum *))
 
void _nrn_thread_table_reg (int i, void(*f)(int, int, double *, Datum *, ThreadDatum *, NrnThread *, Memb_list *, int))
 
static void * emalloc (size_t size)
 
void nrnmpi_spike_initialize ()
 
void wait_before_spike_exchange ()
 
int nrnmpi_spike_exchange_impl (int *nin, NRNMPI_Spike *spikeout, int icapacity, NRNMPI_Spike **spikein, int &ovfl, int nout, NRNMPI_Spikebuf *spbufout, NRNMPI_Spikebuf *spbufin)
 
int nrnmpi_spike_exchange_compressed_impl (int localgid_size, unsigned char *&spfixin_ovfl, int send_nspike, int *nin, int ovfl_capacity, unsigned char *spikeout_fixed, int ag_send_size, unsigned char *spikein_fixed, int &ovfl)
 
int nrnmpi_int_allmax_impl (int x)
 
void nrnmpi_int_alltoall_impl (int *s, int *r, int n)
 
void nrnmpi_int_alltoallv_impl (const int *s, const int *scnt, const int *sdispl, int *r, int *rcnt, int *rdispl)
 
void nrnmpi_dbl_alltoallv_impl (double *s, int *scnt, int *sdispl, double *r, int *rcnt, int *rdispl)
 
void nrnmpi_int_allgather_impl (int *s, int *r, int n)
 
double nrnmpi_dbl_allmin_impl (double x)
 
double nrnmpi_dbl_allmax_impl (double x)
 
void nrnmpi_barrier_impl ()
 
static MPI_Op type2OP (int type)
 
double nrnmpi_dbl_allreduce_impl (double x, int type)
 
void nrnmpi_dbl_allreduce_vec_impl (double *src, double *dest, int cnt, int type)
 
void nrnmpi_long_allreduce_vec_impl (long *src, long *dest, int cnt, int type)
 
static void nrn_fatal_error (const char *msg)
 
void corenrn_subworld ()
 
nrnmpi_init_ret_t nrnmpi_init_impl (int *pargc, char ***pargv, bool is_quiet)
 
void nrnmpi_finalize_impl (void)
 
void nrnmpi_check_threading_support_impl ()
 
bool nrnmpi_initialized_impl ()
 
void nrnmpi_abort_impl (int errcode)
 
double nrnmpi_wtime_impl ()
 
int nrnmpi_local_rank_impl ()
 Return local mpi rank within a shared memory node. More...
 
int nrnmpi_local_size_impl ()
 Return number of ranks running on single shared memory node. More...
 
void nrnmpi_write_file_impl (const std::string &filename, const char *buffer, size_t length)
 Write given buffer to a new file using MPI collective I/O. More...
 
mpi_manager_tmpi_manager ()
 
 declare_mpi_method (nrnmpi_init)
 
 declare_mpi_method (nrnmpi_finalize)
 
 declare_mpi_method (nrnmpi_check_threading_support)
 
 declare_mpi_method (nrnmpi_write_file)
 
 declare_mpi_method (nrnmpi_spike_exchange)
 
 declare_mpi_method (nrnmpi_spike_exchange_compressed)
 
 declare_mpi_method (nrnmpi_int_allmax)
 
 declare_mpi_method (nrnmpi_int_allgather)
 
 declare_mpi_method (nrnmpi_int_alltoall)
 
 declare_mpi_method (nrnmpi_int_alltoallv)
 
 declare_mpi_method (nrnmpi_dbl_alltoallv)
 
 declare_mpi_method (nrnmpi_dbl_allmin)
 
 declare_mpi_method (nrnmpi_dbl_allmax)
 
 declare_mpi_method (nrnmpi_barrier)
 
 declare_mpi_method (nrnmpi_dbl_allreduce)
 
 declare_mpi_method (nrnmpi_dbl_allreduce_vec)
 
 declare_mpi_method (nrnmpi_long_allreduce_vec)
 
 declare_mpi_method (nrnmpi_initialized)
 
 declare_mpi_method (nrnmpi_abort)
 
 declare_mpi_method (nrnmpi_wtime)
 
 declare_mpi_method (nrnmpi_local_rank)
 
 declare_mpi_method (nrnmpi_local_size)
 
void deliver_net_events (NrnThread *nt)
 
void nrn_deliver_events (NrnThread *nt)
 
void clear_event_queue ()
 
void init_net_events ()
 
void nrn_play_init ()
 
void fixed_play_continuous (NrnThread *nt)
 
static int default_rendezvous (HAVEWANT_t key)
 
static int * cnt2displ (int *cnt)
 
static int * srccnt2destcnt (int *srccnt)
 
static void rendezvous_rank_get (HAVEWANT_t *data, int size, HAVEWANT_t *&sdata, int *&scnt, int *&sdispl, HAVEWANT_t *&rdata, int *&rcnt, int *&rdispl, int(*rendezvous_rank)(HAVEWANT_t))
 
static void have_to_want (HAVEWANT_t *have, int have_size, HAVEWANT_t *want, int want_size, HAVEWANT_t *&send_to_want, int *&send_to_want_cnt, int *&send_to_want_displ, HAVEWANT_t *&recv_from_have, int *&recv_from_have_cnt, int *&recv_from_have_displ, int(*rendezvous_rank)(HAVEWANT_t))
 
void nrn_multisend_send (PreSyn *, double t, NrnThread *)
 
void nrn_multisend_receive (NrnThread *)
 
void nrn_multisend_advance ()
 
void nrn_multisend_init ()
 
void nrn_multisend_cleanup ()
 
void nrn_multisend_setup ()
 
void nrn_multisend_setup_targets (bool use_phase2, int *&targets_phase1, int *&targets_phase2)
 
void mk_netcvode ()
 
void interthread_enqueue (NrnThread *nt)
 
void nrn_p_construct ()
 
void ncs2nrn_integrate (double tstop)
 
static bool pscheck (double var, double thresh, int *flag)
 
void nrn_spike_exchange_init ()
 
static void alloc_mpi_space ()
 Allocate space for spikes: 200 structs of {int gid; double time} coming from nrnmpi.h and array of int of the global domain size. More...
 
static bool nrn_need_npe ()
 
void nrn_fake_fire (int gid, double spiketime, int fake_out)
 
int nrn_set_timeout (int timeout)
 
void BBS_netpar_solve (double tstop)
 
double set_mindelay (double maxdelay)
 
int nrnmpi_spike_compress (int nspike, bool gid_compress, int xchng_meth)
 
void nrn_spike_exchange (NrnThread *nt)
 
void nrnmpi_v_transfer ()
 
void nrnthread_v_transfer (NrnThread *_nt)
 
void spinit (SPTREE *q)
 
SPBLKspenq (SPBLK *n, SPTREE *q)
 
SPBLKspdeq (SPBLK **np)
 
void splay (SPBLK *n, SPTREE *q)
 
SPBLKsphead (SPTREE *q)
 
void spdelete (SPBLK *n, SPTREE *q)
 
void * nrn_cacheline_alloc (void **memptr, size_t size)
 
void * emalloc_align (size_t size, size_t alignment)
 
void * ecalloc_align (size_t n, size_t size, size_t alignment)
 
void check_bbcore_write_version (const char *)
 
void nrn_outputevent (unsigned char, double)
 
int get_data_index (int node_index, int variable_index, int mtype, Memb_list *ml)
 
static void * nrn_fixed_step_thread (NrnThread *)
 
static void nrn_fixed_step_group_thread (NrnThread *, int, int, int &)
 
void dt2thread (double adt)
 
void nrn_fixed_step_minimal ()
 
void nrn_fixed_single_steps_minimal (int total_sim_steps, double tstop)
 --> Coreneuron More...
 
void nrn_fixed_step_group_minimal (int total_sim_steps)
 
void update (NrnThread *_nt)
 
void nonvint (NrnThread *_nt)
 
void nrn_ba (NrnThread *nt, int bat)
 
void nrncore2nrn_send_init ()
 
void nrncore2nrn_send_values (NrnThread *nth)
 
void * nrn_fixed_step_lastpart (NrnThread *nth)
 
void fast_imem_free ()
 
void nrn_fast_imem_alloc ()
 
void nrn_calc_fast_imem (NrnThread *nt)
 
void nrn_calc_fast_imem_init (NrnThread *nt)
 
void nrn_finitialize (int setv, double v)
 
NrnThreadMembListcreate_tml (NrnThread &nt, int mech_id, Memb_func &memb_func, int &shadow_rhs_cnt, const std::vector< int > &mech_types, const std::vector< int > &nodecounts)
 
void nrn_threads_create (int n)
 
void nrn_threads_free ()
 
void nrn_mk_table_check ()
 
void nrn_thread_table_check ()
 
template<typename F , typename... Args>
void nrn_multithread_job (F &&job, Args &&... args)
 
void nrn_solve_minimal (NrnThread *)
 
void * setup_tree_matrix_minimal (NrnThread *)
 
constexpr int at_time (NrnThread *nt, double te)
 
int abort_run (int code)
 
int nrn_crout_thread (NewtonSpace *ns, int n, double **a, int *perm, _threadargsproto_)
 Performs an LU triangular factorization of a real matrix by the Crout algorithm using partial pivoting. More...
 
void nrn_scopmath_solve_thread (int n, double **a, double *b, int *perm, double *p, int *y, _threadargsproto_)
 Performs forward substitution algorithm to transform the constant vector in the linear simultaneous equations to be consistent with the factored matrix. More...
 
NewtonSpacenrn_cons_newtonspace (int n, int n_instance)
 
void nrn_destroy_newtonspace (NewtonSpace *ns)
 
template<typename F >
int nrn_newton_thread (NewtonSpace *ns, int n, int *s, F func, double *value, _threadargsproto_)
 Iteratively solves simultaneous nonlinear equations by Newton's method, using a Jacobian matrix computed by finite differences. More...
 
template<typename SPFUN >
void * nrn_cons_sparseobj (SPFUN fun, int n, Memb_list *ml, _threadargsproto_)
 sparse matrix dynamic allocation: create_coef_list makes a list for fast setup, does minimum ordering and ensures all elements needed are present. More...
 
template<typename F >
int sparse_thread (SparseObj *so, int n, int *s, int *d, double *t, double dt, F fun, int linflag, _threadargsproto_)
 This is an experimental numerical method for SCoP-3 which integrates kinetic rate equations. More...
 
template<typename SPFUN >
int _cvode_sparse_thread (void **vpr, int n, int *x, SPFUN fun, _threadargsproto_)
 
static int check_state (int n, int *s, _threadargsproto_)
 
template<typename SPFUN >
int _ss_sparse_thread (SparseObj *so, int n, int *s, int *d, double *t, double dt, SPFUN fun, int linflag, _threadargsproto_)
 
template<typename DIFUN >
int _ss_derivimplicit_thread (int n, int *slist, int *dlist, DIFUN fun, _threadargsproto_)
 
static void triang (NrnThread *)
 
static void bksub (NrnThread *)
 
static void nrn_rhs (NrnThread *_nt)
 
static void nrn_lhs (NrnThread *_nt)
 
IvocVectvector_new (int n)
 
int vector_capacity (IvocVect *v)
 
double * vector_vec (IvocVect *v)
 
IvocVectvector_new1 (int n)
 
 nrn_pragma_acc (routine seq) int vector_capacity(void *v)
 
bool gpu_enabled ()
 
void * allocate_unified (std::size_t num_bytes)
 
void deallocate_unified (void *ptr, std::size_t num_bytes)
 
double nrn_mallinfo (void)
 Returns current memory usage in KBs. More...
 
void report_mem_usage (const char *message, bool all_ranks=false)
 Reports current memory usage of the simulator to stdout. More...
 
void report_cell_stats ()
 Reports global cell statistics of the simulation. More...
 
char * pnt_name (Point_process *pnt)
 
void nrn_exit (int err)
 
void hoc_execerror (const char *s1, const char *s2)
 
void hoc_warning (const char *s1, const char *s2)
 
double * makevector (size_t size)
 
void freevector (double *p)
 
double ** makematrix (size_t nrows, size_t ncols)
 
void freematrix (double **matrix)
 
void * ecalloc (size_t n, size_t size)
 
void * erealloc (void *ptr, size_t size)
 
double hoc_Exp (double x)
 
template<typename T >
T * cnrn_target_deviceptr_or_present (std::string_view file, int line, bool must_be_present_or_null, const T *h_ptr)
 
template<typename T >
T * cnrn_target_copyin (std::string_view file, int line, const T *h_ptr, std::size_t len=1)
 
template<typename T >
void cnrn_target_delete (std::string_view file, int line, T *h_ptr, std::size_t len=1)
 
template<typename T >
void cnrn_target_memcpy_to_device (std::string_view file, int line, T *d_ptr, const T *h_ptr, std::size_t len=1)
 
template<typename T >
void cnrn_target_update_on_device (std::string_view file, int line, const T *h_ptr, std::size_t len=1)
 
std::size_t nrnran123_instance_count ()
 
uint32_t nrnran123_get_globalindex ()
 
void nrnran123_set_globalindex (uint32_t gix)
 
void nrnran123_initialise_global_state_on_device ()
 
void nrnran123_destroy_global_state_on_device ()
 
nrnran123_Statenrnran123_newstream3 (uint32_t id1, uint32_t id2, uint32_t id3, bool use_unified_memory)
 Allocate a new Random123 stream. More...
 
void nrnran123_deletestream (nrnran123_State *s, bool use_unified_memory)
 
void nrn_abort (int errcode)
 
double nrn_wtime ()
 
template<typename... Args>
void nrn_fatal_error (const char *msg, Args &&... args)
 

Variables

corenrn_parameters corenrn_param
 Printing method. More...
 
int nrn_nobanner_ {0}
 Declaring global corenrn_parameters object for this instance of CoreNeuron. More...
 
CoreNeuron corenrn
 
InterleaveInfo * interleave_info
 
void(* core2nrn_clear_queues_ )(double t)
 Callback to clear NEURON thread queues. More...
 
void(* core2nrn_watch_clear_ )()
 
void(* core2nrn_watch_activate_ )(int tid, int type, int watch_begin, Core2NrnWatchInfo &)
 
void(* core2nrn_vecplay_ )(int tid, int i_nrn, int last, int discon, int ubound)
 VecPlay indices back to NEURON. More...
 
void(* core2nrn_vecplay_events_ )()
 
void(* core2nrn_NetCon_event_ )(int tid, double td, size_t nc_index)
 Callbacks into NEURON for queue event types. More...
 
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_transfer_PreSyn_flag_ )(int tid, std::set< int > &presyns_flag_true)
 
std::map< int, int * > type2invperm
 
static N2Vn2v
 
std::map< std::string, int > mech2type
 
void(* nrn2core_mkmech_info_ )(std::ostream &)
 
void(* nrn2core_transfer_watch_ )(void(*cb)(int, int, int, int, int))
 Pointer to function in NEURON that iterates over activated WATCH statements, sending each item to ... More...
 
NrnCoreTransferEvents *(* nrn2core_transfer_tqueue_ )(int tid)
 Pointer to function in NEURON that iterates over its tqeueue. More...
 
static std::unordered_map< int, int > type2movable
 
void(* nrn2core_patternstim_ )(void **info)
 
NrnThreadChkpntnrnthread_chkpnt
 
int patstimtype
 
const int max_line_length = 1024
 Encapsulate low-level reading of coreneuron input data files. More...
 
static OMP_Mutex mut
 
std::vector< std::map< int, PreSyn * > > neg_gid2out
 Vector of maps for negative presyns. More...
 
std::map< int, PreSyn * > gid2out
 Maps for ouput and input presyns. More...
 
std::map< int, InputPreSyn * > gid2in
 
std::vector< NetCon * > netcon_in_presyn_order_
 InputPreSyn.nc_index_ to + InputPreSyn.nc_cnt_ give the NetCon*. More...
 
std::vector< int * > nrnthreads_netcon_srcgid
 Only for setup vector of netcon source gids. More...
 
std::vector< std::vector< int > > nrnthreads_netcon_negsrcgid_tid
 If a nrnthreads_netcon_srcgid is negative, need to determine the thread when in order to use the correct neg_gid2out[tid] map. More...
 
std::vector< double > spikevec_time
 --> Coreneuron as SpikeBuffer class More...
 
std::vector< int > spikevec_gid
 
static OMP_Mutex mut
 
static std::map< Point_process *, int > pnt2index
 
static int pntindex
 
static std::map< NetCon *, DiscreteEvent * > map_nc2src
 
static std::vector< int > * inv_permute_
 
static int size_report_buffer = 4
 
static const char * mechanism [] = {"0", "capacitance", "cm", 0, "i_cap", 0, 0}
 
static void(* mechanism [])(void)
 
bool nrn_have_gaps
 variables defined in coreneuron library More...
 
bool nrn_use_fast_imem
 
static MechNamesMapping mechNamesMapping
 
int nrn_ion_global_map_size
 
double ** nrn_ion_global_map
 
const int ion_global_map_member_size
 
int nrn_fornetcon_cnt_
 
int * nrn_fornetcon_type_
 
int * nrn_fornetcon_index_
 
bool nrn_use_localgid_
 
int nrn_extra_thread0_vdata
 
int secondorder = 0
 
double t
 
double dt
 
double celsius
 
double pi
 
int rev_dt
 
int state_discon_allowed_
 
int state_discon_flag_ = 0
 
int nrnmpi_numprocs = 1
 
int nrnmpi_myid = 0
 
MPI_Comm nrnmpi_comm
 
static int np
 
static int * displs {nullptr}
 
static int * byteovfl {nullptr}
 
static MPI_Datatype spike_type
 
MPI_Comm nrnmpi_world_comm
 
int nrnmpi_numprocs_
 
int nrnmpi_myid_
 
static bool nrnmpi_under_nrncontrol_ {false}
 
void(* nrn2core_subworld_info_ )(int &, int &, int &, int &, int &)
 
bool use_multisend_
 
bool use_phase2_
 
int n_multisend_interval = 2
 
NetCvodenet_cvode_instance
 
bool cvode_active_
 
bool nrn_use_bin_queue_ = 0
 Flag to use the bin queue. More...
 
static bool active_ = false
 
static double usable_mindelay_
 
static double mindelay_
 
static double last_maxstep_arg_
 
static std::vector< NetParEventnpe_
 
static int timeout_ = 0
 
bool stoprun
 
const char * bbcore_write_version = "1.8"
 
int interleave_permute_type
 
int cellorder_nwarp
 
int nrn_nthread = 0
 
NrnThreadnrn_threads = nullptr
 
bool _nrn_skip_initmodel
 
void(* nrn_mk_transfer_thread_data_ )()
 
static int table_check_cnt_
 --> CoreNeuron class More...
 
static ThreadDatumtable_check_
 
bool use_solve_interleave
 
const int NUM_STATS = 13
 
int v_structure_change
 
int diam_changed
 
int hoc_errno_count
 
int structure_change_cnt
 

Detailed Description

THIS FILE IS AUTO GENERATED DONT MODIFY IT.

Typedef Documentation

◆ bbcore_read_t

using coreneuron::bbcore_read_t = typedef void (*)(double*, int*, int*, int*, int, int, double*, Datum*, ThreadDatum*, NrnThread*, Memb_list*, double)

Definition at line 194 of file membfunc.hpp.

◆ bbcore_write_t

using coreneuron::bbcore_write_t = typedef void (*)(double*, int*, int*, int*, int, int, double*, Datum*, ThreadDatum*, NrnThread*, Memb_list*, double)

Definition at line 207 of file membfunc.hpp.

◆ Core2NrnWatchInfo

Definition at line 284 of file core2nrn_data_return.cpp.

◆ Core2NrnWatchInfoItem

using coreneuron::Core2NrnWatchInfoItem = typedef std::vector<std::pair<int, bool> >

All activated WATCH statements need activation on NEURON side.

Definition at line 283 of file core2nrn_data_return.cpp.

◆ Datum

using coreneuron::Datum = typedef int

Definition at line 23 of file nrnconf.h.

◆ DependencyTable

using coreneuron::DependencyTable = typedef std::vector<std::vector<int> >

Definition at line 47 of file coreneuron.hpp.

◆ IvocVect

using coreneuron::IvocVect = typedef fixed_vector<double>

Definition at line 72 of file ivocvect.hpp.

◆ List

using coreneuron::List = typedef Item

Definition at line 45 of file mod2c_core_thread.hpp.

◆ MechId

using coreneuron::MechId = typedef int

Definition at line 20 of file mech_mapping.cpp.

◆ MechNamesMapping

◆ mod_alloc_t

using coreneuron::mod_alloc_t = typedef void (*)(double*, Datum*, int)

Definition at line 23 of file membfunc.hpp.

◆ mod_f_t

using coreneuron::mod_f_t = typedef void (*)(NrnThread*, Memb_list*, int)

Definition at line 24 of file membfunc.hpp.

◆ N2V

using coreneuron::N2V = typedef std::map<std::string, PSD>

Definition at line 27 of file global_vars.cpp.

◆ NetBufReceive_t

using coreneuron::NetBufReceive_t = typedef void (*)(NrnThread*)

Definition at line 114 of file membfunc.hpp.

◆ NRB_P

using coreneuron::NRB_P = typedef std::pair<int, int>

Definition at line 877 of file nrn_acc_manager.cpp.

◆ nrn_watch_check_t

using coreneuron::nrn_watch_check_t = typedef void (*)(NrnThread*, Memb_list*)

Definition at line 119 of file membfunc.hpp.

◆ Offset

using coreneuron::Offset = typedef size_t

Definition at line 19 of file mech_mapping.cpp.

◆ Pfri

using coreneuron::Pfri = typedef int (*)()

Definition at line 24 of file nrnconf.h.

◆ Pfrpdat

using coreneuron::Pfrpdat = typedef Datum* (*) (void)

Definition at line 19 of file membfunc.hpp.

◆ Pfrv

using coreneuron::Pfrv = typedef void (*)()

Definition at line 26 of file register_mech.cpp.

◆ pnt_receive_t

using coreneuron::pnt_receive_t = typedef void (*)(Point_process*, int, double)

Definition at line 25 of file membfunc.hpp.

◆ PSD

using coreneuron::PSD = typedef std::pair<std::size_t, double*>

Definition at line 26 of file global_vars.cpp.

◆ secseg_it_type

using coreneuron::secseg_it_type = typedef secseg_map_type::iterator

Definition at line 24 of file nrnsection_mapping.hpp.

◆ secseg_map_type

Definition at line 23 of file nrnsection_mapping.hpp.

◆ segvec_type

using coreneuron::segvec_type = typedef std::vector<int>

type to store every section and associated segments

Definition at line 22 of file nrnsection_mapping.hpp.

◆ SelfEventWeightMap

using coreneuron::SelfEventWeightMap = typedef std::map<int, std::vector<TQItem*> >

Definition at line 525 of file core2nrn_data_return.cpp.

◆ SerializedNames

using coreneuron::SerializedNames = typedef const char**

Definition at line 31 of file mech_mapping.hpp.

◆ Symbol

using coreneuron::Symbol = typedef char

Definition at line 25 of file nrnconf.h.

◆ thread_table_check_t

using coreneuron::thread_table_check_t = typedef void (*)(int, int, double*, Datum*, ThreadDatum*, NrnThread*, Memb_list*, int)

Definition at line 26 of file membfunc.hpp.

◆ TQPair

using coreneuron::TQPair = typedef std::pair<double, TQItem*>

Definition at line 79 of file tqueue.hpp.

◆ VariableName

using coreneuron::VariableName = typedef const char*

Definition at line 21 of file mech_mapping.cpp.

Enumeration Type Documentation

◆ container

Enumerator
spltree 
pq_que 

Definition at line 120 of file tqueue.hpp.

◆ Layout

Enumerator
SoA 
AoS 

Definition at line 70 of file nrniv_decl.h.

◆ LFPCalculatorType

Enumerator
LineSource 
PointSource 

Definition at line 66 of file lfp.hpp.

◆ mech_type

Mechanism type to be used from legacy_index2pointer and nrn_dblpntr2nrncore (in Neuron) Values of the mechanism types should be negative numbers to avoid any conflict with mechanism types of Memb_list(>0) or time(0) passed from Neuron.

Enumerator
voltage 
i_membrane_ 

Definition at line 19 of file nrniv_decl.h.

◆ ReportType

Enumerator
SomaReport 
CompartmentReport 
SynapseReport 
IMembraneReport 
SectionReport 
SummationReport 
LFPReport 

Definition at line 73 of file nrnreport.hpp.

◆ SectionType

Enumerator
Cell 
Cell 
Soma 
Axon 
Dendrite 
Apical 
All 

Definition at line 84 of file nrnreport.hpp.

◆ TargetType

Enumerator
Compartment 
Cell 
SectionSoma 
SectionAxon 
SectionDendrite 
SectionApical 
SectionSomaAll 
SectionAxonAll 
SectionDendriteAll 
SectionApicalAll 

Definition at line 59 of file nrnreport.hpp.

Function Documentation

◆ _cvode_sparse_thread()

template<typename SPFUN >
int coreneuron::_cvode_sparse_thread ( void **  vpr,
int  n,
int *  x,
SPFUN  fun,
_threadargsproto_   
)

Definition at line 608 of file sparse_thread.hpp.

◆ _exp2syn_reg()

void coreneuron::_exp2syn_reg ( void  )

◆ _expsyn_reg()

void coreneuron::_expsyn_reg ( void  )

◆ _hh_reg()

void coreneuron::_hh_reg ( void  )

◆ _modl_cleanup()

void coreneuron::_modl_cleanup ( )

Definition at line 371 of file register_mech.cpp.

◆ _netstim_reg()

void coreneuron::_netstim_reg ( void  )

◆ _nrn_destroy_sparseobj_thread()

void coreneuron::_nrn_destroy_sparseobj_thread ( SparseObj so)
inline

Definition at line 628 of file sparse_thread.hpp.

◆ _nrn_layout_reg()

void coreneuron::_nrn_layout_reg ( int  type,
int  layout 
)

Definition at line 178 of file register_mech.cpp.

◆ _nrn_setdata_reg()

void coreneuron::_nrn_setdata_reg ( int  i,
void(*)(double *, Datum *)  call 
)

Definition at line 444 of file register_mech.cpp.

◆ _nrn_thread_reg0()

void coreneuron::_nrn_thread_reg0 ( int  i,
void(*)(ThreadDatum *)  f 
)

Definition at line 423 of file register_mech.cpp.

◆ _nrn_thread_reg1()

void coreneuron::_nrn_thread_reg1 ( int  i,
void(*)(ThreadDatum *)  f 
)

Definition at line 430 of file register_mech.cpp.

◆ _nrn_thread_table_reg() [1/2]

void coreneuron::_nrn_thread_table_reg ( int  i,
thread_table_check_t  f 
)

Definition at line 437 of file register_mech.cpp.

◆ _nrn_thread_table_reg() [2/2]

void coreneuron::_nrn_thread_table_reg ( int  i,
void(*)(int, int, double *, Datum *, ThreadDatum *, NrnThread *, Memb_list *, int)  f 
)

◆ _passive_reg()

void coreneuron::_passive_reg ( void  )

◆ _pattern_reg()

void coreneuron::_pattern_reg ( void  )

◆ _ss_derivimplicit_thread()

template<typename DIFUN >
int coreneuron::_ss_derivimplicit_thread ( int  n,
int *  slist,
int *  dlist,
DIFUN  fun,
_threadargsproto_   
)

Definition at line 67 of file ssimplic_thread.hpp.

◆ _ss_sparse_thread()

template<typename SPFUN >
int coreneuron::_ss_sparse_thread ( SparseObj so,
int  n,
int *  s,
int *  d,
double *  t,
double  dt,
SPFUN  fun,
int  linflag,
_threadargsproto_   
)

Definition at line 30 of file ssimplic_thread.hpp.

◆ _stim_reg()

void coreneuron::_stim_reg ( void  )

◆ _svclmp_reg()

void coreneuron::_svclmp_reg ( void  )

◆ abort_run()

int coreneuron::abort_run ( int  code)

Definition at line 33 of file abort.cpp.

◆ add_nrn_artcell()

void coreneuron::add_nrn_artcell ( int  type,
int  qi 
)

Definition at line 66 of file register_mech.cpp.

◆ add_nrn_fornetcons()

void coreneuron::add_nrn_fornetcons ( int  type,
int  indx 
)

Definition at line 55 of file register_mech.cpp.

◆ add_nrn_has_net_event()

void coreneuron::add_nrn_has_net_event ( int  type)

Definition at line 43 of file register_mech.cpp.

◆ alloc_mech()

void coreneuron::alloc_mech ( int  memb_func_size_)

Definition at line 87 of file register_mech.cpp.

◆ alloc_mpi_space()

static void coreneuron::alloc_mpi_space ( )
static

Allocate space for spikes: 200 structs of {int gid; double time} coming from nrnmpi.h and array of int of the global domain size.

Definition at line 96 of file netpar.cpp.

◆ alloc_nrn_thread_memb()

static NrnThreadMembList* coreneuron::alloc_nrn_thread_memb ( NrnThread nt,
int  type 
)
static

Definition at line 140 of file patternstim.cpp.

◆ allocate_data_in_mechanism_nrn_init()

void coreneuron::allocate_data_in_mechanism_nrn_init ( )

Definition at line 21 of file finitialize.cpp.

◆ allocate_unified()

void* coreneuron::allocate_unified ( std::size_t  num_bytes)

Definition at line 26 of file memory.cpp.

◆ aos2aos_copy()

static void coreneuron::aos2aos_copy ( size_t  n,
int  sz,
double *  src,
std::vector< double * > &  dest 
)
static

AoS mechanism data copied to AoS data.

dest is an array of n pointers to the beginning of each sz length array. src is a contiguous array of n segments of size sz.

Definition at line 133 of file core2nrn_data_return.cpp.

◆ artcell_net_move()

void coreneuron::artcell_net_move ( void **  v,
Point_process pnt,
double  tt 
)

Definition at line 310 of file netcvode.cpp.

◆ artcell_net_send()

void coreneuron::artcell_net_send ( void **  v,
int  weight_index_,
Point_process pnt,
double  td,
double  flag 
)

Definition at line 103 of file netcvode.cpp.

◆ at_time()

constexpr int coreneuron::at_time ( NrnThread nt,
double  te 
)
constexpr

Definition at line 198 of file multicore.hpp.

◆ BBS_netpar_solve()

void coreneuron::BBS_netpar_solve ( double  tstop)

Definition at line 604 of file netpar.cpp.

◆ bksub()

static void coreneuron::bksub ( NrnThread _nt)

Definition at line 54 of file solve_core.cpp.

◆ c2n_nmodlrandom()

static void coreneuron::c2n_nmodlrandom ( int  tid,
NrnThreadMembList tml 
)
static

Copy back NMODL RANDOM sequence to NEURON.

Definition at line 231 of file core2nrn_data_return.cpp.

◆ call_prcellstate_for_prcellgid()

void coreneuron::coreneuron::call_prcellstate_for_prcellgid ( int  prcellgid,
int  compute_gpu,
int  is_init 
)

Definition at line 343 of file main1.cpp.

◆ capacitance_reg()

void coreneuron::capacitance_reg ( void  )

Definition at line 28 of file capac.cpp.

◆ check_bbcore_write_version()

void coreneuron::check_bbcore_write_version ( const char *  version)

Definition at line 128 of file nrnoc_aux.cpp.

◆ check_state()

static int coreneuron::check_state ( int  n,
int *  s,
_threadargsproto_   
)
static

Definition at line 17 of file ssimplic_thread.hpp.

◆ checkpoint_restore_patternstim()

void coreneuron::checkpoint_restore_patternstim ( int  ,
double  ,
_threadargsproto_   
)

◆ checkpoint_save_patternstim()

int coreneuron::checkpoint_save_patternstim ( _threadargsproto_  )

◆ clear_event_queue()

void coreneuron::clear_event_queue ( )

Definition at line 47 of file cvodestb.cpp.

◆ clear_inv_perm_for_selfevent_targets()

static void coreneuron::clear_inv_perm_for_selfevent_targets ( )
static

Definition at line 517 of file core2nrn_data_return.cpp.

◆ clear_spike_vectors()

void coreneuron::clear_spike_vectors ( )

Definition at line 293 of file output_spikes.cpp.

◆ cnrn_target_copyin()

template<typename T >
T* coreneuron::cnrn_target_copyin ( std::string_view  file,
int  line,
const T *  h_ptr,
std::size_t  len = 1 
)

Definition at line 110 of file offload.hpp.

◆ cnrn_target_copyin_debug()

void coreneuron::cnrn_target_copyin_debug ( std::string_view  file,
int  line,
std::size_t  sizeof_T,
std::type_info const &  typeid_T,
void const *  h_ptr,
std::size_t  len,
void *  d_ptr 
)

Definition at line 97 of file nrn_acc_manager.cpp.

◆ cnrn_target_delete()

template<typename T >
void coreneuron::cnrn_target_delete ( std::string_view  file,
int  line,
T *  h_ptr,
std::size_t  len = 1 
)

Definition at line 132 of file offload.hpp.

◆ cnrn_target_delete_debug()

void coreneuron::cnrn_target_delete_debug ( std::string_view  file,
int  line,
std::size_t  sizeof_T,
std::type_info const &  typeid_T,
void const *  h_ptr,
std::size_t  len 
)

Definition at line 111 of file nrn_acc_manager.cpp.

◆ cnrn_target_deviceptr_debug()

void coreneuron::cnrn_target_deviceptr_debug ( std::string_view  file,
int  line,
std::type_info const &  typeid_T,
void const *  h_ptr,
void *  d_ptr 
)

Definition at line 124 of file nrn_acc_manager.cpp.

◆ cnrn_target_deviceptr_or_present()

template<typename T >
T* coreneuron::cnrn_target_deviceptr_or_present ( std::string_view  file,
int  line,
bool  must_be_present_or_null,
const T *  h_ptr 
)

Definition at line 71 of file offload.hpp.

◆ cnrn_target_get_num_devices()

int coreneuron::cnrn_target_get_num_devices ( )

Definition at line 227 of file nrn_acc_manager.cpp.

◆ cnrn_target_is_present_debug()

void coreneuron::cnrn_target_is_present_debug ( std::string_view  file,
int  line,
std::type_info const &  typeid_T,
void const *  h_ptr,
void *  d_ptr 
)

Definition at line 135 of file nrn_acc_manager.cpp.

◆ cnrn_target_memcpy_to_device()

template<typename T >
void coreneuron::cnrn_target_memcpy_to_device ( std::string_view  file,
int  line,
T *  d_ptr,
const T *  h_ptr,
std::size_t  len = 1 
)

Definition at line 150 of file offload.hpp.

◆ cnrn_target_memcpy_to_device_debug()

void coreneuron::cnrn_target_memcpy_to_device_debug ( std::string_view  file,
int  line,
std::size_t  sizeof_T,
std::type_info const &  typeid_T,
void const *  h_ptr,
std::size_t  len,
void *  d_ptr 
)

Definition at line 146 of file nrn_acc_manager.cpp.

◆ cnrn_target_set_default_device()

void coreneuron::cnrn_target_set_default_device ( int  device_num)

Definition at line 243 of file nrn_acc_manager.cpp.

◆ cnrn_target_update_on_device()

template<typename T >
void coreneuron::cnrn_target_update_on_device ( std::string_view  file,
int  line,
const T *  h_ptr,
std::size_t  len = 1 
)

Definition at line 175 of file offload.hpp.

◆ cnrn_version()

std::string coreneuron::cnrn_version ( )

Definition at line 382 of file main1.cpp.

◆ cnt2displ()

static int* coreneuron::cnt2displ ( int *  cnt)
static

Definition at line 59 of file have2want.h.

◆ copy_ivoc_vect_to_device()

void coreneuron::copy_ivoc_vect_to_device ( const IvocVect from,
IvocVect to 
)

Definition at line 784 of file nrn_acc_manager.cpp.

◆ core2nrn_corepointer()

static void coreneuron::core2nrn_corepointer ( int  tid,
NrnThreadMembList tml 
)
static

Copy back COREPOINTER info to NEURON.

Definition at line 144 of file core2nrn_data_return.cpp.

◆ core2nrn_data_return()

void coreneuron::core2nrn_data_return ( )

copy data back to NEURON.

Copies back to NEURON everything needed to analyze and continue simulation.

Copies t, voltage, i_membrane_ if it used, and mechanism param data. Copies event queue and related state, e.g. WATCH, VecPlayContinuous.

I.e. voltage, i_membrane_, mechanism data, event queue, WATCH state, Play state, etc.

Definition at line 305 of file core2nrn_data_return.cpp.

◆ core2nrn_PreSyn_flag()

static void coreneuron::core2nrn_PreSyn_flag ( NrnThread nt)
static

Definition at line 466 of file core2nrn_data_return.cpp.

◆ core2nrn_tqueue()

void coreneuron::core2nrn_tqueue ( NrnThread nt)
static

Copy event queue and related state back to NEURON.

Definition at line 610 of file core2nrn_data_return.cpp.

◆ core2nrn_tqueue_item()

static bool coreneuron::core2nrn_tqueue_item ( TQItem q,
SelfEventWeightMap sewm,
NrnThread nt 
)
static

Definition at line 528 of file core2nrn_data_return.cpp.

◆ core2nrn_vecplay()

static void coreneuron::core2nrn_vecplay ( )
static

Transfer VecPlay indices to NEURON.

Definition at line 414 of file core2nrn_data_return.cpp.

◆ core2nrn_watch()

static void coreneuron::core2nrn_watch ( )
static

Callbacks into NEURON for WatchCondition.

Definition at line 372 of file core2nrn_data_return.cpp.

◆ corenrn_subworld()

void coreneuron::corenrn_subworld ( )

Definition at line 95 of file nrnmpi.cpp.

◆ create_report_configurations()

std::vector< ReportConfiguration > coreneuron::create_report_configurations ( const std::string &  filename,
const std::string &  output_dir,
SpikesInfo spikes_info 
)

Definition at line 106 of file report_configuration_parser.cpp.

◆ create_report_handler()

std::unique_ptr<ReportHandler> coreneuron::create_report_handler ( const ReportConfiguration config,
const SpikesInfo spikes_info 
)

Definition at line 399 of file main1.cpp.

◆ create_tml()

NrnThreadMembList * coreneuron::create_tml ( NrnThread nt,
int  mech_id,
Memb_func memb_func,
int &  shadow_rhs_cnt,
const std::vector< int > &  mech_types,
const std::vector< int > &  nodecounts 
)

Definition at line 64 of file multicore.cpp.

◆ deallocate_unified()

void coreneuron::deallocate_unified ( void *  ptr,
std::size_t  num_bytes 
)

Definition at line 44 of file memory.cpp.

◆ declare_mpi_method() [1/22]

coreneuron::declare_mpi_method ( nrnmpi_abort  )

◆ declare_mpi_method() [2/22]

coreneuron::declare_mpi_method ( nrnmpi_barrier  )

◆ declare_mpi_method() [3/22]

coreneuron::declare_mpi_method ( nrnmpi_check_threading_support  )

◆ declare_mpi_method() [4/22]

coreneuron::declare_mpi_method ( nrnmpi_dbl_allmax  )

◆ declare_mpi_method() [5/22]

coreneuron::declare_mpi_method ( nrnmpi_dbl_allmin  )

◆ declare_mpi_method() [6/22]

coreneuron::declare_mpi_method ( nrnmpi_dbl_allreduce  )

◆ declare_mpi_method() [7/22]

coreneuron::declare_mpi_method ( nrnmpi_dbl_allreduce_vec  )

◆ declare_mpi_method() [8/22]

coreneuron::declare_mpi_method ( nrnmpi_dbl_alltoallv  )

◆ declare_mpi_method() [9/22]

coreneuron::declare_mpi_method ( nrnmpi_finalize  )

◆ declare_mpi_method() [10/22]

coreneuron::declare_mpi_method ( nrnmpi_init  )

◆ declare_mpi_method() [11/22]

coreneuron::declare_mpi_method ( nrnmpi_initialized  )

◆ declare_mpi_method() [12/22]

coreneuron::declare_mpi_method ( nrnmpi_int_allgather  )

◆ declare_mpi_method() [13/22]

coreneuron::declare_mpi_method ( nrnmpi_int_allmax  )

◆ declare_mpi_method() [14/22]

coreneuron::declare_mpi_method ( nrnmpi_int_alltoall  )

◆ declare_mpi_method() [15/22]

coreneuron::declare_mpi_method ( nrnmpi_int_alltoallv  )

◆ declare_mpi_method() [16/22]

coreneuron::declare_mpi_method ( nrnmpi_local_rank  )

◆ declare_mpi_method() [17/22]

coreneuron::declare_mpi_method ( nrnmpi_local_size  )

◆ declare_mpi_method() [18/22]

coreneuron::declare_mpi_method ( nrnmpi_long_allreduce_vec  )

◆ declare_mpi_method() [19/22]

coreneuron::declare_mpi_method ( nrnmpi_spike_exchange  )

◆ declare_mpi_method() [20/22]

coreneuron::declare_mpi_method ( nrnmpi_spike_exchange_compressed  )

◆ declare_mpi_method() [21/22]

coreneuron::declare_mpi_method ( nrnmpi_write_file  )

◆ declare_mpi_method() [22/22]

coreneuron::declare_mpi_method ( nrnmpi_wtime  )

◆ default_rendezvous()

static int coreneuron::default_rendezvous ( HAVEWANT_t  key)
static

Definition at line 55 of file have2want.h.

◆ delete_fornetcon_info()

void coreneuron::delete_fornetcon_info ( NrnThread nt)

Definition at line 716 of file nrn_setup.cpp.

◆ delete_ivoc_vect_from_device()

void coreneuron::delete_ivoc_vect_from_device ( IvocVect vec)

Definition at line 800 of file nrn_acc_manager.cpp.

◆ delete_nrnthreads_on_device()

void coreneuron::delete_nrnthreads_on_device ( NrnThread threads,
int  nthreads 
)

Cleanup device memory that is being tracked by the OpenACC runtime.

This function painstakingly calls cnrn_target_delete in reverse order on all pointers that were passed to cnrn_target_copyin in setup_nrnthreads_on_device. This cleanup ensures that if the GPU is initialised multiple times from the same process then the OpenACC runtime will not be polluted with old pointers, which can cause errors. In particular if we do:

{
// ... some_ptr is dynamically allocated ...
cnrn_target_copyin(some_ptr, some_size);
// ... do some work ...
// cnrn_target_delete(some_ptr);
free(some_ptr);
}
{
// ... same_ptr_again is dynamically allocated at the same address ...
cnrn_target_copyin(same_ptr_again, some_other_size); // ERROR
}
T * cnrn_target_copyin(std::string_view file, int line, const T *h_ptr, std::size_t len=1)
Definition: offload.hpp:110

the application will/may abort with an error such as: FATAL ERROR: variable in data clause is partially present on the device. The pattern above is typical of calling CoreNEURON on GPU multiple times in the same process.

Definition at line 1151 of file nrn_acc_manager.cpp.

◆ delete_trajectory_requests()

void coreneuron::delete_trajectory_requests ( NrnThread nt)

Definition at line 905 of file nrn_setup.cpp.

◆ deliver_net_events()

void coreneuron::deliver_net_events ( NrnThread nt)

Definition at line 24 of file cvodestb.cpp.

◆ depend_append()

static int coreneuron::depend_append ( int  idep,
int *  dependencies,
int  deptype,
int  type 
)
static

Definition at line 277 of file register_mech.cpp.

◆ derivimplicit_thread()

template<typename F >
int coreneuron::derivimplicit_thread ( int  n,
int *  slist,
int *  dlist,
fun,
_threadargsproto_   
)

Definition at line 86 of file mod2c_core_thread.hpp.

◆ determine_inputpresyn()

void coreneuron::determine_inputpresyn ( )

If PreSyn or InputPreSyn is already in the map

Increase PreSyn count

Increase InputPreSyn count

Create InputPreSyn and increase its count

Increase negative PreSyn count

Resize the vector to its actual size of the netcons put in it

Definition at line 256 of file nrn_setup.cpp.

◆ direct_mode_initialize()

void coreneuron::direct_mode_initialize ( )

All state from NEURON necessary to continue a run.

In NEURON direct mode, we desire the exact behavior of ParallelContext.psolve(tstop). I.e. a sequence of such calls with and without intervening calls to h.finitialize(). Most state (structure and data of the substantive model) has been copied from NEURON during nrn_setup. Now we need to copy the event queue and set up any other invalid internal structures. I.e basically the nrn_finitialize above but without changing any simulation data. We follow some of the strategy of checkpoint_initialize.

Definition at line 50 of file nrn2core_data_init.cpp.

◆ dt2thread()

void coreneuron::dt2thread ( double  adt)

Definition at line 70 of file fadvance_core.cpp.

◆ ecalloc()

void * coreneuron::ecalloc ( size_t  n,
size_t  size 
)

Definition at line 85 of file nrnoc_aux.cpp.

◆ ecalloc_align()

void* coreneuron::ecalloc_align ( size_t  n,
size_t  size,
size_t  alignment 
)

◆ emalloc()

static void* coreneuron::emalloc ( size_t  size)
static

Definition at line 30 of file mpispike.cpp.

◆ emalloc_align()

void* coreneuron::emalloc_align ( size_t  size,
size_t  alignment 
)

◆ erealloc()

void * coreneuron::erealloc ( void *  ptr,
size_t  size 
)

Definition at line 94 of file nrnoc_aux.cpp.

◆ euler_thread()

template<typename F >
int coreneuron::euler_thread ( int  neqn,
int *  var,
int *  der,
fun,
_threadargsproto_   
)

Definition at line 74 of file mod2c_core_thread.hpp.

◆ fast_imem_free()

void coreneuron::fast_imem_free ( )

Definition at line 21 of file fast_imem.cpp.

◆ finalize_report()

void coreneuron::finalize_report ( )

Definition at line 65 of file nrnreport.cpp.

◆ fixed_play_continuous()

void coreneuron::fixed_play_continuous ( NrnThread nt)

Definition at line 81 of file cvodestb.cpp.

◆ fornetcon_slot()

static int* coreneuron::fornetcon_slot ( const int  mtype,
const int  instance,
const int  fnslot,
const NrnThread nt 
)
static

If FOR_NETCON in use, setup NrnThread fornetcon related info.

i.e NrnThread._fornetcon_perm_indices, NrnThread._fornetcon_weight_perm, and the relevant dparam element of each mechanism instance that uses a FOR_NETCONS statement.

Makes use of nrn_fornetcon_cnt_, nrn_fornetcon_type_, and nrn_fornetcon_index_ that were specified during registration of mechanisms that use FOR_NETCONS.

nrn_fornetcon_cnt_ is the number of mechanisms that use FOR_NETCONS, nrn_fornetcon_type_ is an int array of size nrn_fornetcon_cnt, that specifies the mechanism type. nrn_fornetcon_index_ is an int array of size nrn_fornetcon_cnt, that specifies the index into an instance's dparam int array having the fornetcon semantics.

FOR_NETCONS (args) means to loop over all NetCon connecting to this target instance and args are the names of the items of each NetCon's weight vector (same as the enclosing NET_RECEIVE but possible different local names).

NrnThread._weights is a vector of weight groups where the number of groups is the number of NetCon in this thread and each group has a size equal to the number of args in the target NET_RECEIVE block. The order of these groups is the NetCon Object order in HOC (the construction order). So the weight vector indices for the NetCons in the FOR_NETCONS loop are not adjacent.

NrnThread._fornetcon_weight_perm is an index vector into the NrnThread._weight vector such that the list of indices that targets a mechanism instance are adjacent. NrnThread._fornetcon_perm_indices is an index vector into the NrnThread._fornetcon_weight_perm to the first of the list of NetCon weights that target the instance. The index of _fornetcon_perm_indices containing this first in the list is stored in the mechanism instances dparam at the dparam's semantic fornetcon slot. (Note that the next index points to the first index of the next target instance.)

Definition at line 60 of file setup_fornetcon.cpp.

◆ freematrix()

void coreneuron::freematrix ( double **  matrix)

Definition at line 66 of file nrnoc_aux.cpp.

◆ freevector()

void coreneuron::freevector ( double *  p)

Definition at line 52 of file nrnoc_aux.cpp.

◆ get_data_index()

int coreneuron::get_data_index ( int  node_index,
int  variable_index,
int  mtype,
Memb_list ml 
)

Definition at line 19 of file data_layout.cpp.

◆ get_nrn_trajectory_requests()

void coreneuron::get_nrn_trajectory_requests ( int  bsize)

Definition at line 113 of file main1.cpp.

◆ get_var_location_from_var_name()

double * coreneuron::get_var_location_from_var_name ( int  mech_id,
const char *  variable_name,
Memb_list ml,
int  node_index 
)

Definition at line 39 of file mech_mapping.cpp.

◆ gpu_enabled()

bool coreneuron::gpu_enabled ( )

Definition at line 18 of file memory.cpp.

◆ handle_forward_skip()

void coreneuron::handle_forward_skip ( double  forwardskip,
int  prcellgid 
)

Definition at line 358 of file main1.cpp.

◆ have_to_want()

static void coreneuron::have_to_want ( HAVEWANT_t have,
int  have_size,
HAVEWANT_t want,
int  want_size,
HAVEWANT_t *&  send_to_want,
int *&  send_to_want_cnt,
int *&  send_to_want_displ,
HAVEWANT_t *&  recv_from_have,
int *&  recv_from_have_cnt,
int *&  recv_from_have_displ,
int(*)(HAVEWANT_t rendezvous_rank 
)
static

Definition at line 128 of file have2want.h.

◆ hoc_Emalloc()

void * coreneuron::hoc_Emalloc ( size_t  size)

Definition at line 80 of file nrnoc_aux.cpp.

◆ hoc_execerror()

void coreneuron::hoc_execerror ( const char *  s1,
const char *  s2 
)

Definition at line 39 of file nrnoc_aux.cpp.

◆ hoc_Exp()

double coreneuron::hoc_Exp ( double  x)

Definition at line 109 of file nrnoc_aux.cpp.

◆ hoc_malchk()

void coreneuron::hoc_malchk ( void  )

Definition at line 83 of file nrnoc_aux.cpp.

◆ hoc_reg_ba()

void coreneuron::hoc_reg_ba ( int  mt,
mod_f_t  f,
int  type 
)

Definition at line 382 of file register_mech.cpp.

◆ hoc_reg_bbcore_read()

void coreneuron::hoc_reg_bbcore_read ( int  type,
bbcore_read_t  f 
)

Definition at line 30 of file register_mech.cpp.

◆ hoc_reg_bbcore_write()

void coreneuron::hoc_reg_bbcore_write ( int  type,
bbcore_write_t  f 
)

Definition at line 36 of file register_mech.cpp.

◆ hoc_register_dparam_semantics()

void coreneuron::hoc_register_dparam_semantics ( int  type,
int  ix,
const char *  name 
)

Definition at line 209 of file register_mech.cpp.

◆ hoc_register_net_receive_buffering()

void coreneuron::hoc_register_net_receive_buffering ( NetBufReceive_t  f,
int  type 
)

Definition at line 182 of file register_mech.cpp.

◆ hoc_register_net_send_buffering()

void coreneuron::hoc_register_net_send_buffering ( int  type)

Definition at line 186 of file register_mech.cpp.

◆ hoc_register_prop_size()

void coreneuron::hoc_register_prop_size ( int  type,
int  psize,
int  dpsize 
)

Definition at line 194 of file register_mech.cpp.

◆ hoc_register_var()

void coreneuron::hoc_register_var ( DoubScal ds,
DoubVec dv,
VoidFunc  
)

Definition at line 31 of file global_vars.cpp.

◆ hoc_register_watch_check()

void coreneuron::hoc_register_watch_check ( nrn_watch_check_t  nwc,
int  type 
)

Definition at line 190 of file register_mech.cpp.

◆ hoc_warning()

void coreneuron::hoc_warning ( const char *  s1,
const char *  s2 
)

Definition at line 44 of file nrnoc_aux.cpp.

◆ init_gpu()

void coreneuron::init_gpu ( )

◆ init_net_events()

void coreneuron::init_net_events ( )

Definition at line 53 of file cvodestb.cpp.

◆ initnrn()

void coreneuron::initnrn ( )

Definition at line 104 of file register_mech.cpp.

◆ input_presyn_size()

size_t coreneuron::input_presyn_size ( void  )

Definition at line 1020 of file nrn_setup.cpp.

◆ intersection_gids()

template<typename T >
std::vector<T> coreneuron::intersection_gids ( const NrnThread nt,
std::vector< T > &  target_gids 
)

Definition at line 17 of file report_handler.cpp.

◆ interthread_enqueue()

void coreneuron::interthread_enqueue ( NrnThread nt)

Definition at line 138 of file netcvode.cpp.

◆ inv_permute()

static int coreneuron::inv_permute ( int  i,
NrnThread nt 
)
static

Definition at line 32 of file prcellstate.cpp.

◆ inverse_permute()

int* coreneuron::inverse_permute ( int *  p,
int  n 
)

◆ inverse_permute_copy()

static void coreneuron::inverse_permute_copy ( size_t  n,
double *  permuted_src,
double *  dest,
int *  permute 
)
static

permuted array copied to unpermuted array If permute is NULL then just a copy

Definition at line 56 of file core2nrn_data_return.cpp.

◆ ion_reg()

void coreneuron::ion_reg ( const char *  ,
double   
)

◆ ion_write_depend()

static void coreneuron::ion_write_depend ( int  type,
int  etype 
)
static

Definition at line 263 of file register_mech.cpp.

◆ ktf()

constexpr double coreneuron::ktf ( double  celsius)
constexpr

Definition at line 124 of file membfunc.hpp.

◆ legacy2soaos_index()

std::array<int, 3> coreneuron::legacy2soaos_index ( int  legacy_index,
const std::vector< int > &  array_dims 
)

Split a legacy index into the three SoAoS indices.

The legacy index is the AoS of the data, i.e. all values are arranged in a table. Different variables and elements of those variables for array variables occupy different columns, while different instances occupy different rows.

The legacy index is then simply the elements flat (one-dimensional) index in that (unpadded) row-major table.

Given this legacy_index and array_dims, i.e. the number of array elements for each variable (1 for regular variables and >= 1 for array variables), compute the triplet (i, j, k) where i is the index of the instance, j of the variable, and k the of array element.

Definition at line 47 of file mem_layout_util.cpp.

◆ legacy_index2pointer()

double * coreneuron::legacy_index2pointer ( int  mtype,
int  index,
NrnThread nt 
)

Definition at line 643 of file nrn_setup.cpp.

◆ local_spikevec_sort()

static void coreneuron::local_spikevec_sort ( std::vector< double > &  isvect,
std::vector< int > &  isvecg,
std::vector< double > &  osvect,
std::vector< int > &  osvecg 
)
static

Definition at line 67 of file output_spikes.cpp.

◆ makematrix()

double ** coreneuron::makematrix ( size_t  nrows,
size_t  ncols 
)

Definition at line 58 of file nrnoc_aux.cpp.

◆ makevector()

double * coreneuron::makevector ( size_t  size)

Definition at line 48 of file nrnoc_aux.cpp.

◆ mech_data_layout_transform() [1/2]

template<typename T >
void coreneuron::mech_data_layout_transform ( T *  data,
int  cnt,
const std::vector< int > &  array_dims,
int  layout 
)

Definition at line 91 of file phase2.cpp.

◆ mech_data_layout_transform() [2/2]

template<typename T >
void coreneuron::mech_data_layout_transform ( T *  data,
int  cnt,
int  sz,
int  layout 
)
inline

Definition at line 120 of file phase2.cpp.

◆ memb_list_size()

size_t coreneuron::memb_list_size ( NrnThreadMembList tml,
bool  include_data 
)

Definition at line 974 of file nrn_setup.cpp.

◆ mk_mech() [1/3]

static void coreneuron::mk_mech ( )
static

Definition at line 68 of file mk_mech.cpp.

◆ mk_mech() [2/3]

void coreneuron::mk_mech ( const char *  datpath)

Read meta data about the mechanisms and allocate corresponding mechanism management data structures.

Definition at line 43 of file mk_mech.cpp.

◆ mk_mech() [3/3]

static void coreneuron::mk_mech ( std::istream &  s)
static

Allocate space for mechanism related data structures

Read all the mechanisms and their meta data

Calling _reg functions for the default mechanisms from the file mech/cfile/cabvars.h

Allocate space for mechanism related data structures

Read all the mechanisms and their meta data

Calling _reg functions for the default mechanisms from the file mech/cfile/cabvars.h

Definition at line 80 of file mk_mech.cpp.

◆ mk_netcvode()

void coreneuron::mk_netcvode ( )

Definition at line 41 of file netcvode.cpp.

◆ mk_spikevec_buffer()

void coreneuron::mk_spikevec_buffer ( int  sz)

Definition at line 50 of file output_spikes.cpp.

◆ ml_permute()

static int coreneuron::ml_permute ( int  i,
Memb_list ml 
)
static

Definition at line 46 of file prcellstate.cpp.

◆ model_size()

size_t coreneuron::model_size ( bool  detailed_report)

Definition at line 1032 of file nrn_setup.cpp.

◆ modl_reg()

void coreneuron::modl_reg ( void  )

Mechanism registration function.

If external mechanisms present then use modl_reg function generated in mod_func.cpp otherwise use empty one.

Definition at line 33 of file enginemech.cpp.

◆ mpi_manager()

mpi_manager_t& coreneuron::mpi_manager ( )
inline

Definition at line 52 of file nrnmpi.h.

◆ ncs2nrn_integrate()

void coreneuron::ncs2nrn_integrate ( double  tstop)

Definition at line 488 of file netcvode.cpp.

◆ net_event()

void coreneuron::net_event ( Point_process pnt,
double  time 
)

Definition at line 107 of file netcvode.cpp.

◆ net_move()

void coreneuron::net_move ( void **  v,
Point_process pnt,
double  tt 
)

Definition at line 296 of file netcvode.cpp.

◆ net_receive_buffer_order()

static void coreneuron::net_receive_buffer_order ( NetReceiveBuffer_t nrb)
static

Definition at line 888 of file nrn_acc_manager.cpp.

◆ net_sem_from_gpu()

void coreneuron::net_sem_from_gpu ( int  sendtype,
int  i_vdata,
int  weight_index_,
int  ith,
int  ipnt,
double  td,
double  flag 
)

Definition at line 59 of file netcvode.cpp.

◆ net_send()

void coreneuron::net_send ( void **  v,
int  weight_index_,
Point_process pnt,
double  td,
double  flag 
)

Definition at line 77 of file netcvode.cpp.

◆ netpar_tid_gid2ps()

void coreneuron::netpar_tid_gid2ps ( int  tid,
int  gid,
PreSyn **  ps,
InputPreSyn **  psi 
)

for gid < 0 returns the PreSyn* in the thread (tid) specific map.

Definition at line 233 of file nrn_setup.cpp.

◆ nonvint()

void coreneuron::nonvint ( NrnThread _nt)

Definition at line 232 of file fadvance_core.cpp.

◆ nrn2core_patstim_share_info()

void coreneuron::nrn2core_patstim_share_info ( )
static

Definition at line 417 of file nrn2core_data_init.cpp.

◆ nrn2core_PreSyn_flag_receive()

void coreneuron::nrn2core_PreSyn_flag_receive ( int  tid)

Definition at line 484 of file core2nrn_data_return.cpp.

◆ nrn2core_tqueue()

static void coreneuron::nrn2core_tqueue ( )
static

Copy each thread's queue from NEURON.

Definition at line 154 of file nrn2core_data_init.cpp.

◆ nrn2core_transfer_watch_condition()

void coreneuron::nrn2core_transfer_watch_condition ( int  tid,
int  pnttype,
int  pntindex,
int  watch_index,
int  triggered 
)
static

Definition at line 354 of file nrn2core_data_init.cpp.

◆ nrn2ncs_outputevent()

void coreneuron::nrn2ncs_outputevent ( int  netcon_output_index,
double  firetime 
)

◆ nrn_abort()

void coreneuron::nrn_abort ( int  errcode)

Definition at line 13 of file utils.cpp.

◆ nrn_alloc_capacitance()

void coreneuron::nrn_alloc_capacitance ( double *  data,
Datum pdata,
int  type 
)

Definition at line 127 of file capac.cpp.

◆ nrn_alloc_ion()

void coreneuron::nrn_alloc_ion ( double *  data,
Datum pdata,
int  type 
)

◆ nrn_artcell_instantiate()

Point_process * coreneuron::nrn_artcell_instantiate ( const char *  mechname)

Definition at line 178 of file patternstim.cpp.

◆ nrn_ba()

void coreneuron::nrn_ba ( NrnThread nt,
int  bat 
)

Definition at line 258 of file fadvance_core.cpp.

◆ nrn_cacheline_alloc()

void * coreneuron::nrn_cacheline_alloc ( void **  memptr,
size_t  size 
)

Definition at line 103 of file nrnoc_aux.cpp.

◆ nrn_calc_fast_imem()

void coreneuron::nrn_calc_fast_imem ( NrnThread nt)

Definition at line 44 of file fast_imem.cpp.

◆ nrn_calc_fast_imem_init()

void coreneuron::nrn_calc_fast_imem_init ( NrnThread nt)

Definition at line 62 of file fast_imem.cpp.

◆ nrn_cleanup()

void coreneuron::nrn_cleanup ( )

Definition at line 725 of file nrn_setup.cpp.

◆ nrn_cleanup_ion_map()

void coreneuron::nrn_cleanup_ion_map ( )

Cleanup global ion map created during mechanism registration.

function defined in coreneuron library

In case of coreneuron standalone execution nrn_ion_global_map can be deleted at the end of execution. But in case embedded run via neuron, mechanisms are registered only once i.e. during first call to coreneuron. This is why we call cleanup only in case of standalone coreneuron execution via nrniv-core or special-core.

Todo:
coreneuron should have finalise callback which can be called from NEURON for final memory cleanup including global state like registered mechanisms and ions map.

Definition at line 707 of file nrn_setup.cpp.

◆ nrn_cons_newtonspace()

NewtonSpace * coreneuron::nrn_cons_newtonspace ( int  n,
int  n_instance 
)

Definition at line 15 of file newton_thread.cpp.

◆ nrn_cons_sparseobj()

template<typename SPFUN >
void* coreneuron::nrn_cons_sparseobj ( SPFUN  fun,
int  n,
Memb_list ml,
_threadargsproto_   
)

sparse matrix dynamic allocation: create_coef_list makes a list for fast setup, does minimum ordering and ensures all elements needed are present.

This could easily be made recursive but it isn't right now.

Definition at line 531 of file sparse_thread.hpp.

◆ nrn_crout_thread()

int coreneuron::nrn_crout_thread ( NewtonSpace ns,
int  n,
double **  a,
int *  perm,
_threadargsproto_   
)
inline

Performs an LU triangular factorization of a real matrix by the Crout algorithm using partial pivoting.

Rows are not normalized; implicit equilibration is used. ROUNDOFF is the minimal value for a pivot element without its being considered too close to zero (currently set to 1.0E-20).

Returns
0 if no error; 2 if matrix is singular or ill-conditioned
Parameters
nnumber of rows of the matrix
adouble precision matrix to be factored
[out]afactors required to transform the constant vector in the set of simultaneous equations are stored in the lower triangle; factors for back substitution are stored in the upper triangle.
[out]permpermutation vector to store row interchanges
Note
Having a differnt permutation per instance may not be a good idea.

Definition at line 40 of file crout_thread.hpp.

◆ nrn_cur_capacitance()

void coreneuron::nrn_cur_capacitance ( NrnThread _nt,
Memb_list ml,
int  type 
)

Definition at line 98 of file capac.cpp.

◆ nrn_cur_ion()

void coreneuron::nrn_cur_ion ( NrnThread _nt,
Memb_list ml,
int  type 
)

◆ nrn_deliver_events()

void coreneuron::nrn_deliver_events ( NrnThread nt)

Definition at line 32 of file cvodestb.cpp.

◆ nrn_destroy_newtonspace()

void coreneuron::nrn_destroy_newtonspace ( NewtonSpace ns)

Definition at line 29 of file newton_thread.cpp.

◆ nrn_div_capacity()

void coreneuron::nrn_div_capacity ( NrnThread _nt,
Memb_list ml,
int  type 
)

Definition at line 133 of file capac.cpp.

◆ nrn_exit()

void coreneuron::nrn_exit ( int  err)

Definition at line 30 of file nrnoc_aux.cpp.

◆ nrn_fake_fire()

void coreneuron::nrn_fake_fire ( int  gid,
double  spiketime,
int  fake_out 
)

Definition at line 578 of file netpar.cpp.

◆ nrn_fast_imem_alloc()

void coreneuron::nrn_fast_imem_alloc ( )

Definition at line 32 of file fast_imem.cpp.

◆ nrn_fatal_error() [1/2]

static void coreneuron::nrn_fatal_error ( const char *  msg)
static

Definition at line 31 of file nrnmpi.cpp.

◆ nrn_fatal_error() [2/2]

template<typename... Args>
void coreneuron::nrn_fatal_error ( const char *  msg,
Args &&...  args 
)

Definition at line 18 of file utils.hpp.

◆ nrn_finitialize()

void coreneuron::nrn_finitialize ( int  setv,
double  v 
)

Definition at line 40 of file finitialize.cpp.

◆ nrn_fixed_single_steps_minimal()

void coreneuron::nrn_fixed_single_steps_minimal ( int  total_sim_steps,
double  tstop 
)

--> Coreneuron

Definition at line 128 of file fadvance_core.cpp.

◆ nrn_fixed_step_group_minimal()

void coreneuron::nrn_fixed_step_group_minimal ( int  total_sim_steps)

Definition at line 148 of file fadvance_core.cpp.

◆ nrn_fixed_step_group_thread()

static void coreneuron::nrn_fixed_step_group_thread ( NrnThread nth,
int  step_group_max,
int  step_group_begin,
int &  step_group_end 
)
static

Definition at line 180 of file fadvance_core.cpp.

◆ nrn_fixed_step_lastpart()

void * coreneuron::nrn_fixed_step_lastpart ( NrnThread nth)

Definition at line 376 of file fadvance_core.cpp.

◆ nrn_fixed_step_minimal()

void coreneuron::nrn_fixed_step_minimal ( )

Definition at line 91 of file fadvance_core.cpp.

◆ nrn_fixed_step_thread()

static void * coreneuron::nrn_fixed_step_thread ( NrnThread nth)
static

Definition at line 332 of file fadvance_core.cpp.

◆ nrn_flush_reports()

void coreneuron::nrn_flush_reports ( double  t)

Definition at line 33 of file nrnreport.cpp.

◆ nrn_get_mechname()

const char * coreneuron::nrn_get_mechname ( int  type)

Definition at line 152 of file mk_mech.cpp.

◆ nrn_get_mechtype()

int coreneuron::nrn_get_mechtype ( const char *  name)

Get mechanism type by the mechanism name.

Definition at line 145 of file mk_mech.cpp.

◆ nrn_ghk()

double coreneuron::nrn_ghk ( double  v,
double  ci,
double  co,
double  z,
double  celsius 
)
inline

Definition at line 158 of file membfunc.hpp.

◆ nrn_i_layout()

int coreneuron::nrn_i_layout ( int  icnt,
int  cnt,
int  isz,
int  sz,
int  layout 
)

This function return the index in a flat array of a matrix coordinate (icnt, isz).

The matrix size is (cnt, sz) Depending of the layout some padding can be calculated

Definition at line 34 of file mem_layout_util.cpp.

◆ nrn_init_and_load_data() [1/2]

void coreneuron::nrn_init_and_load_data ( int  argc,
char **  argv,
CheckPoints checkPoints,
bool  is_mapping_needed = false,
bool  run_setup_cleanup = true 
)

◆ nrn_init_and_load_data() [2/2]

void coreneuron::nrn_init_and_load_data ( int  argc,
char *  argv[],
CheckPoints checkPoints,
bool  is_mapping_needed,
bool  run_setup_cleanup 
)

profiler like tau/vtune : do not measure from begining

Setting the timeout

Definition at line 151 of file main1.cpp.

◆ nrn_init_capacitance()

void coreneuron::nrn_init_capacitance ( NrnThread _nt,
Memb_list ml,
int   
)

Definition at line 80 of file capac.cpp.

◆ nrn_init_ion()

void coreneuron::nrn_init_ion ( NrnThread ,
Memb_list ,
int   
)

◆ nrn_inverse_i_layout()

void coreneuron::nrn_inverse_i_layout ( int  i,
int &  icnt,
int  cnt,
int &  isz,
int  sz,
int  layout 
)

Definition at line 680 of file nrn_setup.cpp.

◆ nrn_ion_global_map_copyto_device()

void coreneuron::nrn_ion_global_map_copyto_device ( )

◆ nrn_ion_global_map_delete_from_device()

void coreneuron::nrn_ion_global_map_delete_from_device ( )

◆ nrn_is_ion()

int coreneuron::nrn_is_ion ( int  )

◆ nrn_jacob_capacitance()

void coreneuron::nrn_jacob_capacitance ( NrnThread ,
Memb_list ,
int   
)

Definition at line 55 of file capac.cpp.

◆ nrn_lhs()

static void coreneuron::nrn_lhs ( NrnThread _nt)
static

Definition at line 117 of file treeset_core.cpp.

◆ nrn_mallinfo()

double coreneuron::nrn_mallinfo ( void  )

Returns current memory usage in KBs.

Parameters
Void
Returns
memory usage in KBs

Definition at line 43 of file memory_utils.cpp.

◆ nrn_mech_depend()

int coreneuron::nrn_mech_depend ( int  type,
int *  dependencies 
)

Definition at line 298 of file register_mech.cpp.

◆ nrn_mech_random_indices()

std::vector< int > & coreneuron::nrn_mech_random_indices ( int  type)

Definition at line 210 of file core2nrn_data_return.cpp.

◆ nrn_mk_table_check()

void coreneuron::nrn_mk_table_check ( )

Definition at line 133 of file multicore.cpp.

◆ nrn_mkPatternStim()

void coreneuron::nrn_mkPatternStim ( const char *  fname,
double  tstop 
)

Definition at line 60 of file patternstim.cpp.

◆ nrn_mul_capacity()

void coreneuron::nrn_mul_capacity ( NrnThread _nt,
Memb_list ml,
int  type 
)

Definition at line 154 of file capac.cpp.

◆ nrn_multisend_advance()

void coreneuron::nrn_multisend_advance ( )

◆ nrn_multisend_cleanup()

void coreneuron::nrn_multisend_cleanup ( )

◆ nrn_multisend_init()

void coreneuron::nrn_multisend_init ( )

◆ nrn_multisend_receive()

void coreneuron::nrn_multisend_receive ( NrnThread )

◆ nrn_multisend_send()

void coreneuron::nrn_multisend_send ( PreSyn ,
double  t,
NrnThread  
)

◆ nrn_multisend_setup()

void coreneuron::nrn_multisend_setup ( )

◆ nrn_multisend_setup_targets()

void coreneuron::nrn_multisend_setup_targets ( bool  use_phase2,
int *&  targets_phase1,
int *&  targets_phase2 
)

◆ nrn_multithread_job()

template<typename F , typename... Args>
void coreneuron::nrn_multithread_job ( F &&  job,
Args &&...  args 
)

Definition at line 161 of file multicore.hpp.

◆ nrn_need_npe()

static bool coreneuron::nrn_need_npe ( )
static

Definition at line 221 of file netpar.cpp.

◆ nrn_nernst()

constexpr double coreneuron::nrn_nernst ( double  ci,
double  co,
double  z,
double  celsius 
)
constexpr

Definition at line 129 of file membfunc.hpp.

◆ nrn_newton_thread()

template<typename F >
int coreneuron::nrn_newton_thread ( NewtonSpace ns,
int  n,
int *  s,
func,
double *  value,
_threadargsproto_   
)
inline

Iteratively solves simultaneous nonlinear equations by Newton's method, using a Jacobian matrix computed by finite differences.

Returns
0 if no error; 2 if matrix is singular or ill-conditioned; 1 if maximum iterations exceeded.
Parameters
nnumber of variables to solve for
xpointer to array of the solution vector elements possibly indexed by index
parray of parameter values
funccallable that computes the deviation from zero of each equation in the model
valuepointer to array to array of the function values
[out]xcontains the solution value or the most recent iteration's result in the event of an error.

Definition at line 101 of file newton_thread.hpp.

◆ nrn_newtonspace_copyto_device()

void coreneuron::nrn_newtonspace_copyto_device ( NewtonSpace ns)

Definition at line 1248 of file nrn_acc_manager.cpp.

◆ nrn_newtonspace_delete_from_device()

void coreneuron::nrn_newtonspace_delete_from_device ( NewtonSpace ns)

Definition at line 1290 of file nrn_acc_manager.cpp.

◆ nrn_original_aos_index()

static int coreneuron::nrn_original_aos_index ( int  etype,
int  ix,
NrnThread nt,
int **  ml_pinv 
)
static

Definition at line 98 of file nrn_checkpoint.cpp.

◆ nrn_outputevent()

void coreneuron::nrn_outputevent ( unsigned char  ,
double   
)

◆ nrn_p_construct()

void coreneuron::nrn_p_construct ( )

Definition at line 175 of file netcvode.cpp.

◆ nrn_play_init()

void coreneuron::nrn_play_init ( )

Definition at line 72 of file cvodestb.cpp.

◆ nrn_pragma_acc()

coreneuron::nrn_pragma_acc ( routine  seq)

Definition at line 30 of file ivocvect.cpp.

◆ nrn_read_filesdat()

void coreneuron::nrn_read_filesdat ( int &  ngrp,
int *&  grp,
const char *  filesdat 
)

Definition at line 173 of file nrn_setup.cpp.

◆ nrn_rhs()

static void coreneuron::nrn_rhs ( NrnThread _nt)
static

Definition at line 23 of file treeset_core.cpp.

◆ nrn_scopmath_solve_thread()

void coreneuron::nrn_scopmath_solve_thread ( int  n,
double **  a,
double *  b,
int *  perm,
double *  p,
int *  y,
_threadargsproto_   
)
inline

Performs forward substitution algorithm to transform the constant vector in the linear simultaneous equations to be consistent with the factored matrix.

Then performs back substitution to find the solution to the simultaneous linear equations.

Parameters
nnumber of rows of the matrix
adouble precision matrix containing the factored matrix of coefficients of the linear equations
bvector of function values
permpermutation vector to store row interchanges
[out]p[y[i]]contains the solution vector

Definition at line 127 of file crout_thread.hpp.

◆ nrn_set_extra_thread0_vdata()

void coreneuron::nrn_set_extra_thread0_vdata ( )

Definition at line 48 of file patternstim.cpp.

◆ nrn_set_timeout()

int coreneuron::nrn_set_timeout ( int  timeout)

Definition at line 598 of file netpar.cpp.

◆ nrn_setup()

void coreneuron::nrn_setup ( const char *  filesdat,
bool  is_mapping_needed,
CheckPoints checkPoints,
bool  run_setup_cleanup,
const char *  datpath,
const char *  restore_path,
double *  mindelay 
)

Reserve vector of maps of size ngroup for negative gid-s std::vector< std::map<int, PreSyn*> > neg_gid2out;

gid2out - map of output presyn-s std::map<int, PreSyn*> gid2out;

Allocate memory for fast_imem calculation

Generally, tables depend on a few parameters. And if those parameters change, then the table needs to be recomputed. This is obviously important in NEURON since the user can change those parameters at any time. However, there is no c example for CoreNEURON so can't see what it looks like in that context. Boils down to setting up a function pointer of the function _check_table_thread(), which is only executed by StochKV.c.

Definition at line 409 of file nrn_setup.cpp.

◆ nrn_setup_cleanup()

void coreneuron::nrn_setup_cleanup ( )

Clean up.

Definition at line 399 of file nrn_setup.cpp.

◆ nrn_soa_byte_align()

size_t coreneuron::nrn_soa_byte_align ( size_t  size)

return the new offset considering the byte aligment settings

Definition at line 22 of file mem_layout_util.cpp.

◆ nrn_soa_padded_size()

int coreneuron::nrn_soa_padded_size ( int  cnt,
int  layout 
)

calculate size after padding for specific memory layout

Definition at line 17 of file mem_layout_util.cpp.

◆ nrn_solve_minimal()

void coreneuron::nrn_solve_minimal ( NrnThread _nt)

Definition at line 18 of file solve_core.cpp.

◆ nrn_sparseobj_copyto_device()

void coreneuron::nrn_sparseobj_copyto_device ( SparseObj so)

Definition at line 1309 of file nrn_acc_manager.cpp.

◆ nrn_sparseobj_delete_from_device()

void coreneuron::nrn_sparseobj_delete_from_device ( SparseObj so)

Definition at line 1392 of file nrn_acc_manager.cpp.

◆ nrn_spike_exchange()

void coreneuron::nrn_spike_exchange ( NrnThread nt)

◆ nrn_spike_exchange_init()

void coreneuron::nrn_spike_exchange_init ( )

Definition at line 238 of file netpar.cpp.

◆ nrn_thread_table_check()

void coreneuron::nrn_thread_table_check ( )

Definition at line 168 of file multicore.cpp.

◆ nrn_threads_create()

void coreneuron::nrn_threads_create ( int  n)

Definition at line 102 of file multicore.cpp.

◆ nrn_threads_free()

void coreneuron::nrn_threads_free ( )

Definition at line 125 of file multicore.cpp.

◆ nrn_VecPlay_copyto_device()

void coreneuron::nrn_VecPlay_copyto_device ( NrnThread nt,
void **  d_vecplay 
)

◆ nrn_VecPlay_delete_from_device()

void coreneuron::nrn_VecPlay_delete_from_device ( NrnThread nt)

◆ nrn_writes_conc()

void coreneuron::nrn_writes_conc ( int  type,
int   
)

Definition at line 165 of file register_mech.cpp.

◆ nrn_wrote_conc()

constexpr void coreneuron::nrn_wrote_conc ( int  type,
double *  p1,
int  p2,
int  it,
double **  gimap,
double  celsius,
int  _cntml_padded 
)
constexpr

Definition at line 141 of file membfunc.hpp.

◆ nrn_wtime()

double coreneuron::nrn_wtime ( )

Definition at line 22 of file utils.cpp.

◆ nrncore2nrn_send_init()

void coreneuron::nrncore2nrn_send_init ( )

Definition at line 267 of file fadvance_core.cpp.

◆ nrncore2nrn_send_values()

void coreneuron::nrncore2nrn_send_values ( NrnThread nth)

Definition at line 284 of file fadvance_core.cpp.

◆ nrnmpi_abort_impl()

void coreneuron::nrnmpi_abort_impl ( int  errcode)

Definition at line 155 of file nrnmpi.cpp.

◆ nrnmpi_barrier_impl()

void coreneuron::nrnmpi_barrier_impl ( )

Definition at line 288 of file mpispike.cpp.

◆ nrnmpi_check_threading_support_impl()

void coreneuron::nrnmpi_check_threading_support_impl ( )

Definition at line 139 of file nrnmpi.cpp.

◆ nrnmpi_dbl_allmax_impl()

double coreneuron::nrnmpi_dbl_allmax_impl ( double  x)

Definition at line 282 of file mpispike.cpp.

◆ nrnmpi_dbl_allmin_impl()

double coreneuron::nrnmpi_dbl_allmin_impl ( double  x)

Definition at line 276 of file mpispike.cpp.

◆ nrnmpi_dbl_allreduce_impl()

double coreneuron::nrnmpi_dbl_allreduce_impl ( double  x,
int  type 
)

Definition at line 302 of file mpispike.cpp.

◆ nrnmpi_dbl_allreduce_vec_impl()

void coreneuron::nrnmpi_dbl_allreduce_vec_impl ( double *  src,
double *  dest,
int  cnt,
int  type 
)

Definition at line 308 of file mpispike.cpp.

◆ nrnmpi_dbl_alltoallv_impl()

void coreneuron::nrnmpi_dbl_alltoallv_impl ( double *  s,
int *  scnt,
int *  sdispl,
double *  r,
int *  rcnt,
int *  rdispl 
)

Definition at line 261 of file mpispike.cpp.

◆ nrnmpi_finalize_impl()

void coreneuron::nrnmpi_finalize_impl ( void  )

Definition at line 81 of file nrnmpi.cpp.

◆ nrnmpi_init_impl()

nrnmpi_init_ret_t coreneuron::nrnmpi_init_impl ( int *  pargc,
char ***  pargv,
bool  is_quiet 
)

Definition at line 40 of file nrnmpi.cpp.

◆ nrnmpi_initialized_impl()

bool coreneuron::nrnmpi_initialized_impl ( )

Definition at line 149 of file nrnmpi.cpp.

◆ nrnmpi_int_allgather_impl()

void coreneuron::nrnmpi_int_allgather_impl ( int *  s,
int *  r,
int  n 
)

Definition at line 272 of file mpispike.cpp.

◆ nrnmpi_int_allmax_impl()

int coreneuron::nrnmpi_int_allmax_impl ( int  x)

Definition at line 242 of file mpispike.cpp.

◆ nrnmpi_int_alltoall_impl()

void coreneuron::nrnmpi_int_alltoall_impl ( int *  s,
int *  r,
int  n 
)

Definition at line 248 of file mpispike.cpp.

◆ nrnmpi_int_alltoallv_impl()

void coreneuron::nrnmpi_int_alltoallv_impl ( const int *  s,
const int *  scnt,
const int *  sdispl,
int *  r,
int *  rcnt,
int *  rdispl 
)

Definition at line 252 of file mpispike.cpp.

◆ nrnmpi_local_rank_impl()

int coreneuron::nrnmpi_local_rank_impl ( )

Return local mpi rank within a shared memory node.

When performing certain operations, we need to know the rank of mpi process on a given node. This function uses MPI 3 MPI_Comm_split_type function and MPI_COMM_TYPE_SHARED key to find out the local rank.

Definition at line 170 of file nrnmpi.cpp.

◆ nrnmpi_local_size_impl()

int coreneuron::nrnmpi_local_size_impl ( )

Return number of ranks running on single shared memory node.

We use MPI 3 MPI_Comm_split_type function and MPI_COMM_TYPE_SHARED key to determine number of mpi ranks within a shared memory node.

Definition at line 188 of file nrnmpi.cpp.

◆ nrnmpi_long_allreduce_vec_impl()

void coreneuron::nrnmpi_long_allreduce_vec_impl ( long *  src,
long *  dest,
int  cnt,
int  type 
)

Definition at line 313 of file mpispike.cpp.

◆ nrnmpi_spike_compress()

int coreneuron::nrnmpi_spike_compress ( int  nspike,
bool  gid_compress,
int  xchng_meth 
)

Definition at line 753 of file netpar.cpp.

◆ nrnmpi_spike_exchange_compressed_impl()

int coreneuron::nrnmpi_spike_exchange_compressed_impl ( int  localgid_size,
unsigned char *&  spfixin_ovfl,
int  send_nspike,
int *  nin,
int  ovfl_capacity,
unsigned char *  spikeout_fixed,
int  ag_send_size,
unsigned char *  spikein_fixed,
int &  ovfl 
)

Definition at line 177 of file mpispike.cpp.

◆ nrnmpi_spike_exchange_impl()

int coreneuron::nrnmpi_spike_exchange_impl ( int *  nin,
NRNMPI_Spike spikeout,
int  icapacity,
NRNMPI_Spike **  spikein,
int &  ovfl,
int  nout,
NRNMPI_Spikebuf spbufout,
NRNMPI_Spikebuf spbufin 
)

Definition at line 82 of file mpispike.cpp.

◆ nrnmpi_spike_initialize()

void coreneuron::nrnmpi_spike_initialize ( )

Definition at line 37 of file mpispike.cpp.

◆ nrnmpi_v_transfer()

void coreneuron::nrnmpi_v_transfer ( )

Definition at line 35 of file partrans.cpp.

◆ nrnmpi_write_file_impl()

void coreneuron::nrnmpi_write_file_impl ( const std::string &  filename,
const char *  buffer,
size_t  length 
)

Write given buffer to a new file using MPI collective I/O.

For output like spikes, each rank has to write spike timing information to a single file. This routine writes buffers of length len1, len2, len3... at the offsets 0, 0+len1, 0+len1+len2... offsets. This write op is a collective across all ranks of the common MPI communicator used for spike exchange.

Parameters
filenameName of the file to write
bufferBuffer to write
lengthLength of the buffer to write

Definition at line 213 of file nrnmpi.cpp.

◆ nrnmpi_wtime_impl()

double coreneuron::nrnmpi_wtime_impl ( )

Definition at line 159 of file nrnmpi.cpp.

◆ nrnran123_deletestream()

void coreneuron::nrnran123_deletestream ( nrnran123_State s,
bool  use_unified_memory 
)

Definition at line 205 of file nrnran123.cpp.

◆ nrnran123_destroy_global_state_on_device()

void coreneuron::nrnran123_destroy_global_state_on_device ( )

Definition at line 158 of file nrnran123.cpp.

◆ nrnran123_get_globalindex()

uint32_t coreneuron::nrnran123_get_globalindex ( )

Definition at line 112 of file nrnran123.cpp.

◆ nrnran123_initialise_global_state_on_device()

void coreneuron::nrnran123_initialise_global_state_on_device ( )

Definition at line 150 of file nrnran123.cpp.

◆ nrnran123_instance_count()

std::size_t coreneuron::nrnran123_instance_count ( )

Definition at line 107 of file nrnran123.cpp.

◆ nrnran123_newstream3()

nrnran123_State* coreneuron::nrnran123_newstream3 ( uint32_t  id1,
uint32_t  id2,
uint32_t  id3,
bool  use_unified_memory 
)

Allocate a new Random123 stream.

Todo:
It would be nicer if the API return type was std::unique_ptr<nrnran123_State, ...not specified...>, so we could use a custom allocator/deleter and avoid the (fragile) need for matching nrnran123_deletestream calls.

Definition at line 172 of file nrnran123.cpp.

◆ nrnran123_set_globalindex()

void coreneuron::nrnran123_set_globalindex ( uint32_t  gix)

Definition at line 117 of file nrnran123.cpp.

◆ nrnthread_v_transfer()

void coreneuron::nrnthread_v_transfer ( NrnThread _nt)

Definition at line 108 of file partrans.cpp.

◆ operator<<()

std::ostream & coreneuron::operator<< ( std::ostream &  os,
const corenrn_parameters corenrn_param 
)

Definition at line 219 of file corenrn_parameters.cpp.

◆ output_presyn_size()

size_t coreneuron::output_presyn_size ( void  )

Approximate count of number of bytes for the gid2out map.

Definition at line 1008 of file nrn_setup.cpp.

◆ output_spikes()

void coreneuron::output_spikes ( const char *  outpath,
const SpikesInfo spikes_info 
)

Definition at line 276 of file output_spikes.cpp.

◆ output_spikes_serial()

static void coreneuron::output_spikes_serial ( const char *  outpath)
static

Definition at line 250 of file output_spikes.cpp.

◆ parse_filter_string()

void coreneuron::parse_filter_string ( const std::string &  filter,
ReportConfiguration config 
)

Definition at line 32 of file report_configuration_parser.cpp.

◆ pattern_stim_info_ref()

void** coreneuron::pattern_stim_info_ref ( int  icnt,
int  cnt,
double *  _p,
Datum _ppvar,
ThreadDatum _thread,
NrnThread _nt,
Memb_list ml,
double  v 
)

◆ pattern_stim_setup_helper()

void coreneuron::pattern_stim_setup_helper ( int  size,
double *  tvec,
int *  gidvec,
int  icnt,
int  cnt,
double *  _p,
Datum _ppvar,
ThreadDatum _thread,
NrnThread _nt,
Memb_list ml,
double  v 
)

◆ permute()

static int coreneuron::permute ( int  i,
NrnThread nt 
)
static

Definition at line 28 of file prcellstate.cpp.

◆ pnt_name()

char * coreneuron::pnt_name ( Point_process pnt)

Definition at line 26 of file nrnoc_aux.cpp.

◆ point_reg_helper()

int coreneuron::point_reg_helper ( const Symbol s2)

Definition at line 329 of file register_mech.cpp.

◆ point_register_mech()

int coreneuron::point_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,
mod_f_t  constructor,
mod_f_t  destructor,
int  vectorized 
)

Definition at line 343 of file register_mech.cpp.

◆ pr_memb()

static void coreneuron::pr_memb ( int  type,
Memb_list ml,
int *  cellnodes,
NrnThread nt,
FILE *  f 
)
static

Definition at line 52 of file prcellstate.cpp.

◆ pr_netcon()

static void coreneuron::pr_netcon ( NrnThread nt,
FILE *  f 
)
static

Fill the NetCon <-> DiscreteEvent map with PreSyn-s

Fill the NetCon <-> DiscreteEvent map with InputPreSyn-s Traverse gid <-> InputPreSyn map and loop over NetCon-s of the correspondent InputPreSyn. If NetCon is in the nc2src map, remember its ips and the gid

input presyn

src gid of the input presyn

Definition at line 86 of file prcellstate.cpp.

◆ pr_realcell()

static void coreneuron::pr_realcell ( PreSyn ps,
NrnThread nt,
FILE *  f 
)
static

Definition at line 199 of file prcellstate.cpp.

◆ prcellstate()

int coreneuron::prcellstate ( int  gid,
const char *  suffix 
)

Definition at line 271 of file prcellstate.cpp.

◆ pscheck()

static bool coreneuron::pscheck ( double  var,
double  thresh,
int *  flag 
)
static

Definition at line 509 of file netcvode.cpp.

◆ read_phase1()

void coreneuron::read_phase1 ( NrnThread nt,
UserParams userParams 
)

Definition at line 923 of file nrn_setup.cpp.

◆ read_phase2()

void coreneuron::read_phase2 ( NrnThread nt,
UserParams userParams 
)

Definition at line 930 of file nrn_setup.cpp.

◆ read_phase3()

void coreneuron::read_phase3 ( NrnThread nt,
UserParams userParams 
)

read mapping information for neurons

mapping information for all neurons in single NrnThread

Definition at line 941 of file nrn_setup.cpp.

◆ read_phasegap()

void coreneuron::read_phasegap ( NrnThread nt,
UserParams userParams 
)

Definition at line 595 of file nrn_setup.cpp.

◆ read_raster_file()

size_t coreneuron::read_raster_file ( const char *  fname,
double **  tvec,
int **  gidvec,
double  tstop 
)
static

Definition at line 100 of file patternstim.cpp.

◆ realloc_net_receive_buffer()

void coreneuron::realloc_net_receive_buffer ( NrnThread nt,
Memb_list ml 
)

Definition at line 811 of file nrn_acc_manager.cpp.

◆ register_all_variables_offsets()

void coreneuron::register_all_variables_offsets ( int  mech_id,
SerializedNames  variable_names 
)

Definition at line 58 of file mech_mapping.cpp.

◆ register_constructor()

void coreneuron::register_constructor ( mod_f_t  constructor)

Definition at line 321 of file register_mech.cpp.

◆ register_destructor()

void coreneuron::register_destructor ( mod_f_t  d)

Definition at line 325 of file register_mech.cpp.

◆ register_mech()

int coreneuron::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 at line 114 of file register_mech.cpp.

◆ register_target_type()

void coreneuron::register_target_type ( ReportConfiguration report,
ReportType  report_type 
)

Definition at line 57 of file report_configuration_parser.cpp.

◆ rendezvous_rank_get()

static void coreneuron::rendezvous_rank_get ( HAVEWANT_t data,
int  size,
HAVEWANT_t *&  sdata,
int *&  scnt,
int *&  sdispl,
HAVEWANT_t *&  rdata,
int *&  rcnt,
int *&  rdispl,
int(*)(HAVEWANT_t rendezvous_rank 
)
static

Definition at line 83 of file have2want.h.

◆ report_cell_stats()

void coreneuron::report_cell_stats ( )

Reports global cell statistics of the simulation.

This routine prints the global number of cells, synapses of the simulation

Parameters
void
Returns
void

Definition at line 30 of file nrn_stats.cpp.

◆ report_mem_usage()

void coreneuron::report_mem_usage ( const char *  message,
bool  all_ranks = false 
)

Reports current memory usage of the simulator to stdout.

Current implementation is based on mallinfo. This routine prints min, max and avg memory usage across mpi comm world

Parameters
messagestring indicating current stage of the simulation
all_ranksindicate whether to print info from all ranks
Returns
Void

Definition at line 79 of file memory_utils.cpp.

◆ second_order_cur()

void coreneuron::second_order_cur ( NrnThread _nt,
int  secondorder 
)

◆ set_an_offset()

static void coreneuron::set_an_offset ( int  mech_id,
const char *  variable_name,
int  offset 
)
static

Definition at line 35 of file mech_mapping.cpp.

◆ set_globals()

void coreneuron::set_globals ( const char *  path,
bool  cli_global_seed,
int  cli_global_seed_value 
)

Definition at line 43 of file global_vars.cpp.

◆ set_mindelay()

double coreneuron::set_mindelay ( double  maxdelay)

we have removed nt_ from PreSyn. Build local map of PreSyn and NrnThread which will be used to find out if src in same thread as NetCon

Definition at line 643 of file netpar.cpp.

◆ set_pnt_receive()

void coreneuron::set_pnt_receive ( int  type,
pnt_receive_t  pnt_receive,
pnt_receive_t  pnt_receive_init,
short  size 
)

Definition at line 75 of file register_mech.cpp.

◆ set_report_buffer_size()

void coreneuron::set_report_buffer_size ( int  n)

Definition at line 58 of file nrnreport.cpp.

◆ setup_fornetcon_info()

void coreneuron::setup_fornetcon_info ( NrnThread nt)

If FOR_NETCON in use, setup NrnThread fornetcon related info.

Definition at line 77 of file setup_fornetcon.cpp.

◆ setup_nrnthreads_on_device()

void coreneuron::setup_nrnthreads_on_device ( NrnThread threads,
int  nthreads 
)

Definition at line 466 of file nrn_acc_manager.cpp.

◆ setup_report_engine()

void coreneuron::setup_report_engine ( double  dt_report,
double  mindelay 
)

in the current implementation, we call flush during every spike exchange interval.

Hence there should be sufficient buffer to hold all reports for the duration of mindelay interval. In the below call we specify the number of timesteps that we have to buffer. TODO: revisit this because spike exchange can happen few steps before/after mindelay interval and hence adding two extra timesteps to buffer.

Definition at line 47 of file nrnreport.cpp.

◆ setup_ThreadData()

void coreneuron::setup_ThreadData ( NrnThread nt)

Definition at line 577 of file nrn_setup.cpp.

◆ setup_tree_matrix_minimal()

void * coreneuron::setup_tree_matrix_minimal ( NrnThread _nt)

Definition at line 178 of file treeset_core.cpp.

◆ setup_type2semantics()

static void coreneuron::setup_type2semantics ( )
static

Definition at line 136 of file nrn2core_data_init.cpp.

◆ soaos2cnrn_index()

int coreneuron::soaos2cnrn_index ( const std::array< int, 3 > &  soaos_indices,
const std::vector< int > &  array_dims,
int  padded_node_count,
int *  permute 
)

Compute the CoreNEURON index given an SoAoS index.

The CoreNEURON index is the index in a flat array starting from a pointer pointing to the beginning of the data of that mechanism. Note, that CoreNEURON pads to the number of instances.

If permute is not null, then the instance index i is permuted. Before computing before computing the flat index.

Consecutive array elements are always stored consecutively, next fastest index is over instances, and the slowest index runs over variables. Note, up to padding and permutation of the instances this is the same SoAoS order as in NEURON.

Definition at line 69 of file mem_layout_util.cpp.

◆ soaos_copy_cnrn2nrn()

static void coreneuron::soaos_copy_cnrn2nrn ( size_t  n,
int  stride,
double const *const  src,
std::vector< double * > &  dest,
const std::vector< int > &  array_dims,
int *  permute 
)
static

SoAoS unpermuted mechanism data copied to unpermuted SoAoS data.

This function copies the CoreNEURON SoAoS format into the NEURON format. There are two differences:

  1. NRN allocates a separate array for each variable, while CoreNEURON allocates a single large chunk of memory.
  2. CoreNEURON pads the instance number.

For ARRAY variables both NRN and CoreNRN store consecutive elements of the array consecutively in memory.

Let K be the number of variables, counting array variables as one variable. Then dest is an array of K pointers, one for each variable of the mechanism. The pointer dest[i] is an array of size n*array_dims[i] and the array element k for instance i is stored at dest[i*n + k].

The pointer src points to stride*sum(array_dims) doubles.

If permute != nullptr, then then the instance is permuted, i.e. the instance index is permute[i] in src (and i in dest). If permute == nullptr no permutation is performed.

Definition at line 116 of file core2nrn_data_return.cpp.

◆ soaos_copy_cnrn2nrn_impl()

template<bool needs_permute>
static void coreneuron::soaos_copy_cnrn2nrn_impl ( size_t  n,
int  stride,
double const *const  src,
std::vector< double * > &  dest,
const std::vector< int > &  array_dims,
int *  permute 
)
static

Definition at line 68 of file core2nrn_data_return.cpp.

◆ sparse_thread()

template<typename F >
int coreneuron::sparse_thread ( SparseObj so,
int  n,
int *  s,
int *  d,
double *  t,
double  dt,
fun,
int  linflag,
_threadargsproto_   
)

This is an experimental numerical method for SCoP-3 which integrates kinetic rate equations.

It is intended to be used only by models generated by MODL, and its identity is meant to be concealed from the user.

Parameters
nnumber of state variables
sarray of pointers to the state variables
darray of pointers to the derivatives of states
tpointer to the independent variable
dtthe time step
funcallable corresponding to the kinetic block equations
prhspointer to right hand side vector (answer on return) does not have to be allocated by caller. (this is no longer quite right)
linflagsolve as linear equations, when nonlinear, all states are forced >= 0

Definition at line 561 of file sparse_thread.hpp.

◆ spdelete()

void coreneuron::spdelete ( SPBLK n,
SPTREE q 
)

Definition at line 532 of file tqueue.cpp.

◆ spdeq()

SPBLK * coreneuron::spdeq ( SPBLK **  np)

Definition at line 325 of file tqueue.cpp.

◆ spenq()

SPBLK * coreneuron::spenq ( SPBLK n,
SPTREE q 
)

Definition at line 197 of file tqueue.cpp.

◆ sphead()

SPBLK * coreneuron::sphead ( SPTREE q)

Definition at line 503 of file tqueue.cpp.

◆ spikevec_lock()

void coreneuron::spikevec_lock ( )

Definition at line 59 of file output_spikes.cpp.

◆ spikevec_unlock()

void coreneuron::spikevec_unlock ( )

Definition at line 63 of file output_spikes.cpp.

◆ spinit()

void coreneuron::spinit ( SPTREE q)

Definition at line 180 of file tqueue.cpp.

◆ splay()

void coreneuron::splay ( SPBLK n,
SPTREE q 
)

Definition at line 402 of file tqueue.cpp.

◆ srccnt2destcnt()

static int* coreneuron::srccnt2destcnt ( int *  srccnt)
static

Definition at line 68 of file have2want.h.

◆ state_discontinuity()

void coreneuron::state_discontinuity ( int  ,
double *  pd,
double  d 
)

Definition at line 375 of file register_mech.cpp.

◆ trajectory_return()

static void coreneuron::trajectory_return ( )
static

Definition at line 387 of file main1.cpp.

◆ triang()

static void coreneuron::triang ( NrnThread _nt)
static
Todo:
OpenACC GPU offload is sequential/slow.

Because –cell-permute=0 and –gpu is forbidden anyway, no OpenMP target offload equivalent is implemented.

Definition at line 32 of file solve_core.cpp.

◆ type2OP()

static MPI_Op coreneuron::type2OP ( int  type)
static

Definition at line 292 of file mpispike.cpp.

◆ update()

void coreneuron::update ( NrnThread _nt)

Definition at line 201 of file fadvance_core.cpp.

◆ update_net_receive_buffer()

void coreneuron::update_net_receive_buffer ( NrnThread nt)

Definition at line 928 of file nrn_acc_manager.cpp.

◆ update_net_send_buffer_on_host()

void coreneuron::update_net_send_buffer_on_host ( NrnThread nt,
NetSendBuffer_t nsb 
)

Definition at line 974 of file nrn_acc_manager.cpp.

◆ update_nrnthreads_on_host()

void coreneuron::update_nrnthreads_on_host ( NrnThread threads,
int  nthreads 
)

Definition at line 1012 of file nrn_acc_manager.cpp.

◆ update_weights_from_gpu()

void coreneuron::update_weights_from_gpu ( NrnThread threads,
int  nthreads 
)

Copy weights from GPU to CPU.

User may record NetCon weights at the end of simulation. For this purpose update weights of all NrnThread objects from GPU to CPU.

Definition at line 1112 of file nrn_acc_manager.cpp.

◆ validation()

void coreneuron::validation ( std::vector< std::pair< double, int >> &  res)

Definition at line 302 of file output_spikes.cpp.

◆ vec_play_activate()

void coreneuron::vec_play_activate ( )
static

Definition at line 98 of file nrn2core_data_init.cpp.

◆ vector_capacity()

int coreneuron::vector_capacity ( IvocVect v)

Definition at line 16 of file ivocvect.cpp.

◆ vector_new()

IvocVect * coreneuron::vector_new ( int  n)

Definition at line 13 of file ivocvect.cpp.

◆ vector_new1()

IvocVect * coreneuron::vector_new1 ( int  n)

Definition at line 26 of file ivocvect.cpp.

◆ vector_vec()

double * coreneuron::vector_vec ( IvocVect v)

Definition at line 19 of file ivocvect.cpp.

◆ wait_before_spike_exchange()

void coreneuron::wait_before_spike_exchange ( )

Definition at line 78 of file mpispike.cpp.

◆ watch_activate_clear()

void coreneuron::watch_activate_clear ( )
static

Definition at line 316 of file nrn2core_data_init.cpp.

◆ watch_datum_indices()

void coreneuron::watch_datum_indices ( int  type,
int &  first,
int &  last 
)

return first and last datum indices of WATCH statements

Definition at line 299 of file nrn2core_data_init.cpp.

◆ write_mech_report()

void coreneuron::write_mech_report ( )

display global mechanism count

write mechanism counts to stdout

mechanim count across all gids, local to rank

each gid record goes on separate row, only check non-empty threads

print global stats to stdout

Definition at line 19 of file mech_report.cpp.

Variable Documentation

◆ _nrn_skip_initmodel

bool coreneuron::_nrn_skip_initmodel

Definition at line 19 of file finitialize.cpp.

◆ active_

bool coreneuron::active_ = false
static

Definition at line 83 of file netpar.cpp.

◆ bbcore_write_version

const char * coreneuron::bbcore_write_version = "1.8"

Definition at line 24 of file nrnoc_aux.cpp.

◆ byteovfl

int* coreneuron::byteovfl {nullptr}
static

Definition at line 27 of file mpispike.cpp.

◆ cellorder_nwarp

int coreneuron::cellorder_nwarp
extern

◆ celsius

double coreneuron::celsius

Definition at line 23 of file register_mech.cpp.

◆ core2nrn_clear_queues_

void(* coreneuron::core2nrn_clear_queues_) (double t) ( double  t)

Callback to clear NEURON thread queues.

In particular need to initialize bin queues to the current time before transferring events.

Definition at line 276 of file core2nrn_data_return.cpp.

◆ core2nrn_NetCon_event_

void(* coreneuron::core2nrn_NetCon_event_) (int tid, double td, size_t nc_index) ( int  tid,
double  td,
size_t  nc_index 
)

Callbacks into NEURON for queue event types.

Definition at line 437 of file core2nrn_data_return.cpp.

◆ core2nrn_PreSyn_flag_

void(* coreneuron::core2nrn_PreSyn_flag_) (int tid, std::set< int > presyns_flag_true) ( int  tid,
std::set< int >  presyns_flag_true 
)

Definition at line 461 of file core2nrn_data_return.cpp.

◆ core2nrn_SelfEvent_event_

void(* coreneuron::core2nrn_SelfEvent_event_) (int tid, double td, int tar_type, int tar_index, double flag, size_t nc_index, int is_movable) ( int  tid,
double  td,
int  tar_type,
int  tar_index,
double  flag,
size_t  nc_index,
int  is_movable 
)

Definition at line 440 of file core2nrn_data_return.cpp.

◆ core2nrn_SelfEvent_event_noweight_

void(* coreneuron::core2nrn_SelfEvent_event_noweight_) (int tid, double td, int tar_type, int tar_index, double flag, int is_movable) ( int  tid,
double  td,
int  tar_type,
int  tar_index,
double  flag,
int  is_movable 
)

Definition at line 448 of file core2nrn_data_return.cpp.

◆ core2nrn_vecplay_

void(* coreneuron::core2nrn_vecplay_) (int tid, int i_nrn, int last, int discon, int ubound) ( int  tid,
int  i_nrn,
int  last,
int  discon,
int  ubound 
)

VecPlay indices back to NEURON.

Definition at line 295 of file core2nrn_data_return.cpp.

◆ core2nrn_vecplay_events_

void(* coreneuron::core2nrn_vecplay_events_) () ( )

Definition at line 296 of file core2nrn_data_return.cpp.

◆ core2nrn_watch_activate_

void(* coreneuron::core2nrn_watch_activate_) (int tid, int type, int watch_begin, Core2NrnWatchInfo &) ( int  tid,
int  type,
int  watch_begin,
Core2NrnWatchInfo  
)

Definition at line 288 of file core2nrn_data_return.cpp.

◆ core2nrn_watch_clear_

void(* coreneuron::core2nrn_watch_clear_) () ( )

Definition at line 287 of file core2nrn_data_return.cpp.

◆ corenrn

CoreNeuron coreneuron::corenrn

Definition at line 53 of file multicore.cpp.

◆ corenrn_param

corenrn_parameters coreneuron::corenrn_param

Printing method.

Definition at line 269 of file corenrn_parameters.cpp.

◆ cvode_active_

bool coreneuron::cvode_active_

Definition at line 36 of file netcvode.cpp.

◆ diam_changed

int coreneuron::diam_changed

Definition at line 21 of file nrnoc_aux.cpp.

◆ displs

int* coreneuron::displs {nullptr}
static

Definition at line 26 of file mpispike.cpp.

◆ dt

double coreneuron::dt

Definition at line 23 of file register_mech.cpp.

◆ gid2in

std::map< int, InputPreSyn * > coreneuron::gid2in

Definition at line 160 of file nrn_setup.cpp.

◆ gid2out

std::map<int, PreSyn*> coreneuron::gid2out

Maps for ouput and input presyns.

Definition at line 159 of file nrn_setup.cpp.

◆ hoc_errno_count

int coreneuron::hoc_errno_count

Definition at line 23 of file nrnoc_aux.cpp.

◆ interleave_info

InterleaveInfo* coreneuron::interleave_info
extern

◆ interleave_permute_type

int coreneuron::interleave_permute_type
extern

◆ inv_permute_

std::vector<int>* coreneuron::inv_permute_
static

Definition at line 26 of file prcellstate.cpp.

◆ ion_global_map_member_size

const int coreneuron::ion_global_map_member_size
extern

◆ last_maxstep_arg_

double coreneuron::last_maxstep_arg_
static

Definition at line 86 of file netpar.cpp.

◆ map_nc2src

std::map<NetCon*, DiscreteEvent*> coreneuron::map_nc2src
static

Definition at line 25 of file prcellstate.cpp.

◆ max_line_length

const int coreneuron::max_line_length = 1024

Encapsulate low-level reading of coreneuron input data files.

Error handling is simple: abort()!

Reader will abort() if native integer size is not 4 bytes.

All automatic allocations performed by read_int_array() and read_dbl_array() methods use new [].

Definition at line 32 of file nrn_filehandler.hpp.

◆ mech2type

std::map<std::string, int> coreneuron::mech2type

Definition at line 33 of file mk_mech.cpp.

◆ mechanism [1/2]

const char* coreneuron::mechanism[] = {"0", "capacitance", "cm", 0, "i_cap", 0, 0}
static

Definition at line 19 of file capac.cpp.

◆ mechanism [2/2]

void(* coreneuron::mechanism[])(void) ( void  )
static
Initial value:
= {
nullptr}
void capacitance_reg(void)
Definition: capac.cpp:28
void _passive_reg(void)

Definition at line 18 of file cabvars.h.

◆ mechNamesMapping

MechNamesMapping coreneuron::mechNamesMapping
static

Definition at line 33 of file mech_mapping.cpp.

◆ mindelay_

double coreneuron::mindelay_
static

Definition at line 85 of file netpar.cpp.

◆ mut [1/2]

OMP_Mutex coreneuron::mut
static

Definition at line 154 of file nrn_setup.cpp.

◆ mut [2/2]

OMP_Mutex coreneuron::mut
static

Definition at line 48 of file output_spikes.cpp.

◆ n2v

N2V* coreneuron::n2v
static

Definition at line 29 of file global_vars.cpp.

◆ n_multisend_interval

int coreneuron::n_multisend_interval = 2

Definition at line 55 of file multisend.cpp.

◆ neg_gid2out

std::vector<std::map<int, PreSyn*> > coreneuron::neg_gid2out

Vector of maps for negative presyns.

Definition at line 157 of file nrn_setup.cpp.

◆ net_cvode_instance

NetCvode * coreneuron::net_cvode_instance

Definition at line 35 of file netcvode.cpp.

◆ netcon_in_presyn_order_

std::vector<NetCon*> coreneuron::netcon_in_presyn_order_

InputPreSyn.nc_index_ to + InputPreSyn.nc_cnt_ give the NetCon*.

Definition at line 163 of file nrn_setup.cpp.

◆ np

int coreneuron::np
static

Definition at line 25 of file mpispike.cpp.

◆ npe_

std::vector<NetParEvent> coreneuron::npe_
static

Definition at line 87 of file netpar.cpp.

◆ nrn2core_mkmech_info_

void(* coreneuron::nrn2core_mkmech_info_) (std::ostream &) ( std::ostream &  )

Definition at line 36 of file mk_mech.cpp.

◆ nrn2core_patternstim_

void(* coreneuron::nrn2core_patternstim_) (void **info) ( void **  info)

Definition at line 412 of file nrn2core_data_init.cpp.

◆ nrn2core_subworld_info_

void(* coreneuron::nrn2core_subworld_info_)(int &, int &, int &) ( int &  ,
int &  ,
int &  ,
int &  ,
int &   
)

Definition at line 36 of file utils.cpp.

◆ nrn2core_transfer_PreSyn_flag_

void(* coreneuron::nrn2core_transfer_PreSyn_flag_) (int tid, std::set< int > &presyns_flag_true) ( int  tid,
std::set< int > &  presyns_flag_true 
)

Definition at line 463 of file core2nrn_data_return.cpp.

◆ nrn2core_transfer_tqueue_

NrnCoreTransferEvents*(* coreneuron::nrn2core_transfer_tqueue_) (int tid) ( int  tid)

Pointer to function in NEURON that iterates over its tqeueue.

Definition at line 131 of file nrn2core_data_init.cpp.

◆ nrn2core_transfer_watch_

void(* coreneuron::nrn2core_transfer_watch_) (void(*cb)(int, int, int, int, int)) ( void(*)(int, int, int, int, int)  cb)

Pointer to function in NEURON that iterates over activated WATCH statements, sending each item to ...

Definition at line 35 of file nrn2core_data_init.cpp.

◆ nrn_extra_thread0_vdata

int coreneuron::nrn_extra_thread0_vdata

Definition at line 46 of file patternstim.cpp.

◆ nrn_fornetcon_cnt_

int coreneuron::nrn_fornetcon_cnt_

Definition at line 51 of file register_mech.cpp.

◆ nrn_fornetcon_index_

int * coreneuron::nrn_fornetcon_index_

Definition at line 53 of file register_mech.cpp.

◆ nrn_fornetcon_type_

int * coreneuron::nrn_fornetcon_type_

Definition at line 52 of file register_mech.cpp.

◆ nrn_have_gaps

bool coreneuron::nrn_have_gaps

variables defined in coreneuron library

Definition at line 21 of file partrans.cpp.

◆ nrn_ion_global_map

double** coreneuron::nrn_ion_global_map
extern

◆ nrn_ion_global_map_size

int coreneuron::nrn_ion_global_map_size
extern

◆ nrn_mk_transfer_thread_data_

void(* coreneuron::nrn_mk_transfer_thread_data_) () ( )

Definition at line 57 of file multicore.cpp.

◆ nrn_nobanner_

int coreneuron::nrn_nobanner_ {0}

Declaring global corenrn_parameters object for this instance of CoreNeuron.

Definition at line 270 of file corenrn_parameters.cpp.

◆ nrn_nthread

int coreneuron::nrn_nthread = 0

Definition at line 55 of file multicore.cpp.

◆ nrn_threads

NrnThread * coreneuron::nrn_threads = nullptr

Definition at line 56 of file multicore.cpp.

◆ nrn_use_bin_queue_

bool coreneuron::nrn_use_bin_queue_ = 0

Flag to use the bin queue.

Definition at line 39 of file netcvode.cpp.

◆ nrn_use_fast_imem

bool coreneuron::nrn_use_fast_imem

Definition at line 19 of file fast_imem.cpp.

◆ nrn_use_localgid_

bool coreneuron::nrn_use_localgid_
extern

◆ nrnmpi_comm

MPI_Comm coreneuron::nrnmpi_comm

Definition at line 25 of file nrnmpi.cpp.

◆ nrnmpi_myid

int coreneuron::nrnmpi_myid = 0

Definition at line 11 of file nrnmpi_def_cinc.cpp.

◆ nrnmpi_myid_

int coreneuron::nrnmpi_myid_

Definition at line 27 of file nrnmpi.cpp.

◆ nrnmpi_numprocs

int coreneuron::nrnmpi_numprocs = 1

Definition at line 10 of file nrnmpi_def_cinc.cpp.

◆ nrnmpi_numprocs_

int coreneuron::nrnmpi_numprocs_

Definition at line 26 of file nrnmpi.cpp.

◆ nrnmpi_under_nrncontrol_

bool coreneuron::nrnmpi_under_nrncontrol_ {false}
static

Definition at line 29 of file nrnmpi.cpp.

◆ nrnmpi_world_comm

MPI_Comm coreneuron::nrnmpi_world_comm

Definition at line 24 of file nrnmpi.cpp.

◆ nrnthread_chkpnt

NrnThreadChkpnt * coreneuron::nrnthread_chkpnt

Definition at line 686 of file nrn_checkpoint.cpp.

◆ nrnthreads_netcon_negsrcgid_tid

std::vector<std::vector<int> > coreneuron::nrnthreads_netcon_negsrcgid_tid

If a nrnthreads_netcon_srcgid is negative, need to determine the thread when in order to use the correct neg_gid2out[tid] map.

Companion to nrnthreads_netcon_srcgid when src gid is negative to allow determination of the NrnThread of the source PreSyn.

Definition at line 170 of file nrn_setup.cpp.

◆ nrnthreads_netcon_srcgid

std::vector<int*> coreneuron::nrnthreads_netcon_srcgid

Only for setup vector of netcon source gids.

Only for setup vector of netcon source gids and mindelay determination.

Definition at line 166 of file nrn_setup.cpp.

◆ NUM_STATS

const int coreneuron::NUM_STATS = 13

Definition at line 28 of file nrn_stats.cpp.

◆ patstimtype

int coreneuron::patstimtype

Definition at line 688 of file nrn_checkpoint.cpp.

◆ pi

double coreneuron::pi

Definition at line 23 of file register_mech.cpp.

◆ pnt2index

std::map<Point_process*, int> coreneuron::pnt2index
static

Definition at line 23 of file prcellstate.cpp.

◆ pntindex

int coreneuron::pntindex
static

Definition at line 24 of file prcellstate.cpp.

◆ rev_dt

int coreneuron::rev_dt

Definition at line 24 of file register_mech.cpp.

◆ secondorder

int coreneuron::secondorder = 0

Definition at line 22 of file register_mech.cpp.

◆ size_report_buffer

int coreneuron::size_report_buffer = 4
static

Definition at line 31 of file nrnreport.cpp.

◆ spike_type

MPI_Datatype coreneuron::spike_type
static

Definition at line 28 of file mpispike.cpp.

◆ spikevec_gid

std::vector< int > coreneuron::spikevec_gid

Definition at line 46 of file output_spikes.cpp.

◆ spikevec_time

std::vector< double > coreneuron::spikevec_time

--> Coreneuron as SpikeBuffer class

Definition at line 45 of file output_spikes.cpp.

◆ state_discon_allowed_

int coreneuron::state_discon_allowed_

Definition at line 373 of file register_mech.cpp.

◆ state_discon_flag_

int coreneuron::state_discon_flag_ = 0

Definition at line 374 of file register_mech.cpp.

◆ stoprun

bool coreneuron::stoprun

Definition at line 19 of file nrnoc_aux.cpp.

◆ structure_change_cnt

int coreneuron::structure_change_cnt
extern

◆ t

double coreneuron::t

Definition at line 23 of file register_mech.cpp.

◆ table_check_

ThreadDatum* coreneuron::table_check_
static

Definition at line 61 of file multicore.cpp.

◆ table_check_cnt_

int coreneuron::table_check_cnt_
static

--> CoreNeuron class

Definition at line 60 of file multicore.cpp.

◆ timeout_

int coreneuron::timeout_ = 0
static

Definition at line 597 of file netpar.cpp.

◆ type2invperm

std::map<int, int*> coreneuron::type2invperm

Definition at line 515 of file core2nrn_data_return.cpp.

◆ type2movable

std::unordered_map<int, int> coreneuron::type2movable
static

Definition at line 135 of file nrn2core_data_init.cpp.

◆ usable_mindelay_

double coreneuron::usable_mindelay_
static

Definition at line 84 of file netpar.cpp.

◆ use_multisend_

bool coreneuron::use_multisend_

Definition at line 53 of file multisend.cpp.

◆ use_phase2_

bool coreneuron::use_phase2_

Definition at line 54 of file multisend.cpp.

◆ use_solve_interleave

bool coreneuron::use_solve_interleave

Definition at line 13 of file solve_core.cpp.

◆ v_structure_change

int coreneuron::v_structure_change

Definition at line 20 of file nrnoc_aux.cpp.