PetaVision  Alpha
PV::Publisher Class Reference

Public Member Functions

 Publisher (MPIBlock const &mpiBlock, PVLayerCube *cube, int numLevels, bool isSparse)
void checkpointDataStore (Checkpointer *checkpointer, char const *objectName, char const *bufferName)
void copyForward (double lastUpdateTime)
PVLayerCube createCube (int delay=0)
int exchangeBorders (const PVLayerLoc *loc, int delay=0)
void increaseTimeLevel ()
int isExchangeFinished (int delay=0)
int publish (double lastUpdateTime)
int updateActiveIndices (int delay=0)
int updateAllActiveIndices ()
int wait (int delay=0)

Private Member Functions

SparseList< float >::Entry * recvActiveIndicesBuffer (int bufferId)
SparseList< float >::Entry * recvActiveIndicesBuffer (int bufferId, int delay)
float * recvBuffer (int bufferId)
float * recvBuffer (int bufferId, int delay)
long * recvNumActiveBuffer (int bufferId)
long * recvNumActiveBuffer (int bufferId, int delay)

Private Attributes

BorderExchangemBorderExchanger = nullptr
RingBuffer< std::vector< MPI_Request > > * mpiRequestsBuffer = nullptr
MPI_Datatype * neighborDatatypes

Detailed Description

Definition at line 21 of file Publisher.hpp.

Member Function Documentation

void PV::Publisher::copyForward ( double  lastUpdateTime)

Keeps the data store in sync if the time advances but the data doesn't change. If the number of levels is greater than one, copy the previous level to the current level; otherwise do nothing. Using this instead of publish() avoids an unnecessary border exchange.

Definition at line 103 of file Publisher.cpp.

PVLayerCube PV::Publisher::createCube ( int  delay = 0)

creates a PVLayerCube pointing to the data in the data store at the given delay. This method blocks until any pending border exchange for that delay level are completed.

Definition at line 61 of file Publisher.cpp.

int PV::Publisher::publish ( double  lastUpdateTime)

Copies the data from the cube to the top level of the data store, and exchanges the border.

Definition at line 79 of file Publisher.cpp.

int PV::Publisher::wait ( int  delay = 0)

wait until all outstanding published messages have arrived

Definition at line 168 of file Publisher.cpp.

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