PPL Logo

MeshStreamer< dtype > Class Template Reference

#include <MeshStreamer.h>

Inheritance diagram for MeshStreamer< dtype >:

Inheritance graph
[legend]
Collaboration diagram for MeshStreamer< dtype >:

Collaboration graph
[legend]

Public Member Functions

 MeshStreamer (int totalBufferCapacity, int numRows, int numColumns, int numPlanes, const CProxy_MeshStreamerClient< dtype > &clientProxy, int yieldFlag=0, double progressPeriodInMs=-1.0)
 ~MeshStreamer ()
void insertData (dtype &dataItem, const int destinationPe)
void doneInserting ()
void receiveAggregateData (MeshStreamerMessage< dtype > *msg)
void flushBuckets (MeshStreamerMessage< dtype > **messageBuffers, const int numBuffers)
void flushDirect ()
bool isPeriodicFlushEnabled ()
void associateCallback (CkCallback &cb, bool automaticFinish=true)
void registerPeriodicProgressFunction ()
void finish (CkReductionMsg *msg)
void enablePeriodicFlushing ()
 MeshStreamer ()
 MeshStreamer (CkMigrateMessage *)
 MeshStreamer (int maxNumDataItemsBuffered, int numDimensions, int *dimensionSizes, int bufferSize, bool yieldFlag=0, double progressPeriodInMs=-1.0)
void receiveAlongRoute (MeshStreamerMessage< dtype > *msg)
void enablePeriodicFlushing ()
void finish ()
void init (int numLocalContributors, CkCallback startCb, CkCallback endCb, int prio, bool usePeriodicFlushing)
void init (int numContributors, CkCallback startCb, CkCallback endCb, CProxy_CompletionDetector detector, int prio, bool usePeriodicFlushing)
void init (CkArrayID senderArrayID, CkCallback startCb, CkCallback endCb, int prio, bool usePeriodicFlushing)
void init (CkCallback startCb, int prio)
void syncInit ()
virtual void receiveAtDestination (MeshStreamerMessage< dtype > *msg)
void flushIfIdle ()
bool isPeriodicFlushEnabled ()
virtual void insertData (const dtype &dataItem, int destinationPe)
virtual void broadcast (const dtype &dataItem)
void sendMeshStreamerMessage (MeshStreamerMessage< dtype > *destinationBuffer, int dimension, int destinationIndex)
void registerPeriodicProgressFunction ()
void done (int numContributorsFinished=1)
void startStagedCompletion ()
void markMessageReceived (int msgType, int finalCount)
bool checkAllStagesCompleted ()
void checkForCompletedStages ()
virtual void pup (PUP::er &p)

Protected Member Functions

virtual int copyDataItemIntoMessage (MeshStreamerMessage< dtype > *destinationBuffer, const void *dataItemHandle, bool copyIndirectly=false)
void insertData (const void *dataItemHandle, int destinationPe)
void broadcast (const void *dataItemHandle, int dimension, bool copyIndirectly)
void storeMessage (int destinationPe, const Route &destinationCoordinates, const void *dataItem, bool copyIndirectly=false)
void ctorHelper (int maxNumDataItemsBuffered, int numDimensions, int *dimensionSizes, int bufferSize, bool yieldFlag, double progressPeriodInMs)

Protected Attributes

RouterType myRouter_
int numMembers_
int myIndex_
int numDimensions_
bool useStagedCompletion_
bool stagedCompletionStarted_
bool useCompletionDetection_
CompletionDetectordetectorLocalObj_

Private Member Functions

void determineLocation (const int destinationPe, MeshLocation &destinationCoordinates)
void storeMessage (MeshStreamerMessage< dtype > **const messageBuffers, const int bucketIndex, const int destinationPe, const MeshLocation &destinationCoordinates, const dtype &dataItem)
void flushLargestBucket (MeshStreamerMessage< dtype > **const messageBuffers, const int numBuffers, const int myIndex, const int dimensionFactor)
virtual void localDeliver (const dtype &dataItem)
virtual void localBroadcast (const dtype &dataItem)
virtual void initLocalClients ()
void sendLargestBuffer ()
void flushToIntermediateDestinations ()
void flushDimension (int dimension, bool sendMsgCounts=false)

Private Attributes

int bucketSize_
int totalBufferCapacity_
int numDataItemsBuffered_
int numNodes_
int numRows_
int numColumns_
int numPlanes_
int planeSize_
CProxy_MeshStreamerClient< dtypeclientProxy_
MeshStreamerClient< dtype > * clientObj_
int myNodeIndex_
int myPlaneIndex_
int myColumnIndex_
int myRowIndex_
CkCallback userCallback_
int yieldFlag_
double progressPeriodInMs_
bool isPeriodicFlushEnabled_
double timeOfLastSend_
MeshStreamerMessage< dtype > ** personalizedBuffers_
MeshStreamerMessage< dtype > ** columnBuffers_
MeshStreamerMessage< dtype > ** planeBuffers_
MeshLocationcachedLocations
boolisCached
int numNodesInLastPlane_
int numFullRowsInLastPlane_
int numColumnsInLastRow_
int bufferSize_
int maxNumDataItemsBuffered_
bool yieldFlag_
bool hasSentRecently_
std::vector< std::vector
< MeshStreamerMessage< dtype > * > > 
dataBuffers_
CProxy_CompletionDetector detector_
int prio_
int yieldCount_
std::vector< std::vector< int > > cntMsgSent_
std::vector< intcntMsgReceived_
std::vector< intcntMsgExpected_
std::vector< intcntFinished_
int numLocalDone_
int numLocalContributors_
CompletionStatus myCompletionStatus_

Detailed Description

template<class dtype>
class MeshStreamer< dtype >

Definition at line 80 of file MeshStreamer.h.


Constructor & Destructor Documentation

template<class dtype>
MeshStreamer< dtype >::MeshStreamer ( int  totalBufferCapacity,
int  numRows,
int  numColumns,
int  numPlanes,
const CProxy_MeshStreamerClient< dtype > &  clientProxy,
int  yieldFlag = 0,
double  progressPeriodInMs = -1.0 
) [inline]

template<class dtype>
MeshStreamer< dtype >::~MeshStreamer (  )  [inline]

template<class dtype>
MeshStreamer< dtype >::MeshStreamer (  )  [inline]

Definition at line 162 of file NDMeshStreamer.h.

template<class dtype>
MeshStreamer< dtype >::MeshStreamer ( CkMigrateMessage  )  [inline]

Definition at line 163 of file NDMeshStreamer.h.

template<class dtype, class RouterType>
MeshStreamer< dtype, RouterType >::MeshStreamer ( int  maxNumDataItemsBuffered,
int  numDimensions,
int dimensionSizes,
int  bufferSize,
bool  yieldFlag = 0,
double  progressPeriodInMs = -1.0 
) [inline]

Definition at line 307 of file NDMeshStreamer.h.

References MeshStreamer< dtype >::ctorHelper().

Here is the call graph for this function:


Member Function Documentation

template<class dtype>
void MeshStreamer< dtype >::determineLocation ( const int  destinationPe,
MeshLocation destinationCoordinates 
) [inline, private]

template<class dtype>
void MeshStreamer< dtype >::storeMessage ( MeshStreamerMessage< dtype > **const   messageBuffers,
const int  bucketIndex,
const int  destinationPe,
const MeshLocation destinationCoordinates,
const dtype dataItem 
) [inline, private]

Definition at line 303 of file MeshStreamer.h.

References MeshStreamerMessage< dtype >::addDataItem(), MeshStreamer< dtype >::bucketSize_, MeshStreamer< dtype >::clientProxy_, MeshStreamer< dtype >::columnBuffers_, MeshLocation::columnIndex, ColumnMessage, MeshStreamer< dtype >::flushLargestBucket(), MeshStreamer< dtype >::isPeriodicFlushEnabled_, MeshStreamerMessage< dtype >::markDestination(), MeshLocation::msgType, MeshStreamer< dtype >::myColumnIndex_, MeshStreamer< dtype >::myNodeIndex_, MeshStreamer< dtype >::myPlaneIndex_, MeshStreamer< dtype >::myRowIndex_, MeshStreamer< dtype >::numColumns_, MeshStreamer< dtype >::numColumnsInLastRow_, MeshStreamer< dtype >::numDataItemsBuffered_, MeshStreamer< dtype >::numFullRowsInLastPlane_, MeshStreamer< dtype >::numNodes_, MeshStreamer< dtype >::numPlanes_, MeshStreamer< dtype >::numRows_, MeshStreamer< dtype >::personalizedBuffers_, PersonalizedMessage, MeshStreamer< dtype >::planeBuffers_, MeshLocation::planeIndex, PlaneMessage, MeshStreamer< dtype >::planeSize_, MeshLocation::rowIndex, MeshStreamer< dtype >::timeOfLastSend_, and MeshStreamer< dtype >::totalBufferCapacity_.

Referenced by MeshStreamer< dtype >::broadcast(), MeshStreamer< dtype >::insertData(), MeshStreamer< dtype >::receiveAggregateData(), MeshStreamer< dtype >::receiveAlongRoute(), and ArrayMeshStreamer< dtype, itype, ClientType, RouterType, EntryMethod >::resendMisdeliveredItems().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class dtype>
void MeshStreamer< dtype >::flushLargestBucket ( MeshStreamerMessage< dtype > **const   messageBuffers,
const int  numBuffers,
const int  myIndex,
const int  dimensionFactor 
) [inline, private]

template<class dtype>
void MeshStreamer< dtype >::insertData ( dtype dataItem,
const int  destinationPe 
) [inline]

template<class dtype>
void MeshStreamer< dtype >::doneInserting ( void   )  [inline]

Definition at line 442 of file MeshStreamer.h.

template<class dtype>
void MeshStreamer< dtype >::receiveAggregateData ( MeshStreamerMessage< dtype > *  msg  )  [inline]

template<class dtype>
void MeshStreamer< dtype >::flushBuckets ( MeshStreamerMessage< dtype > **  messageBuffers,
const int  numBuffers 
) [inline]

template<class dtype>
void MeshStreamer< dtype >::flushDirect (  )  [inline]

template<class dtype>
bool MeshStreamer< dtype >::isPeriodicFlushEnabled (  )  [inline]

Definition at line 151 of file MeshStreamer.h.

References MeshStreamer< dtype >::isPeriodicFlushEnabled_.

Referenced by periodicProgressFunction().

Here is the caller graph for this function:

template<class dtype>
void MeshStreamer< dtype >::associateCallback ( CkCallback cb,
bool  automaticFinish = true 
) [inline]

Definition at line 155 of file MeshStreamer.h.

References CkStartQD(), and MeshStreamer< dtype >::userCallback_.

Here is the call graph for this function:

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::registerPeriodicProgressFunction (  )  [inline]

Definition at line 642 of file MeshStreamer.h.

References CcdCallFnAfter(), and MeshStreamer< dtype >::progressPeriodInMs_.

Referenced by MeshStreamer< dtype >::enablePeriodicFlushing(), and periodicProgressFunction().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class dtype>
void MeshStreamer< dtype >::finish ( CkReductionMsg msg  )  [inline]

template<class dtype>
void MeshStreamer< dtype >::enablePeriodicFlushing (  )  [inline]

Definition at line 168 of file MeshStreamer.h.

References MeshStreamer< dtype >::isPeriodicFlushEnabled_, and MeshStreamer< dtype >::registerPeriodicProgressFunction().

Referenced by MeshStreamer< dtype >::init().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class dtype>
virtual void MeshStreamer< dtype >::localDeliver ( const dtype dataItem  )  [inline, private, virtual]

template<class dtype>
virtual void MeshStreamer< dtype >::localBroadcast ( const dtype dataItem  )  [inline, private, virtual]

template<class dtype>
virtual void MeshStreamer< dtype >::initLocalClients (  )  [inline, private, virtual]

Definition at line 130 of file NDMeshStreamer.h.

Referenced by MeshStreamer< dtype >::ctorHelper(), and MeshStreamer< dtype >::init().

Here is the caller graph for this function:

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::sendLargestBuffer (  )  [inline, private]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::flushToIntermediateDestinations (  )  [inline, private]

Definition at line 775 of file NDMeshStreamer.h.

References MeshStreamer< dtype >::flushDimension(), and MeshStreamer< dtype >::numDimensions_.

Referenced by MeshStreamer< dtype >::flushIfIdle().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::flushDimension ( int  dimension,
bool  sendMsgCounts = false 
) [inline, private]

template<class dtype, class RouterType>
int MeshStreamer< dtype, RouterType >::copyDataItemIntoMessage ( MeshStreamerMessage< dtype > *  destinationBuffer,
const void *  dataItemHandle,
bool  copyIndirectly = false 
) [inline, protected, virtual]

Definition at line 385 of file NDMeshStreamer.h.

References MeshStreamerMessage< dtype >::addDataItem(), and dtype.

Referenced by ArrayMeshStreamer< dtype, itype, ClientType, RouterType, EntryMethod >::copyDataItemIntoMessage(), and MeshStreamer< dtype >::storeMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::insertData ( const void *  dataItemHandle,
int  destinationPe 
) [inline, protected]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::broadcast ( const void *  dataItemHandle,
int  dimension,
bool  copyIndirectly 
) [inline, protected]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::storeMessage ( int  destinationPe,
const Route destinationCoordinates,
const void *  dataItem,
bool  copyIndirectly = false 
) [inline, protected]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::ctorHelper ( int  maxNumDataItemsBuffered,
int  numDimensions,
int dimensionSizes,
int  bufferSize,
bool  yieldFlag,
double  progressPeriodInMs 
) [inline, protected]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::receiveAlongRoute ( MeshStreamerMessage< dtype > *  msg  )  [inline]

template<class dtype>
void MeshStreamer< dtype >::enablePeriodicFlushing (  )  [inline]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::finish (  )  [inline]

Definition at line 664 of file NDMeshStreamer.h.

References CkCallback::isInvalid(), MeshStreamer< dtype >::isPeriodicFlushEnabled_, and MeshStreamer< dtype >::userCallback_.

Referenced by MeshStreamer< dtype >::init().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::init ( int  numLocalContributors,
CkCallback  startCb,
CkCallback  endCb,
int  prio,
bool  usePeriodicFlushing 
) [inline]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::init ( int  numContributors,
CkCallback  startCb,
CkCallback  endCb,
CProxy_CompletionDetector  detector,
int  prio,
bool  usePeriodicFlushing 
) [inline]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::init ( CkArrayID  senderArrayID,
CkCallback  startCb,
CkCallback  endCb,
int  prio,
bool  usePeriodicFlushing 
) [inline]

Definition at line 655 of file NDMeshStreamer.h.

References CkArrayID::ckLocalBranch(), CkArray::getLocMgr(), MeshStreamer< dtype >::init(), and CkLocMgr::numLocalElements().

Here is the call graph for this function:

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::init ( CkCallback  startCb,
int  prio 
) [inline]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::syncInit (  )  [inline]

Definition at line 613 of file NDMeshStreamer.h.

References MeshStreamer< dtype >::numLocalContributors_, and MeshStreamer< dtype >::startStagedCompletion().

Here is the call graph for this function:

template<class dtype>
virtual void MeshStreamer< dtype >::receiveAtDestination ( MeshStreamerMessage< dtype > *  msg  )  [inline, virtual]

Definition at line 196 of file NDMeshStreamer.h.

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::flushIfIdle (  )  [inline]

Definition at line 832 of file NDMeshStreamer.h.

References MeshStreamer< dtype >::flushToIntermediateDestinations(), MeshStreamer< dtype >::hasSentRecently_, MeshStreamer< dtype >::isPeriodicFlushEnabled_, and MeshStreamer< dtype >::numDataItemsBuffered_.

Referenced by periodicProgressFunction().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class dtype>
bool MeshStreamer< dtype >::isPeriodicFlushEnabled (  )  [inline]

Definition at line 200 of file NDMeshStreamer.h.

References MeshStreamer< dtype >::isPeriodicFlushEnabled_.

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::insertData ( const dtype dataItem,
int  destinationPe 
) [inline, virtual]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::broadcast ( const dtype dataItem  )  [inline, virtual]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::sendMeshStreamerMessage ( MeshStreamerMessage< dtype > *  destinationBuffer,
int  dimension,
int  destinationIndex 
) [inline]

template<class dtype>
void MeshStreamer< dtype >::registerPeriodicProgressFunction (  ) 

template<class dtype>
void MeshStreamer< dtype >::done ( int  numContributorsFinished = 1  )  [inline]

template<class dtype>
void MeshStreamer< dtype >::startStagedCompletion (  )  [inline]

template<class dtype>
void MeshStreamer< dtype >::markMessageReceived ( int  msgType,
int  finalCount 
) [inline]

template<class dtype>
bool MeshStreamer< dtype >::checkAllStagesCompleted (  )  [inline]

template<class dtype>
void MeshStreamer< dtype >::checkForCompletedStages (  )  [inline]

template<class dtype, class RouterType>
void MeshStreamer< dtype, RouterType >::pup ( PUP::er p  )  [inline, virtual]


Field Documentation

template<class dtype>
int MeshStreamer< dtype >::bucketSize_ [private]

template<class dtype>
int MeshStreamer< dtype >::totalBufferCapacity_ [private]

template<class dtype>
int MeshStreamer< dtype >::numDataItemsBuffered_ [private]

template<class dtype>
int MeshStreamer< dtype >::numNodes_ [private]

template<class dtype>
int MeshStreamer< dtype >::numRows_ [private]

template<class dtype>
int MeshStreamer< dtype >::numColumns_ [private]

template<class dtype>
int MeshStreamer< dtype >::numPlanes_ [private]

template<class dtype>
int MeshStreamer< dtype >::planeSize_ [private]

template<class dtype>
CProxy_MeshStreamerClient<dtype> MeshStreamer< dtype >::clientProxy_ [private]

template<class dtype>
MeshStreamerClient<dtype>* MeshStreamer< dtype >::clientObj_ [private]

template<class dtype>
int MeshStreamer< dtype >::myNodeIndex_ [private]

template<class dtype>
int MeshStreamer< dtype >::myPlaneIndex_ [private]

template<class dtype>
int MeshStreamer< dtype >::myColumnIndex_ [private]

template<class dtype>
int MeshStreamer< dtype >::myRowIndex_ [private]

template<class dtype>
CkCallback MeshStreamer< dtype >::userCallback_ [private]

template<class dtype>
int MeshStreamer< dtype >::yieldFlag_ [private]

template<class dtype>
double MeshStreamer< dtype >::progressPeriodInMs_ [private]

template<class dtype>
bool MeshStreamer< dtype >::isPeriodicFlushEnabled_ [private]

template<class dtype>
double MeshStreamer< dtype >::timeOfLastSend_ [private]

template<class dtype>
MeshStreamerMessage<dtype>** MeshStreamer< dtype >::personalizedBuffers_ [private]

template<class dtype>
MeshStreamerMessage<dtype>** MeshStreamer< dtype >::columnBuffers_ [private]

template<class dtype>
MeshStreamerMessage<dtype>** MeshStreamer< dtype >::planeBuffers_ [private]

template<class dtype>
MeshLocation* MeshStreamer< dtype >::cachedLocations [private]

template<class dtype>
bool* MeshStreamer< dtype >::isCached [private]

template<class dtype>
int MeshStreamer< dtype >::numNodesInLastPlane_ [private]

Definition at line 118 of file MeshStreamer.h.

Referenced by MeshStreamer< dtype >::MeshStreamer().

template<class dtype>
int MeshStreamer< dtype >::numFullRowsInLastPlane_ [private]

template<class dtype>
int MeshStreamer< dtype >::numColumnsInLastRow_ [private]

template<class dtype>
int MeshStreamer< dtype >::bufferSize_ [private]

template<class dtype>
int MeshStreamer< dtype >::maxNumDataItemsBuffered_ [private]

template<class dtype>
bool MeshStreamer< dtype >::yieldFlag_ [private]

Definition at line 106 of file NDMeshStreamer.h.

template<class dtype>
bool MeshStreamer< dtype >::hasSentRecently_ [private]

template<class dtype>
std::vector<std::vector<MeshStreamerMessage<dtype> * > > MeshStreamer< dtype >::dataBuffers_ [private]

template<class dtype>
CProxy_CompletionDetector MeshStreamer< dtype >::detector_ [private]

Definition at line 113 of file NDMeshStreamer.h.

Referenced by MeshStreamer< dtype >::init(), and MeshStreamer< dtype >::pup().

template<class dtype>
int MeshStreamer< dtype >::prio_ [private]

template<class dtype>
int MeshStreamer< dtype >::yieldCount_ [private]

template<class dtype>
std::vector<std::vector<int> > MeshStreamer< dtype >::cntMsgSent_ [private]

template<class dtype>
std::vector<int> MeshStreamer< dtype >::cntMsgReceived_ [private]

template<class dtype>
std::vector<int> MeshStreamer< dtype >::cntMsgExpected_ [private]

template<class dtype>
std::vector<int> MeshStreamer< dtype >::cntFinished_ [private]

template<class dtype>
int MeshStreamer< dtype >::numLocalDone_ [private]

template<class dtype>
int MeshStreamer< dtype >::numLocalContributors_ [private]

template<class dtype>
CompletionStatus MeshStreamer< dtype >::myCompletionStatus_ [private]

template<class dtype>
RouterType MeshStreamer< dtype >::myRouter_ [protected]

template<class dtype>
int MeshStreamer< dtype >::numMembers_ [protected]

template<class dtype>
int MeshStreamer< dtype >::myIndex_ [protected]

template<class dtype>
int MeshStreamer< dtype >::numDimensions_ [protected]

template<class dtype>
bool MeshStreamer< dtype >::useStagedCompletion_ [protected]

template<class dtype>
bool MeshStreamer< dtype >::stagedCompletionStarted_ [protected]

template<class dtype>
bool MeshStreamer< dtype >::useCompletionDetection_ [protected]

template<class dtype>
CompletionDetector* MeshStreamer< dtype >::detectorLocalObj_ [protected]


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

Generated on Mon Sep 21 08:27:33 2020 for Charm++ by  doxygen 1.5.5