#include <MPIInputSpikeBuffer.h>
Public Types | |
typedef MPIInputSpikeBufferIterator< T > | const_iterator |
The iterator type for the mpi input buffer. | |
typedef MPIInputSpikeBufferElement | value_type |
The type of the "virtual" values stored in the buffer, that are accessed through the iterator. | |
typedef T | coding_element_type |
Type of the elements in the serialized raw spike data. | |
Public Member Functions | |
MPIInputSpikeBuffer () | |
Constructor. | |
virtual | ~MPIInputSpikeBuffer () |
void | initialize (T *buffer) |
const_iterator | begin () |
Provides an iterator pointing at the first MPIInputSpikeBufferElement. | |
const_iterator | end () |
Provides an iterator pointing at the last MPIInputSpikeBufferElement. | |
T * | getBuffer () |
Get the buffer in a serialized raw form. | |
int & | getLength () |
bool | isLastReceivedBuffer () |
Checks if this is the last received buffer from the node associated with the buffer. | |
void | setHasNewContent (bool indicator) |
bool | hasNewContent () |
Public Attributes | |
T | guard_value |
guard/marker value used to separate segments in the serialized spike data. | |
Protected Attributes | |
bool | contentIndicator |
T * | _buffer |
Pointer to the serialized data received through MPI. | |
int | len |
Length of the serialized data in _buffer. | |
Friends | |
class | MPIInputSpikeBufferIterator< T > |
class | MPIInputSpikeBufferVector< T > |
It is used by MPIAlltoAllCommunicator to store the received data from other nodes, and by the DistributedIncomingSpikeScheduler which iterates through the spikes and schedules them to the appropriate propagated spike buffers.
To access iteratively the individual spikes, an iterator-like interface MPIInputSpikeBufferIterator is provided.
Definition at line 102 of file MPIInputSpikeBuffer.h.
typedef MPIInputSpikeBufferIterator<T> MPIInputSpikeBuffer< T >::const_iterator |
typedef MPIInputSpikeBufferElement MPIInputSpikeBuffer< T >::value_type |
The type of the "virtual" values stored in the buffer, that are accessed through the iterator.
Definition at line 109 of file MPIInputSpikeBuffer.h.
typedef T MPIInputSpikeBuffer< T >::coding_element_type |
Type of the elements in the serialized raw spike data.
Can be short int or long int
Definition at line 116 of file MPIInputSpikeBuffer.h.
MPIInputSpikeBuffer< T >::MPIInputSpikeBuffer | ( | ) | [inline] |
Constructor.
Definition at line 289 of file MPIInputSpikeBuffer.h.
References MPIInputSpikeBuffer< T >::_buffer, MPIInputSpikeBuffer< T >::guard_value, and MPIInputSpikeBuffer< T >::len.
MPIInputSpikeBuffer< T >::~MPIInputSpikeBuffer | ( | ) | [inline, virtual] |
Definition at line 301 of file MPIInputSpikeBuffer.h.
void MPIInputSpikeBuffer< T >::initialize | ( | T * | buffer | ) | [inline] |
Definition at line 129 of file MPIInputSpikeBuffer.h.
References MPIInputSpikeBuffer< T >::_buffer, and MPIInputSpikeBuffer< T >::contentIndicator.
Referenced by MPIInputBuffer::initialize().
MPIInputSpikeBuffer< T >::const_iterator MPIInputSpikeBuffer< T >::begin | ( | ) | [inline] |
Provides an iterator pointing at the first MPIInputSpikeBufferElement.
Definition at line 306 of file MPIInputSpikeBuffer.h.
References MPIInputSpikeBuffer< T >::_buffer, MPIInputSpikeBufferIterator< T >::curr_pos, MPIInputSpikeBufferIterator< T >::elem, MPIInputSpikeBufferElement::engine, MPIInputSpikeBufferIterator< T >::len, MPIInputSpikeBuffer< T >::len, MPIInputSpikeBufferElement::oid, MPIInputSpikeBufferIterator< T >::pbuf, and MPIInputSpikeBufferElement::timestamp.
MPIInputSpikeBuffer< T >::const_iterator MPIInputSpikeBuffer< T >::end | ( | ) | [inline] |
Provides an iterator pointing at the last MPIInputSpikeBufferElement.
Definition at line 325 of file MPIInputSpikeBuffer.h.
References MPIInputSpikeBuffer< T >::_buffer, MPIInputSpikeBufferIterator< T >::curr_pos, MPIInputSpikeBuffer< T >::len, and MPIInputSpikeBufferIterator< T >::pbuf.
T * MPIInputSpikeBuffer< T >::getBuffer | ( | ) | [inline] |
Get the buffer in a serialized raw form.
Definition at line 334 of file MPIInputSpikeBuffer.h.
References MPIInputSpikeBuffer< T >::_buffer.
int & MPIInputSpikeBuffer< T >::getLength | ( | ) | [inline] |
bool MPIInputSpikeBuffer< T >::isLastReceivedBuffer | ( | ) | [inline] |
Checks if this is the last received buffer from the node associated with the buffer.
Used to detect whether the all-to-all exchange iterations are over or there are more steps to be performed.
Definition at line 346 of file MPIInputSpikeBuffer.h.
References MPIInputSpikeBuffer< T >::_buffer.
Referenced by MPIInputBuffer::hasNextBufferSlice().
void MPIInputSpikeBuffer< T >::setHasNewContent | ( | bool | indicator | ) | [inline] |
Definition at line 156 of file MPIInputSpikeBuffer.h.
References MPIInputSpikeBuffer< T >::contentIndicator.
Referenced by MPIInputBuffer::setHasNewContent().
bool MPIInputSpikeBuffer< T >::hasNewContent | ( | ) | [inline] |
Definition at line 161 of file MPIInputSpikeBuffer.h.
References MPIInputSpikeBuffer< T >::contentIndicator.
friend class MPIInputSpikeBufferIterator< T > [friend] |
Definition at line 175 of file MPIInputSpikeBuffer.h.
friend class MPIInputSpikeBufferVector< T > [friend] |
Definition at line 176 of file MPIInputSpikeBuffer.h.
T MPIInputSpikeBuffer< T >::guard_value |
guard/marker value used to separate segments in the serialized spike data.
Definition at line 119 of file MPIInputSpikeBuffer.h.
Referenced by MPIInputSpikeBuffer< T >::MPIInputSpikeBuffer().
bool MPIInputSpikeBuffer< T >::contentIndicator [protected] |
Definition at line 163 of file MPIInputSpikeBuffer.h.
Referenced by MPIInputSpikeBuffer< T >::hasNewContent(), MPIInputSpikeBuffer< T >::initialize(), and MPIInputSpikeBuffer< T >::setHasNewContent().
T* MPIInputSpikeBuffer< T >::_buffer [protected] |
Pointer to the serialized data received through MPI.
Definition at line 170 of file MPIInputSpikeBuffer.h.
Referenced by MPIInputSpikeBuffer< T >::begin(), MPIInputSpikeBuffer< T >::end(), MPIInputSpikeBuffer< T >::getBuffer(), MPIInputSpikeBuffer< T >::initialize(), MPIInputSpikeBuffer< T >::isLastReceivedBuffer(), and MPIInputSpikeBuffer< T >::MPIInputSpikeBuffer().
int MPIInputSpikeBuffer< T >::len [protected] |
Length of the serialized data in _buffer.
Definition at line 173 of file MPIInputSpikeBuffer.h.
Referenced by MPIInputSpikeBuffer< T >::begin(), MPIInputSpikeBuffer< T >::end(), MPIInputSpikeBuffer< T >::getLength(), and MPIInputSpikeBuffer< T >::MPIInputSpikeBuffer().