MPIInputSpikeBufferVector< T > Class Template Reference

An Array of MPIInputSpikeBuffers. More...

#include <MPIInputSpikeBuffer.h>

Collaboration diagram for MPIInputSpikeBufferVector< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MPIInputSpikeBufferVector (int numBuffers, size_t buf_size=MPIBUFFER_BLOCK_SIZE)
 Constructor.
virtual ~MPIInputSpikeBufferVector ()
MPIInputSpikeBuffer< T > & operator[] (int idx)
 References the idx MPIInputSpikeBuffer in the array.
T * getBuffersPool ()
 Gives a pointer of the allocated space for the buffers. [used for testing only].
unsigned int size ()
 Returns the number of MPIInputSpikeBuffers in the array.

Protected Attributes

int nNodes
 Number of mpi input buffers in the vector (equals to number of mpi nodes).
size_t _buf_size
 Size of the memory block to store the serialized data in incoming mpi messages.
vector< MPIInputSpikeBuffer< T > > _buffers
 vector of all MPIInputSpikeBuffers
T * inputBuffersPool
 The allocated contiguous memory block.


Detailed Description

template<class T = unsigned short>
class MPIInputSpikeBufferVector< T >

An Array of MPIInputSpikeBuffers.

Allocates contiguous memory space necessary to hold the received mpi serialized spike data 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 received mpi data.

See also:
MPIInputSpikeBuffer

Definition at line 191 of file MPIInputSpikeBuffer.h.


Constructor & Destructor Documentation

template<typename T>
MPIInputSpikeBufferVector< T >::MPIInputSpikeBufferVector ( int  numBuffers,
size_t  buf_size = MPIBUFFER_BLOCK_SIZE 
) [inline]

Constructor.

Parameters:
numBuffers number of MPIInputSpikeBuffers to create in the array.
buf_size size of the memory block to store the serialized data in incoming mpi messages.

Definition at line 352 of file MPIInputSpikeBuffer.h.

References MPIInputSpikeBufferVector< T >::_buffers, MPIInputSpikeBufferVector< T >::inputBuffersPool, and MPIInputSpikeBufferVector< T >::nNodes.

template<class T = unsigned short>
virtual MPIInputSpikeBufferVector< T >::~MPIInputSpikeBufferVector (  )  [inline, virtual]


Member Function Documentation

template<class T = unsigned short>
MPIInputSpikeBuffer<T>& MPIInputSpikeBufferVector< T >::operator[] ( int  idx  )  [inline]

References the idx MPIInputSpikeBuffer in the array.

Definition at line 208 of file MPIInputSpikeBuffer.h.

References MPIInputSpikeBufferVector< T >::_buffers.

template<class T = unsigned short>
T* MPIInputSpikeBufferVector< T >::getBuffersPool (  )  [inline]

Gives a pointer of the allocated space for the buffers. [used for testing only].

Definition at line 214 of file MPIInputSpikeBuffer.h.

References MPIInputSpikeBufferVector< T >::inputBuffersPool.

template<class T = unsigned short>
unsigned int MPIInputSpikeBufferVector< T >::size (  )  [inline]

Returns the number of MPIInputSpikeBuffers in the array.

Definition at line 220 of file MPIInputSpikeBuffer.h.

References MPIInputSpikeBufferVector< T >::nNodes.


Member Data Documentation

template<class T = unsigned short>
int MPIInputSpikeBufferVector< T >::nNodes [protected]

Number of mpi input buffers in the vector (equals to number of mpi nodes).

Definition at line 227 of file MPIInputSpikeBuffer.h.

Referenced by MPIInputSpikeBufferVector< T >::MPIInputSpikeBufferVector(), and MPIInputSpikeBufferVector< T >::size().

template<class T = unsigned short>
size_t MPIInputSpikeBufferVector< T >::_buf_size [protected]

Size of the memory block to store the serialized data in incoming mpi messages.

Definition at line 230 of file MPIInputSpikeBuffer.h.

template<class T = unsigned short>
vector<MPIInputSpikeBuffer<T> > MPIInputSpikeBufferVector< T >::_buffers [protected]

vector of all MPIInputSpikeBuffers

Definition at line 233 of file MPIInputSpikeBuffer.h.

Referenced by MPIInputSpikeBufferVector< T >::MPIInputSpikeBufferVector(), and MPIInputSpikeBufferVector< T >::operator[]().

template<class T = unsigned short>
T* MPIInputSpikeBufferVector< T >::inputBuffersPool [protected]


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