#include <MPIBufferSlicer.h>
Public Types | |
enum | MPIBufferType { tpOutputBuffer, tpInputBuffer } |
enum | SliceType { sliceAnalog, sliceMixed, sliceSpiking, sliceUndefined } |
Public Member Functions | |
MPIBufferSlicer (MPIBufferType bufferType) | |
void | initialize (size_t analogBufferSize, size_t maxMPIMsgSize=0, size_t spikeBufferSize=MPIBUFFER_BLOCK_SIZE) |
virtual | ~MPIBufferSlicer () |
void | reset () |
void | calcNextBufferSliceDimensions () |
Public Attributes | |
size_t | currentSlicePos |
variables for definition of current slice | |
int | currentAnalogSliceSize |
size_t | allowedSpikeSliceSize |
Allowed size of the spike portion of the slice in bytes. | |
SliceType | currentSliceType |
bool | thereIsMixedDataType |
Protected Attributes | |
MPIBufferType | buffer_type |
void * | analog_buf |
void * | spike_buf |
size_t | spike_buffer_size_elements |
size_t | spike_buffer_size_bytes |
size_t | analog_buffer_size_elements |
size_t | analog_buffer_size_bytes |
size_t | max_mpi_msg_size |
Definition at line 17 of file MPIBufferSlicer.h.
Definition at line 35 of file MPIBufferSlicer.h.
MPIBufferSlicer::MPIBufferSlicer | ( | MPIBufferType | bufferType | ) |
Definition at line 10 of file MPIBufferSlicer.cpp.
virtual MPIBufferSlicer::~MPIBufferSlicer | ( | ) | [inline, virtual] |
Definition at line 29 of file MPIBufferSlicer.h.
void MPIBufferSlicer::initialize | ( | size_t | analogBufferSize, | |
size_t | maxMPIMsgSize = 0 , |
|||
size_t | spikeBufferSize = MPIBUFFER_BLOCK_SIZE | |||
) |
Definition at line 14 of file MPIBufferSlicer.cpp.
References analog_buffer_size_bytes, analog_buffer_size_elements, max_mpi_msg_size, MIN_MPI_SPIKE_BUFFER_SIZE, spike_buffer_size_bytes, spike_buffer_size_elements, and thereIsMixedDataType.
Referenced by MPIOutputBuffer::initialize(), and MPIInputBuffer::initialize().
void MPIBufferSlicer::reset | ( | ) |
Definition at line 42 of file MPIBufferSlicer.cpp.
References currentSliceType, and sliceUndefined.
Referenced by MPIOutputBuffer::startNewMPIExchange(), and MPIInputBuffer::startNewMPIExchange().
void MPIBufferSlicer::calcNextBufferSliceDimensions | ( | ) |
Definition at line 47 of file MPIBufferSlicer.cpp.
References allowedSpikeSliceSize, analog_buffer_size_bytes, analog_buffer_size_elements, currentAnalogSliceSize, currentSlicePos, currentSliceType, max_mpi_msg_size, min, sliceAnalog, sliceMixed, sliceSpiking, sliceUndefined, spike_buffer_size_bytes, and thereIsMixedDataType.
Referenced by MPIOutputBuffer::prepareNextBufferSlice(), and MPIInputBuffer::prepareNextBufferSlice().
variables for definition of current slice
Number of bytes after the base pointer of the buffer;
Definition at line 46 of file MPIBufferSlicer.h.
Referenced by calcNextBufferSliceDimensions(), MPIOutputBuffer::prepareNextBufferSlice(), and MPIInputBuffer::prepareNextBufferSlice().
The size is in bytes. Makes sense only in analog and mixed slices.
Definition at line 53 of file MPIBufferSlicer.h.
Referenced by calcNextBufferSliceDimensions(), MPIOutputBuffer::prepareNextBufferSlice(), and MPIInputBuffer::prepareNextBufferSlice().
Allowed size of the spike portion of the slice in bytes.
Makes sense only for mixed and spiking type of slices. This is only the limit. The actual size of the spiking portion is given by the output spike buffer after serializing the data.
Definition at line 61 of file MPIBufferSlicer.h.
Referenced by calcNextBufferSliceDimensions(), and MPIOutputBuffer::prepareNextBufferSlice().
Definition at line 63 of file MPIBufferSlicer.h.
Referenced by calcNextBufferSliceDimensions(), MPIOutputBuffer::hasNextBufferSlice(), MPIInputBuffer::hasNextBufferSlice(), MPIOutputBuffer::prepareNextBufferSlice(), MPIInputBuffer::prepareNextBufferSlice(), and reset().
Definition at line 65 of file MPIBufferSlicer.h.
Referenced by calcNextBufferSliceDimensions(), MPIOutputBuffer::initialize(), MPIInputBuffer::initialize(), initialize(), MPIInputBuffer::~MPIInputBuffer(), and MPIOutputBuffer::~MPIOutputBuffer().
MPIBufferType MPIBufferSlicer::buffer_type [protected] |
Definition at line 69 of file MPIBufferSlicer.h.
void* MPIBufferSlicer::analog_buf [protected] |
Definition at line 71 of file MPIBufferSlicer.h.
void* MPIBufferSlicer::spike_buf [protected] |
Definition at line 73 of file MPIBufferSlicer.h.
size_t MPIBufferSlicer::spike_buffer_size_elements [protected] |
size_t MPIBufferSlicer::spike_buffer_size_bytes [protected] |
Definition at line 77 of file MPIBufferSlicer.h.
Referenced by calcNextBufferSliceDimensions(), and initialize().
size_t MPIBufferSlicer::analog_buffer_size_elements [protected] |
Definition at line 79 of file MPIBufferSlicer.h.
Referenced by calcNextBufferSliceDimensions(), and initialize().
size_t MPIBufferSlicer::analog_buffer_size_bytes [protected] |
Definition at line 81 of file MPIBufferSlicer.h.
Referenced by calcNextBufferSliceDimensions(), and initialize().
size_t MPIBufferSlicer::max_mpi_msg_size [protected] |
Definition at line 83 of file MPIBufferSlicer.h.
Referenced by calcNextBufferSliceDimensions(), and initialize().