
#include <ckarrayreductionmgr.h>


Public Member Functions | |
| CkArrayReductionMgr () | |
| CkArrayReductionMgr (int dummy, CkGroupID gid) | |
| CkArrayReductionMgr (CkMigrateMessage *m) | |
| void | contributeArrayReduction (CkReductionMsg *m) |
| CkReductionMsg * | reduceMessages (void) |
| void | flushStates () |
| virtual void | pup (PUP::er &p) |
| void | setAttachedGroup (CkGroupID groupID) |
| void | startNodeGroupReduction (int number, CkGroupID groupID) |
| virtual int | startLocalGroupReductions (int number) |
| virtual int | getTotalGCount () |
Data Fields | |
| volatile int | ctorDoneFlag |
Private Member Functions | |
| void | init () |
| void | collectAllMessages () |
Private Attributes | |
| int | size |
| This class receives contributions from all the CkReductionMgr s in a node, after each of them has collected all the contributions on one processor. | |
| int | redNo |
| int | count |
| CkGroupID | attachedGroup |
| CkMsgQ< CkReductionMsg > | my_msgs |
| CkMsgQ< CkReductionMsg > | my_futureMsgs |
| CmiNodeLock | lockCount |
| int | alreadyStarted |
Definition at line 3 of file ckarrayreductionmgr.h.
| CkArrayReductionMgr::CkArrayReductionMgr | ( | ) |
Definition at line 26 of file ckarrayreductionmgr.C.
References attachedGroup, init(), and _ckGroupID::setZero().
| CkArrayReductionMgr::CkArrayReductionMgr | ( | CkMigrateMessage * | m | ) | [inline] |
Definition at line 23 of file ckarrayreductionmgr.h.
| void CkArrayReductionMgr::init | ( | ) | [private] |
Definition at line 15 of file ckarrayreductionmgr.C.
References alreadyStarted, BGConverse::CkMyNodeSize(), CmiCreateLock(), count, ctorDoneFlag, lockCount, redNo, and size.
Referenced by CkArrayReductionMgr().
| void CkArrayReductionMgr::collectAllMessages | ( | ) | [private] |
keep a count of elements that contributed to the original reduction
Definition at line 48 of file ckarrayreductionmgr.C.
References BGConverse::CkMyNode(), NodeGroup::contributeWithCounter(), count, CkQ< T >::deq(), CkQ< T >::enq(), CkQ< T >::length(), my_futureMsgs, my_msgs, n, redNo, reduceMessages(), and size.
Referenced by contributeArrayReduction().
| void CkArrayReductionMgr::contributeArrayReduction | ( | CkReductionMsg * | m | ) |
store the contribution untill all procs have contributed. At that point reduce and carry out a reduction among nodegroups
Definition at line 71 of file ckarrayreductionmgr.C.
References BGConverse::CkMyNode(), CmiLock(), CmiUnlock(), collectAllMessages(), count, CkQ< T >::enq(), _ckGroupID::idx, lockCount, my_futureMsgs, my_msgs, redNo, and IrrGroup::thisgroup.
Referenced by CkReductionMgr::finishReduction().
| CkReductionMsg * CkArrayReductionMgr::reduceMessages | ( | void | ) |
Reimplemented from CkNodeReductionMgr.
Definition at line 90 of file ckarrayreductionmgr.C.
References CkQ< T >::deq(), CkReduction::invalid, CkQ< T >::length(), my_msgs, redNo, and CkReduction::reducerTable.
Referenced by collectAllMessages().
| void CkArrayReductionMgr::flushStates | ( | ) | [virtual] |
Reimplemented from NodeGroup.
Definition at line 36 of file ckarrayreductionmgr.C.
References BGConverse::CkMyRank(), count, CkQ< T >::deq(), CkNodeReductionMgr::flushStates(), CkQ< T >::isEmpty(), my_futureMsgs, my_msgs, and redNo.
| void CkArrayReductionMgr::pup | ( | PUP::er & | p | ) | [virtual] |
Reimplemented from NodeGroup.
Definition at line 170 of file ckarrayreductionmgr.C.
References attachedGroup, BGConverse::CkMyNodeSize(), CmiCreateLock(), count, PUP::er::isUnpacking(), lockCount, my_futureMsgs, my_msgs, p, NodeGroup::pup(), redNo, and size.
| void CkArrayReductionMgr::setAttachedGroup | ( | CkGroupID | groupID | ) |
Definition at line 182 of file ckarrayreductionmgr.C.
References alreadyStarted, attachedGroup, and BGConverse::CkMyNode().
Referenced by startNodeGroupReduction().
Definition at line 192 of file ckarrayreductionmgr.C.
References attachedGroup, BGConverse::CkMyNode(), _ckGroupID::idx, _ckGroupID::isZero(), msg, setAttachedGroup(), envelope::setSrcPe(), startLocalGroupReductions(), IrrGroup::thisgroup, and UsrToEnv().
Reimplemented from CkNodeReductionMgr.
Definition at line 210 of file ckarrayreductionmgr.C.
References alreadyStarted, attachedGroup, BGConverse::CkMyNode(), BGConverse::CkNodeFirst(), _ckGroupID::idx, _ckGroupID::isZero(), size, and IrrGroup::thisgroup.
Referenced by startNodeGroupReduction().
| int CkArrayReductionMgr::getTotalGCount | ( | ) | [virtual] |
Reimplemented from CkNodeReductionMgr.
Definition at line 224 of file ckarrayreductionmgr.C.
References attachedGroup, BGConverse::CkMyNode(), BGConverse::CkNodeFirst(), CkReductionMgr::getGCount(), and size.
int CkArrayReductionMgr::size [private] |
This class receives contributions from all the CkReductionMgr s in a node, after each of them has collected all the contributions on one processor.
The data from the different processors in a node is collected and sent to the CkNodeReductionMgr for this node
Definition at line 9 of file ckarrayreductionmgr.h.
Referenced by collectAllMessages(), getTotalGCount(), init(), pup(), and startLocalGroupReductions().
int CkArrayReductionMgr::redNo [private] |
Reimplemented from CkNodeReductionMgr.
Definition at line 10 of file ckarrayreductionmgr.h.
Referenced by collectAllMessages(), contributeArrayReduction(), flushStates(), init(), pup(), and reduceMessages().
int CkArrayReductionMgr::count [private] |
Definition at line 11 of file ckarrayreductionmgr.h.
Referenced by collectAllMessages(), contributeArrayReduction(), flushStates(), init(), and pup().
CkGroupID CkArrayReductionMgr::attachedGroup [private] |
Definition at line 12 of file ckarrayreductionmgr.h.
Referenced by CkArrayReductionMgr(), getTotalGCount(), pup(), setAttachedGroup(), startLocalGroupReductions(), and startNodeGroupReduction().
CkMsgQ<CkReductionMsg> CkArrayReductionMgr::my_msgs [private] |
Definition at line 13 of file ckarrayreductionmgr.h.
Referenced by collectAllMessages(), contributeArrayReduction(), flushStates(), pup(), and reduceMessages().
CkMsgQ<CkReductionMsg> CkArrayReductionMgr::my_futureMsgs [private] |
Definition at line 14 of file ckarrayreductionmgr.h.
Referenced by collectAllMessages(), contributeArrayReduction(), flushStates(), and pup().
CmiNodeLock CkArrayReductionMgr::lockCount [private] |
Definition at line 15 of file ckarrayreductionmgr.h.
Referenced by contributeArrayReduction(), init(), and pup().
int CkArrayReductionMgr::alreadyStarted [private] |
Definition at line 16 of file ckarrayreductionmgr.h.
Referenced by init(), setAttachedGroup(), and startLocalGroupReductions().
| volatile int CkArrayReductionMgr::ctorDoneFlag |
1.5.5