PPL Logo

CkReductionMgr Class Reference

#include <ckreduction.h>

Inheritance diagram for CkReductionMgr:

Inheritance graph
[legend]
Collaboration diagram for CkReductionMgr:

Collaboration graph
[legend]

Public Types

typedef CkReductionClientFn clientFn

Public Member Functions

 CkReductionMgr ()
 CkReductionMgr (CkMigrateMessage *m)
 ~CkReductionMgr ()
void ckSetReductionClient (CkCallback *cb)
 Add the given client function.
void creatingContributors (void)
void doneCreatingContributors (void)
void contributorStamped (contributorInfo *ci)
void contributorCreated (contributorInfo *ci)
void contributorDied (contributorInfo *ci)
void contributorLeaving (contributorInfo *ci)
void contributorArriving (contributorInfo *ci)
void contribute (contributorInfo *ci, CkReductionMsg *msg)
void ReductionStarting (CkReductionNumberMsg *m)
void LateMigrantMsg (CkReductionMsg *m)
void MigrantDied (CkReductionNumberMsg *m)
void RecvMsg (CkReductionMsg *m)
void AddToInactiveList (CkReductionInactiveMsg *m)
void barrier (CkReductionMsg *msg)
void Barrier_RecvMsg (CkReductionMsg *m)
void addBarrier (CkReductionMsg *m)
void finishBarrier (void)
virtual bool isReductionMgr (void)
virtual void flushStates ()
int getGCount ()
void decGCount ()
void incNumImmigrantRecObjs ()
void decNumImmigrantRecObjs ()
void incNumEmigrantRecObjs ()
void decNumEmigrantRecObjs ()
int numberReductionMessages ()
virtual void pup (PUP::er &p)
 Pack/UnPack - tell the runtime how to serialize this class's data for migration, checkpoint, etc.
void contributeViaMessage (CkReductionMsg *m)

Static Public Member Functions

static CkReductionMsgreduceMessages (CkMsgQ< CkReductionMsg > &msgs)
static bool isIrreducible ()

Data Fields

CProxy_CkReductionMgr thisProxy
intperProcessorCounts
int processorCount
int totalCount

Protected Member Functions

bool hasParent (void)
int treeParent (void)
int firstKid (void)
int treeKids (void)
void resetCountersWhenFlushingStates ()

Protected Attributes

bool disableNotifyChildrenStart
bool isDestroying

Private Types

enum  { TREE_WID = 2 }

Private Member Functions

void startReduction (int number, int srcPE)
void addContribution (CkReductionMsg *m)
void finishReduction (void)
 function checks if it has got all contributions that it is supposed to get at this processor.
void checkIsActive ()
void informParentInactive ()
void checkAndAddToInactiveList (int id, int red_no)
void checkAndRemoveFromInactiveList (int id, int red_no)
void sendReductionStartingToKids (int red_no)
void init_BinomialTree ()
void init_TopoTree ()
void init_BinaryTree ()
int treeRoot (void)
bool isPast (int num) const
bool isPresent (int num) const
bool isFuture (int num) const
countAdjustment & adj (int number)

Private Attributes

int numImmigrantRecObjs
int numEmigrantRecObjs
CkCallback storedCallback
int redNo
int completedRedNo
bool inProgress
bool creating
bool startRequested
int gcount
int lcount
int maxStartRequest
int nContrib
int nRemote
bool is_inactive
CkCallback barrier_storedCallback
int barrier_gCount
int barrier_nSource
int barrier_nContrib
int barrier_nRemote
CkMsgQ< CkReductionMsgmsgs
CkMsgQ< CkReductionMsgfutureMsgs
CkMsgQ< CkReductionMsgfutureRemoteMsgs
CkMsgQ< CkReductionMsgfinalMsgs
std::map< int, intinactiveList
unsigned upperSize
unsigned label
int parent
int numKids
std::vector< intnewKids
std::vector< intkids
std::vector< countAdjustment > adjVec

Detailed Description

Definition at line 626 of file ckreduction.h.


Member Typedef Documentation

typedef CkReductionClientFn CkReductionMgr::clientFn

Reimplemented in serialCollideClient.

Definition at line 635 of file ckreduction.h.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
TREE_WID 

Definition at line 778 of file ckreduction.h.


Constructor & Destructor Documentation

CkReductionMgr::CkReductionMgr (  ) 

CkReductionMgr::CkReductionMgr ( CkMigrateMessage m  ) 

CkReductionMgr::~CkReductionMgr (  ) 

Definition at line 241 of file ckreduction.C.


Member Function Documentation

void CkReductionMgr::ckSetReductionClient ( CkCallback cb  ) 

Add the given client function.

Overwrites any previous client. This manager will dispose of the callback when replaced or done.

Definition at line 268 of file ckreduction.C.

References Converse::CkMyPe(), _ckGroupID::idx, storedCallback, and IrrGroup::thisgroup.

Referenced by CkArray::CkArray().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::creatingContributors ( void   ) 

Definition at line 281 of file ckreduction.C.

References creating.

Referenced by CkArrayReducer::ckBeginInserting(), and Group::Group().

Here is the caller graph for this function:

void CkReductionMgr::doneCreatingContributors ( void   ) 

Definition at line 286 of file ckreduction.C.

References checkIsActive(), Converse::CkMyPe(), creating, finishReduction(), redNo, startReduction(), and startRequested.

Referenced by CkArrayReducer::ckEndInserting(), and Group::Group().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::contributorStamped ( contributorInfo ci  ) 

Definition at line 296 of file ckreduction.C.

References adj(), gcount, inProgress, redNo, and contributorInfo::redNo.

Referenced by CkArrayReducer::ckElementStamp(), and Group::Group().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::contributorCreated ( contributorInfo ci  ) 

Definition at line 310 of file ckreduction.C.

References adj(), checkIsActive(), _ckGroupID::idx, lcount, r, contributorInfo::redNo, redNo, and IrrGroup::thisgroup.

Referenced by CkArrayReducer::ckElementCreating(), and Group::Group().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::contributorDied ( contributorInfo ci  ) 

Definition at line 327 of file ckreduction.C.

References adj(), checkIsActive(), CkInRestarting(), finishReduction(), gcount, isDestroying, lcount, r, redNo, contributorInfo::redNo, and thisProxy.

Referenced by CkArrayReducer::ckElementDied().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::contributorLeaving ( contributorInfo ci  ) 

Definition at line 370 of file ckreduction.C.

References adj(), checkIsActive(), finishReduction(), lcount, r, redNo, and contributorInfo::redNo.

Referenced by CkArrayReducer::ckElementLeaving().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::contributorArriving ( contributorInfo ci  ) 

Definition at line 386 of file ckreduction.C.

References adj(), checkIsActive(), CkInRestarting(), lcount, r, redNo, and contributorInfo::redNo.

Referenced by CkArrayReducer::ckElementArriving().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::contribute ( contributorInfo ci,
CkReductionMsg msg 
)

void CkReductionMgr::ReductionStarting ( CkReductionNumberMsg m  ) 

Definition at line 560 of file ckreduction.C.

References Converse::CkMyPe(), finishReduction(), inProgress, isFuture(), isPresent(), maxStartRequest, CkReductionNumberMsg::num, startReduction(), and UsrToEnv().

Here is the call graph for this function:

void CkReductionMgr::LateMigrantMsg ( CkReductionMsg m  ) 

Definition at line 590 of file ckreduction.C.

References addContribution(), and CkReductionMsg::log.

Here is the call graph for this function:

void CkReductionMgr::MigrantDied ( CkReductionNumberMsg m  ) 

Definition at line 599 of file ckreduction.C.

References adj(), Converse::CkMyPe(), completedRedNo, finishReduction(), and CkReductionNumberMsg::num.

Here is the call graph for this function:

void CkReductionMgr::RecvMsg ( CkReductionMsg m  ) 

void CkReductionMgr::AddToInactiveList ( CkReductionInactiveMsg m  ) 

Definition at line 839 of file ckreduction.C.

References checkAndAddToInactiveList(), checkIsActive(), finishReduction(), CkReductionInactiveMsg::id, redNo, and CkReductionInactiveMsg::redno.

Here is the call graph for this function:

void CkReductionMgr::barrier ( CkReductionMsg msg  ) 

Definition at line 1174 of file ckreduction.C.

References barrier_nContrib, barrier_nSource, barrier_storedCallback, CkReductionMsg::callback, finishBarrier(), and CkCallback::isInvalid().

Here is the call graph for this function:

void CkReductionMgr::Barrier_RecvMsg ( CkReductionMsg m  ) 

void CkReductionMgr::addBarrier ( CkReductionMsg m  ) 

void CkReductionMgr::finishBarrier ( void   ) 

virtual bool CkReductionMgr::isReductionMgr ( void   )  [inline, virtual]

Reimplemented from IrrGroup.

Definition at line 683 of file ckreduction.h.

void CkReductionMgr::flushStates (  )  [virtual]

Reimplemented from IrrGroup.

Reimplemented in CkArray, and Group.

Definition at line 245 of file ckreduction.C.

References adjVec, completedRedNo, creating, CkQ< T >::deq(), finalMsgs, futureMsgs, futureRemoteMsgs, inProgress, CkQ< T >::isEmpty(), maxStartRequest, msgs, nContrib, nRemote, redNo, and startRequested.

Referenced by Group::flushStates(), and CkArray::flushStates().

Here is the call graph for this function:

Here is the caller graph for this function:

int CkReductionMgr::getGCount (  )  [inline]

Definition at line 693 of file ckreduction.h.

References gcount.

void CkReductionMgr::decGCount (  )  [inline]

Definition at line 695 of file ckreduction.h.

References gcount.

Referenced by _distributedLocationHandler(), and _sendBackLocationHandler().

Here is the caller graph for this function:

void CkReductionMgr::incNumImmigrantRecObjs (  )  [inline]

Definition at line 696 of file ckreduction.h.

References numImmigrantRecObjs.

Referenced by _distributedLocationHandler().

Here is the caller graph for this function:

void CkReductionMgr::decNumImmigrantRecObjs (  )  [inline]

Definition at line 699 of file ckreduction.h.

References numImmigrantRecObjs.

Referenced by sendBackImmigrantRecObjs().

Here is the caller graph for this function:

void CkReductionMgr::incNumEmigrantRecObjs (  )  [inline]

Definition at line 702 of file ckreduction.h.

References numEmigrantRecObjs.

Referenced by ElementDistributor::addLocation().

Here is the caller graph for this function:

void CkReductionMgr::decNumEmigrantRecObjs (  )  [inline]

Definition at line 705 of file ckreduction.h.

References numEmigrantRecObjs.

Referenced by _sendBackLocationHandler().

Here is the caller graph for this function:

CkReductionMsg * CkReductionMgr::reduceMessages ( CkMsgQ< CkReductionMsg > &  msgs  )  [static]

void CkReductionMgr::startReduction ( int  number,
int  srcPE 
) [private]

Definition at line 610 of file ckreduction.C.

References Converse::CkMyPe(), completedRedNo, creating, disableNotifyChildrenStart, inProgress, isFuture(), isPast(), redNo, sendReductionStartingToKids(), and startRequested.

Referenced by addContribution(), doneCreatingContributors(), finishReduction(), RecvMsg(), and ReductionStarting().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::addContribution ( CkReductionMsg m  )  [private]

Definition at line 646 of file ckreduction.C.

References Converse::CkMyPe(), CmiAbort(), CkQ< T >::enq(), finishReduction(), futureMsgs, isFuture(), isPast(), msgs, nContrib, CkReductionMsg::redNo, startReduction(), and thisProxy.

Referenced by contribute(), contributeViaMessage(), finishReduction(), and LateMigrantMsg().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::finishReduction ( void   )  [private]

void CkReductionMgr::checkIsActive (  )  [private]

Definition at line 457 of file ckreduction.C.

References inactiveList, informParentInactive(), is_inactive, lcount, numKids, and redNo.

Referenced by AddToInactiveList(), checkAndAddToInactiveList(), contributorArriving(), contributorCreated(), contributorDied(), contributorLeaving(), doneCreatingContributors(), finishReduction(), and pup().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::informParentInactive (  )  [private]

Definition at line 526 of file ckreduction.C.

References Converse::CkMyPe(), hasParent(), redNo, thisProxy, and treeParent().

Referenced by checkIsActive().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::checkAndAddToInactiveList ( int  id,
int  red_no 
) [private]

Definition at line 487 of file ckreduction.C.

References checkIsActive(), inactiveList, inProgress, redNo, and thisProxy.

Referenced by AddToInactiveList().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::checkAndRemoveFromInactiveList ( int  id,
int  red_no 
) [private]

Definition at line 512 of file ckreduction.C.

References inactiveList.

Referenced by RecvMsg().

Here is the caller graph for this function:

void CkReductionMgr::sendReductionStartingToKids ( int  red_no  )  [private]

Definition at line 538 of file ckreduction.C.

References inactiveList, kids, redNo, thisProxy, and treeKids().

Referenced by startReduction().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::init_BinomialTree (  )  [private]

Definition at line 1115 of file ckreduction.C.

References BGConverse::CkMyNode(), Converse::CkMyPe(), BGConverse::CkNodeFirst(), BGConverse::CkNodeSize(), BGConverse::CkNumNodes(), Converse::CkNumPes(), count, int, kids, label, numKids, p, parent, and upperSize.

Referenced by CkReductionMgr(), and pup().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::init_TopoTree (  )  [private]

Definition at line 1085 of file ckreduction.C.

References _topoTree, CmiSpanningTreeInfo::child_count, CmiSpanningTreeInfo::children, BGConverse::CkMyNode(), Converse::CkMyPe(), BGConverse::CkNodeFirst(), BGConverse::CkNodeSize(), kids, newKids, numKids, CmiSpanningTreeInfo::parent, parent, and PUP::t.

Referenced by CkReductionMgr(), and pup().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReductionMgr::init_BinaryTree (  )  [private]

Definition at line 1055 of file ckreduction.C.

References BGConverse::CkMyNode(), Converse::CkMyPe(), BGConverse::CkNodeFirst(), BGConverse::CkNodeSize(), BGConverse::CkNumNodes(), firstKid(), kids, newKids, numKids, parent, and TREE_WID.

Referenced by CkReductionMgr(), and pup().

Here is the call graph for this function:

Here is the caller graph for this function:

int CkReductionMgr::treeRoot ( void   )  [private]

Definition at line 1153 of file ckreduction.C.

Referenced by hasParent().

Here is the caller graph for this function:

bool CkReductionMgr::isPast ( int  num  )  const [inline, private]

Definition at line 782 of file ckreduction.h.

References redNo.

Referenced by addContribution(), and startReduction().

Here is the caller graph for this function:

bool CkReductionMgr::isPresent ( int  num  )  const [inline, private]

Definition at line 783 of file ckreduction.h.

References redNo.

Referenced by RecvMsg(), and ReductionStarting().

Here is the caller graph for this function:

bool CkReductionMgr::isFuture ( int  num  )  const [inline, private]

Definition at line 784 of file ckreduction.h.

References redNo.

Referenced by addContribution(), RecvMsg(), ReductionStarting(), and startReduction().

Here is the caller graph for this function:

countAdjustment & CkReductionMgr::adj ( int  number  )  [private]

Definition at line 857 of file ckreduction.C.

References adjVec, and completedRedNo.

Referenced by contributorArriving(), contributorCreated(), contributorDied(), contributorLeaving(), contributorStamped(), finishReduction(), and MigrantDied().

Here is the caller graph for this function:

bool CkReductionMgr::hasParent ( void   )  [protected]

Definition at line 1157 of file ckreduction.C.

References Converse::CkMyPe(), and treeRoot().

Referenced by finishBarrier(), finishReduction(), informParentInactive(), and CkArray::initDone().

Here is the call graph for this function:

Here is the caller graph for this function:

int CkReductionMgr::treeParent ( void   )  [protected]

Definition at line 1161 of file ckreduction.C.

References parent.

Referenced by finishBarrier(), finishReduction(), informParentInactive(), and CkArray::initDone().

Here is the caller graph for this function:

int CkReductionMgr::firstKid ( void   )  [protected]

Referenced by init_BinaryTree().

Here is the caller graph for this function:

int CkReductionMgr::treeKids ( void   )  [protected]

Definition at line 1165 of file ckreduction.C.

References numKids.

Referenced by finishBarrier(), finishReduction(), CkArray::initDone(), and sendReductionStartingToKids().

Here is the caller graph for this function:

void CkReductionMgr::resetCountersWhenFlushingStates (  )  [inline, protected]

Definition at line 801 of file ckreduction.h.

References gcount, and lcount.

Referenced by CkArray::flushStates().

Here is the caller graph for this function:

int CkReductionMgr::numberReductionMessages (  )  [inline]

Reimplemented in CkArray.

Definition at line 810 of file ckreduction.h.

References totalCount.

void CkReductionMgr::pup ( PUP::er p  )  [virtual]

Pack/UnPack - tell the runtime how to serialize this class's data for migration, checkpoint, etc.

Reimplemented from CkGroupInitCallback.

Reimplemented in CkArray, Group, PVT, GVT, TimePool, and MemoryPool.

Definition at line 1000 of file ckreduction.C.

References adjVec, CkReductionClientBundle::callbackCfn(), CkCallback::callCFn, checkIsActive(), BGConverse::CkMyNode(), Converse::CkMyPe(), completedRedNo, creating, CkCallback::d, disableNotifyChildrenStart, finalMsgs, futureMsgs, futureRemoteMsgs, gcount, init_BinaryTree(), init_BinomialTree(), init_TopoTree(), inProgress, is_inactive, PUP::er::isUnpacking(), maxStartRequest, msgs, nContrib, nRemote, p, CkGroupInitCallback::pup(), redNo, startRequested, storedCallback, IrrGroup::thisgroup, thisProxy, and CkCallback::type.

Referenced by CkArray::pup(), and Group::pup().

Here is the call graph for this function:

Here is the caller graph for this function:

static bool CkReductionMgr::isIrreducible (  )  [inline, static]

Reimplemented from IrrGroup.

Reimplemented in CkArray.

Definition at line 819 of file ckreduction.h.

void CkReductionMgr::contributeViaMessage ( CkReductionMsg m  ) 

Definition at line 443 of file ckreduction.C.

References addContribution(), and UsrToEnv().

Here is the call graph for this function:


Field Documentation

CProxy_CkReductionMgr CkReductionMgr::thisProxy

Definition at line 723 of file ckreduction.h.

Referenced by ckSetReductionClient(), finishReduction(), and pup().

Definition at line 732 of file ckreduction.h.

Referenced by CkReductionMgr(), finishReduction(), flushStates(), pup(), and ReductionStarting().

Definition at line 735 of file ckreduction.h.

Referenced by addContribution(), CkReductionMgr(), finishReduction(), flushStates(), and pup().

Definition at line 735 of file ckreduction.h.

Referenced by CkReductionMgr(), finishReduction(), flushStates(), pup(), and RecvMsg().

Definition at line 737 of file ckreduction.h.

Referenced by checkIsActive(), CkReductionMgr(), and pup().

Definition at line 740 of file ckreduction.h.

Referenced by barrier(), Barrier_RecvMsg(), and finishBarrier().

Definition at line 741 of file ckreduction.h.

Referenced by Barrier_RecvMsg(), CkReductionMgr(), and finishBarrier().

Definition at line 742 of file ckreduction.h.

Referenced by barrier(), Barrier_RecvMsg(), CkReductionMgr(), and finishBarrier().

Definition at line 743 of file ckreduction.h.

Referenced by barrier(), CkReductionMgr(), and finishBarrier().

Definition at line 743 of file ckreduction.h.

Referenced by Barrier_RecvMsg(), CkReductionMgr(), and finishBarrier().

Definition at line 746 of file ckreduction.h.

Referenced by addContribution(), finishReduction(), flushStates(), pup(), and RecvMsg().

Definition at line 749 of file ckreduction.h.

Referenced by addContribution(), finishReduction(), flushStates(), and pup().

Definition at line 751 of file ckreduction.h.

Referenced by finishReduction(), flushStates(), pup(), and RecvMsg().

Definition at line 753 of file ckreduction.h.

Referenced by flushStates(), and pup().

std::map<int, int> CkReductionMgr::inactiveList [private]

unsigned CkReductionMgr::upperSize [private]

Definition at line 767 of file ckreduction.h.

Referenced by init_BinomialTree().

unsigned CkReductionMgr::label [private]

Definition at line 768 of file ckreduction.h.

Referenced by init_BinomialTree().

Definition at line 769 of file ckreduction.h.

Referenced by init_BinaryTree(), init_BinomialTree(), init_TopoTree(), and treeParent().

std::vector<int> CkReductionMgr::newKids [private]

Definition at line 772 of file ckreduction.h.

Referenced by init_BinaryTree(), and init_TopoTree().

std::vector<int> CkReductionMgr::kids [private]

std::vector<countAdjustment> CkReductionMgr::adjVec [private]

Definition at line 789 of file ckreduction.h.

Referenced by adj(), finishReduction(), flushStates(), and pup().

Definition at line 800 of file ckreduction.h.

Referenced by CkArray::CkArray(), CkReductionMgr(), pup(), and startReduction().

Definition at line 802 of file ckreduction.h.

Referenced by CkArray::ckDestroy(), and contributorDied().

Definition at line 807 of file ckreduction.h.

Definition at line 808 of file ckreduction.h.

Reimplemented in SearchGroup.

Definition at line 809 of file ckreduction.h.

Referenced by numberReductionMessages().


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

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