#include <MPIOutputBuffer.h>
Public Member Functions | |
MPIOutputBufferVector (int numBuffers, vector< gl_engineid_t > &engIDs) | |
virtual | ~MPIOutputBufferVector () |
void | initialize (int minDelay, size_t maxMPIMessageSize=0, size_t spikeBufferSize=MPIBUFFER_BLOCK_SIZE) |
void * | getBaseBufferPtr () |
Return a pointer of the contiguous memory block allocated for seralized buffers. | |
void | nextCycle () |
Reinitalizes the states of all mpi output buffers so as to be prepared for the next simulation cycle. | |
void | setFinishedFlag (bool flag) |
Puts an information in the serialized buffer data that this is the last buffer for this simulation cycle. | |
MPIOutputBuffer & | operator[] (int idx) |
Returns a reference of the MPI output buffer with index idx. | |
void | startNewMPIExchange () |
void | prepareNextBufferSlices () |
MPIExchangeBlocksInfo & | getMPIExchangeBlocksInfo () |
Allocates contiguous memory space necessary to hold the mpi serialized spike data prepared for sending for all of the MPIInputBuffers in the array, and then gives equal-sized segments of this memory pool to all of the mpi input buffers. MPI input buffers then use this memory segment to store the outgoing serialized mpi data.
Definition at line 131 of file MPIOutputBuffer.h.
MPIOutputBufferVector::MPIOutputBufferVector | ( | int | numBuffers, | |
vector< gl_engineid_t > & | engIDs | |||
) |
Constructs vector of buffers with size numBuffers, and segment buffer block size of buffer_size.
numBuffers | the size of the array of mpi output buffers. | |
engIDs | array giving the global engine ids of local single thread engines. |
Definition at line 156 of file MPIOutputBuffer.cpp.
MPIOutputBufferVector::~MPIOutputBufferVector | ( | ) | [virtual] |
Definition at line 162 of file MPIOutputBuffer.cpp.
void MPIOutputBufferVector::initialize | ( | int | minDelay, | |
size_t | maxMPIMessageSize = 0 , |
|||
size_t | spikeBufferSize = MPIBUFFER_BLOCK_SIZE | |||
) |
Definition at line 169 of file MPIOutputBuffer.cpp.
References MPIExchangeBlocksInfo::getMsgSpec(), and nextCycle().
Referenced by DistributedSingleThreadNetwork::_initialize_(), and DistributedMultiThreadNetwork::_initialize_().
void* MPIOutputBufferVector::getBaseBufferPtr | ( | ) | [inline] |
Return a pointer of the contiguous memory block allocated for seralized buffers.
Definition at line 151 of file MPIOutputBuffer.h.
Referenced by MPIDefaultAllToAllCommunicator::doExchangeAlgorithm().
void MPIOutputBufferVector::nextCycle | ( | ) | [inline] |
Reinitalizes the states of all mpi output buffers so as to be prepared for the next simulation cycle.
Definition at line 157 of file MPIOutputBuffer.h.
Referenced by DistributedMultiThreadNetwork::_reset_(), MPIAllToAllCommunicator::doAllToAllExchange(), and initialize().
void MPIOutputBufferVector::setFinishedFlag | ( | bool | flag | ) | [inline] |
Puts an information in the serialized buffer data that this is the last buffer for this simulation cycle.
Definition at line 165 of file MPIOutputBuffer.h.
Referenced by MPISynchroShuffleAllToAllComm::doExchangeAlgorithm(), and MPIDefaultAllToAllCommunicator::doExchangeAlgorithm().
MPIOutputBuffer& MPIOutputBufferVector::operator[] | ( | int | idx | ) | [inline] |
Returns a reference of the MPI output buffer with index idx.
Definition at line 173 of file MPIOutputBuffer.h.
void MPIOutputBufferVector::startNewMPIExchange | ( | ) |
Definition at line 199 of file MPIOutputBuffer.cpp.
Referenced by MPIAllToAllCommunicator::doAllToAllExchange().
void MPIOutputBufferVector::prepareNextBufferSlices | ( | ) |
Definition at line 207 of file MPIOutputBuffer.cpp.
Referenced by MPIAllToAllCommunicator::doAllToAllExchange().
MPIExchangeBlocksInfo & MPIOutputBufferVector::getMPIExchangeBlocksInfo | ( | ) |
Definition at line 215 of file MPIOutputBuffer.cpp.
Referenced by MPISynchroShuffleAllToAllComm::doExchangeAlgorithm(), and MPIDefaultAllToAllCommunicator::doExchangeAlgorithm().