MPIOutputSpikeBufferVector< T > Class Template Reference

An Array of MPIOutputSpikeBuffers. More...

#include <MPIOutputSpikeBuffer.h>

Collaboration diagram for MPIOutputSpikeBufferVector< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MPIOutputSpikeBufferVector (int numBuffers, vector< gl_engineid_t > &engIDs, size_t buffer_size=MPIBUFFER_BLOCK_SIZE)
 ~MPIOutputSpikeBufferVector ()
T * getBuffersPool ()
 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.
MPIOutputSpikeBuffer< T > & operator[] (int idx)
 Returns a reference of the MPI output buffer with index idx.


Detailed Description

template<typename T = unsigned short>
class MPIOutputSpikeBufferVector< T >

An Array of MPIOutputSpikeBuffers.

Allocates contiguous memory space necessary to hold the mpi serialized spike data prepared for sending for all of the MPIInputSpikeBuffers 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.

See also:
MPIOutputSpikeBuffer

Definition at line 151 of file MPIOutputSpikeBuffer.h.


Constructor & Destructor Documentation

template<typename T>
MPIOutputSpikeBufferVector< T >::MPIOutputSpikeBufferVector ( int  numBuffers,
vector< gl_engineid_t > &  engIDs,
size_t  buffer_size = MPIBUFFER_BLOCK_SIZE 
) [inline]

Constructs vector of buffers with size numBuffers, and segment buffer block size of buffer_size.

Parameters:
numBuffers the size of the array of mpi output buffers.
engIDs array giving the global engine ids of local single thread engines.
buffer_size size of the each individual buffer's memory block which is used to store the serialized spike data to send via MPI.

Definition at line 408 of file MPIOutputSpikeBuffer.h.

References MPIOutputSpikeBufferVector< T >::nextCycle().

Here is the call graph for this function:

template<typename T>
MPIOutputSpikeBufferVector< T >::~MPIOutputSpikeBufferVector (  )  [inline]

Definition at line 428 of file MPIOutputSpikeBuffer.h.


Member Function Documentation

template<typename T = unsigned short>
T* MPIOutputSpikeBufferVector< T >::getBuffersPool (  )  [inline]

Return a pointer of the contiguous memory block allocated for seralized buffers.

Definition at line 169 of file MPIOutputSpikeBuffer.h.

template<typename T = unsigned short>
void MPIOutputSpikeBufferVector< T >::nextCycle (  )  [inline]

Reinitalizes the states of all mpi output buffers so as to be prepared for the next simulation cycle.

Definition at line 175 of file MPIOutputSpikeBuffer.h.

Referenced by MPIOutputSpikeBufferVector< T >::MPIOutputSpikeBufferVector().

template<typename T = unsigned short>
void MPIOutputSpikeBufferVector< T >::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 183 of file MPIOutputSpikeBuffer.h.

template<typename T = unsigned short>
MPIOutputSpikeBuffer<T>& MPIOutputSpikeBufferVector< T >::operator[] ( int  idx  )  [inline]

Returns a reference of the MPI output buffer with index idx.

Definition at line 191 of file MPIOutputSpikeBuffer.h.


The documentation for this class was generated from the following file:

Generated on Wed Jul 9 16:34:51 2008 for PCSIM by  doxygen 1.5.5