31 #define SYNCBUFFER_SIZE_MARGIN_MULTIPLIER 5 32 #define SYNCBUFFER_SIZE_HIST_LEN 512 38 #define SYNCBUFFER_DELTA_DATATYPE NeuronID 45 #ifdef AURYN_CODE_USE_MPI 47 #include <boost/mpi.hpp> 60 std::vector<NeuronID> send_buf;
61 std::vector<NeuronID> recv_buf;
64 unsigned int overflow_counter;
69 unsigned int sync_counter;
73 int * rank_recv_count;
79 mpi::communicator * mpicom;
88 unsigned int * pop_offsets;
90 void reset_send_buffer();
91 void resize_buffers(
unsigned int send_size);
96 void update_send_recv_counts();
97 int compute_buffer_margin(
int n,
int sum,
int sum2);
98 int compute_buffer_size_with_margin(
int n,
int sum,
int sum2);
107 void sync_allgatherv();
110 void sync_allgather();
141 #ifdef CODE_COLLECT_SYNC_TIMING_STATS 147 void reset_sync_time();
152 #endif // AURYN_CODE_USE_MPI void push(SpikeDelay *delay, const NeuronID size)
Pushes a spike delay with all its spikes to the SyncBuffer.
Definition: SyncBuffer.cpp:101
double AurynDouble
Higher precision floating point datatype.
Definition: auryn_definitions.h:158
Delay object for spikes which is synchronized between nodes using the SyncBuffer formalism implemente...
Definition: SpikeDelay.h:47
int n
Definition: mkpat.py:5
Definition: ABSConnection.h:38
void sync()
Synchronize spikes and additional information across ranks.
Definition: SyncBuffer.cpp:500
unsigned int get_sync_count()
Return sync count since object instantiation.
Definition: SyncBuffer.cpp:541
void pop(SpikeDelay *delay, const NeuronID size)
Rerieves a spike delay with all its spikes from the SyncBuffer.
Definition: SyncBuffer.cpp:185
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
SyncBuffer(mpi::communicator *com)
The default contructor.
Definition: SyncBuffer.cpp:32
unsigned int get_overflow_count()
Return overflow count since object instantiation.
Definition: SyncBuffer.cpp:536
Buffer object to capsulate native MPI_Allgather for SpikingGroups.
Definition: SyncBuffer.h:57
void null_terminate_send_buffer()
Terminate send buffer.
Definition: SyncBuffer.cpp:154
#define SYNCBUFFER_DELTA_DATATYPE
Datatype used for delta computation should be a "long" for large nets with sparse activity otherwise ...
Definition: SyncBuffer.h:38
virtual ~SyncBuffer()
The default destructor.
Definition: SyncBuffer.cpp:38
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
int get_max_send_buffer_size()
Return max_send_size value which determines the size of the MPI AllGather operation.
Definition: SyncBuffer.cpp:531