72 #define PHASE2BUFFER_SIZE 2048
73 #define PHASE2BUFFER_MASK (PHASE2BUFFER_SIZE - 1)
80 #define MULTISEND_RECEIVEBUFFER_SIZE 10000
86 void incoming(
int gid,
double spiketime);
93 int nsend_{}, nrecv_{};
99 InputPreSyn** psbuf_{};
108 #define MULTISEND_INTERVAL 2
111 #if MULTISEND_INTERVAL == 2
116 static int* targets_phase1_;
117 static int* targets_phase2_;
120 int i = ps->multisend_index_;
124 int* ranks = targets_phase1_ +
i;
126 int cnt_phase1 = ranks[1];
137 nrnmpi_multisend(&spk, cnt_phase1, ranks);
144 static void multisend_send_phase2(InputPreSyn* ps,
int gid,
double t) {
145 int i = ps->multisend_phase2_index_;
148 int* ranks = targets_phase2_ +
i;
149 int cnt_phase2 = ranks[0];
154 nrnmpi_multisend(&spk, cnt_phase2, ranks);
163 new InputPreSyn*[size_]
230 InputPreSyn* ps = gid2in_it->second;
232 if (
use_phase2_ && ps->multisend_phase2_index_ >= 0) {
255 void Multisend_ReceiveBuffer::enqueue1() {
265 InputPreSyn* ps = gid2in_it->second;
267 if (
use_phase2_ && ps->multisend_phase2_index_ >= 0) {
280 void Multisend_ReceiveBuffer::enqueue2() {
333 #if MULTISEND_INTERVAL == 2
363 #if NRN_MULTISEND & 1
398 #if MULTISEND_INTERVAL == 2
408 if (targets_phase1_) {
409 delete[] targets_phase1_;
410 targets_phase1_ =
nullptr;
413 if (targets_phase2_) {
414 delete[] targets_phase2_;
415 targets_phase2_ =
nullptr;
446 #if MULTISEND_INTERVAL == 2
static void nrnmpi_barrier()
void incoming(int gid, double spiketime)
Multisend_ReceiveBuffer()
virtual ~Multisend_ReceiveBuffer()
Phase2Buffer * phase2_buffer_
virtual void send(double sendtime, NetCvode *, NrnThread *)
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
void nrn_multisend_send(PreSyn *, double t, NrnThread *)
std::map< int, InputPreSyn * > gid2in
void nrn_multisend_receive(NrnThread *)
void nrn_multisend_setup_targets(bool use_phase2, int *&targets_phase1, int *&targets_phase2)
void nrn_multisend_advance()
NetCvode * net_cvode_instance
#define nrn_assert(x)
assert()-like macro, independent of NDEBUG status
#define MULTISEND_RECEIVEBUFFER_SIZE
void nrn_multisend_setup()
static Multisend_ReceiveBuffer * multisend_receive_buffer[2]
void nrnmpi_multisend_comm()
#define PHASE2BUFFER_MASK
static void nrn_multisend_init()
int nrnmpi_multisend_single_advance(NRNMPI_Spike *)
static void nrn_multisend_cleanup()
static int multisend_advance()
static int max_multisend_targets
static unsigned long enq2_enqueue_time_
int nrnmpi_multisend_conserve(int nsend, int nrecv)
static int max_ntarget_host
static unsigned long enq2_find_time_
if(n_multisend_interval==2)
multisend_receive_buffer[current_rbuf] phase2_nsend_
multisend_receive_buffer[current_rbuf] enqueue()
multisend_receive_buffer[current_rbuf] phase2_nsend_cell_
#define PHASE2BUFFER_SIZE
static int n_multisend_interval
Represent main neuron object computed by single thread.