
#include <ckarray.h>


Public Member Functions | |
| CkArray (CkArrayOptions &c, CkMarshalledMessage &initMsg, CkNodeGroupID nodereductionProxy) | |
| CkArray (CkMigrateMessage *m) | |
| CkGroupID & | getGroupID (void) |
| CkLocMgr * | getLocMgr (void) |
| const CkArrayIndex & | getNumInitial (void) const |
| int | homePe (const CkArrayIndex &idx) const |
| int | procNum (const CkArrayIndex &idx) const |
| int | lastKnown (const CkArrayIndex &idx) const |
| Return the last known processor for this array index. | |
| int | deliver (CkMessage *m, CkDeliver_t type, int opts=0) |
| Deliver message to this element (directly if local) doFree if is local. | |
| ArrayElement * | lookup (const CkArrayIndex &index) |
| Fetch a local element via its index (return NULL if not local). | |
| virtual CkMigratable * | allocateMigrated (int elChareType, const CkArrayIndex &idx, CkElementCreation_t type) |
| Create-after-migrate:. | |
| void | prepareCtorMsg (CkMessage *m, int &onPe, const CkArrayIndex &idx) |
| Prepare creation message:. | |
| virtual void | insertInitial (const CkArrayIndex &idx, void *ctorMsg, int local=1) |
| Create initial array elements:. | |
| virtual void | doneInserting (void) |
| Done with initial insertions. | |
| void | remoteDoneInserting (void) |
| This is called on every processor after the last array insertion. | |
| virtual CmiBool | insertElement (CkMessage *) |
| Create manually:. | |
| CmiBool | demandCreateElement (const CkArrayIndex &idx, int onPe, int ctor, CkDeliver_t type) |
| Demand-creation:. | |
| void | sendBroadcast (CkMessage *msg) |
| Broadcast communication:. | |
| void | recvBroadcast (CkMessage *msg) |
| Increment broadcast count; deliver to all local elements. | |
| void | sendExpeditedBroadcast (CkMessage *msg) |
| void | recvExpeditedBroadcast (CkMessage *msg) |
| void | recvBroadcastViaTree (CkMessage *msg) |
| void | pup (PUP::er &p) |
| void | ckJustMigrated (void) |
| virtual CmiBool | isArrMgr (void) |
| void | addListener (CkArrayListener *l) |
| void | flushStates () |
| virtual int | numberReductionMessages () |
| void | broadcastHomeElements (void *data, CkLocRec *rec, CkArrayIndex *index) |
Static Public Member Functions | |
| static void | staticBroadcastHomeElements (CkArray *arr, void *data, CkLocRec *rec, CkArrayIndex *index) |
Private Types | |
| typedef CkMigratableListT < ArrayElement > | ArrayElementList |
Private Member Functions | |
| ArrayElement * | allocate (int elChareType, const CkArrayIndex &idx, CkMessage *msg, CmiBool fromMigration) |
| Are we currently inserting elements? | |
| void | springCleaning (void) |
Static Private Member Functions | |
| static void | staticSpringCleaning (void *forWhom, double curWallTime) |
Private Attributes | |
| CkMagicNumber< ArrayElement > | magic |
| CkLocMgr * | locMgr |
| CkGroupID | locMgrID |
| CProxy_CkArray | thisProxy |
| ArrayElementList * | elements |
| int * | children |
| int | numChildren |
| bool | stableLocations |
| CkArrayIndex | numInitial |
| CmiBool | isInserting |
| Number of initial array elements. | |
| CkPupAblePtrVec< CkArrayListener > | listeners |
| int | listenerDataOffset |
| CkArrayReducer * | reducer |
| CkArrayBroadcaster * | broadcaster |
Friends | |
| class | ArrayElement |
| class | CProxy_ArrayBase |
| class | CProxyElement_ArrayBase |
Definition at line 638 of file ckarray.h.
typedef CkMigratableListT<ArrayElement> CkArray::ArrayElementList [private] |
| CkArray::CkArray | ( | CkArrayOptions & | c, | |
| CkMarshalledMessage & | initMsg, | |||
| CkNodeGroupID | nodereductionProxy | |||
| ) |
Set up initial elements (if any)
adding code for Reduction using nodegroups
Definition at line 745 of file ckarray.C.
References addListener(), broadcaster, CkArrayOptions::broadcastViaScheduler, CcdCallOnConditionKeep(), children, Converse::CkMyPe(), CkReductionMgr::ckSetReductionClient(), CmiAlloc(), CmiMyPe(), CmiTrue, CkArrayOptions::disableNotifyChildInRed, CkReductionMgr::disableNotifyChildrenStart, factor, CkArrayOptions::getListener(), CkArrayOptions::getListeners(), CkMarshalledMessage::getMessage(), CkCallback::invalid, level, listenerDataOffset, listeners, locMgr, max(), CkReductionMgr::nodeProxy, numChildren, numInitial, CkLocMgr::populateInitial(), reducer, CkArrayOptions::reductionClient, CkVec< T >::size(), stableLocations, staticSpringCleaning(), IrrGroup::thisgroup, and CkCallback::type.
| CkArray::CkArray | ( | CkMigrateMessage * | m | ) |
| CkGroupID& CkArray::getGroupID | ( | void | ) | [inline] |
Definition at line 660 of file ckarray.h.
Referenced by CkArrayElementRangeIterator< T >::addLocation(), and insertInitial().
| CkLocMgr* CkArray::getLocMgr | ( | void | ) | [inline] |
Definition at line 663 of file ckarray.h.
Referenced by _processArrayEltMsg(), _processTicketRequest(), _resendMessagesHandler(), CkArrayOptions::bindTo(), CpdPythonGroup::buildIterator(), CkArrayMessageObjectPtr(), CProxy_ArrayBase::ckLocMgr(), ArrayElement::init_checkpt(), ArrayElement::inmem_checkpoint(), CkArrayElementRangeIterator< T >::iterate(), prepareCtorMsg(), updateHomePE(), and CkObjID::updatePosition().
| const CkArrayIndex& CkArray::getNumInitial | ( | void | ) | const [inline] |
Definition at line 664 of file ckarray.h.
Referenced by ArrayMeshStreamer< dtype, itype >::ArrayMeshStreamer().
| int CkArray::homePe | ( | const CkArrayIndex & | idx | ) | const [inline] |
Definition at line 665 of file ckarray.h.
Referenced by broadcastHomeElements(), ComlibArrayInfo::getCombinedCountList(), and ComlibArrayInfo::purge().
| int CkArray::procNum | ( | const CkArrayIndex & | idx | ) | const [inline] |
| int CkArray::lastKnown | ( | const CkArrayIndex & | idx | ) | const [inline] |
Return the last known processor for this array index.
Valid for any possible array index.
Definition at line 670 of file ckarray.h.
Referenced by ComlibManager::ArraySend(), ComlibManager::bracketedDiscover(), ComlibManager::bracketedStartDiscovery(), ComlibSectionInfo::getLocalIndices(), ComlibSectionInfo::getNodeLocalIndices(), ComlibSectionInfo::getPeCount(), ComlibSectionInfo::getPeList(), ComlibSectionInfo::getRemotePelist(), CkObjID::guessPE(), CkMulticastMgr::initCookie(), and ArrayMeshStreamer< dtype, itype >::insertData().
| int CkArray::deliver | ( | CkMessage * | m, | |
| CkDeliver_t | type, | |||
| int | opts = 0 | |||
| ) | [inline] |
Deliver message to this element (directly if local) doFree if is local.
Definition at line 674 of file ckarray.h.
Referenced by ComlibManager::ArraySend(), CkSendMsgArray(), CkSendMsgArrayInline(), ComlibArrayInfo::deliver(), CharmStrategy::deliverToIndices(), and ComlibArrayInfo::localMulticast().
| ArrayElement* CkArray::lookup | ( | const CkArrayIndex & | index | ) | [inline] |
Fetch a local element via its index (return NULL if not local).
Definition at line 677 of file ckarray.h.
Referenced by CpdPythonArrayIterator::addLocation(), MeshStreamerClientIterator< dtype >::addLocation(), and CkArrayElementRangeIterator< T >::addLocation().
| CkMigratable * CkArray::allocateMigrated | ( | int | elChareType, | |
| const CkArrayIndex & | idx, | |||
| CkElementCreation_t | type | |||
| ) | [virtual] |
Create-after-migrate:.
Implements CkArrMgr.
Definition at line 891 of file ckarray.C.
References allocate(), CkElementCreation_resume, CmiTrue, and ArrayElement::listenerData.
| void CkArray::prepareCtorMsg | ( | CkMessage * | m, | |
| int & | onPe, | |||
| const CkArrayIndex & | idx | |||
| ) |
Prepare creation message:.
Definition at line 880 of file ckarray.C.
References Converse::CkMyPe(), getLocMgr(), envelope::getsetArrayIndex(), envelope::getsetArrayListenerData(), CkLocMgr::inform(), procNum(), and UsrToEnv().
Referenced by CProxy_ArrayBase::ckInsertIdx(), demandCreateElement(), and insertInitial().
| void CkArray::insertInitial | ( | const CkArrayIndex & | idx, | |
| void * | ctorMsg, | |||
| int | local = 1 | |||
| ) | [virtual] |
Create initial array elements:.
Implements CkArrMgr.
Definition at line 992 of file ckarray.C.
References CkArrayManagerInsert(), Converse::CkMyPe(), getGroupID(), insertElement(), and prepareCtorMsg().
| void CkArray::doneInserting | ( | void | ) | [virtual] |
Done with initial insertions.
Implements CkArrMgr.
Definition at line 957 of file ckarray.C.
References Converse::CkMyPe(), and thisProxy.
| void CkArray::remoteDoneInserting | ( | void | ) |
This is called on every processor after the last array insertion.
Definition at line 963 of file ckarray.C.
References CmiFalse, CkLocMgr::doneInserting(), isInserting, listeners, locMgr, and CkVec< T >::size().
Create manually:.
This method is called by ck.C or the user to add an element.
Definition at line 927 of file ckarray.C.
References _entryTable, CkLocMgr::addElement(), allocate(), CkArrayManagerInsert(), CmiFalse, CmiTrue, idx, CkLocMgr::isRemote(), listeners, locMgr, and IrrGroup::thisgroup.
Referenced by _processArrayEltInitMsg(), demandCreateElement(), and insertInitial().
| CmiBool CkArray::demandCreateElement | ( | const CkArrayIndex & | idx, | |
| int | onPe, | |||
| int | ctor, | |||
| CkDeliver_t | type | |||
| ) | [virtual] |
Demand-creation:.
Implements CkArrMgr.
Definition at line 974 of file ckarray.C.
References CkArrayMessage::array_ep(), CkAllocSysMsg(), CkArrayManagerInsert(), CkDeliver_queue, Converse::CkMyPe(), CmiTrue, idx2str(), insertElement(), prepareCtorMsg(), and IrrGroup::thisgroup.
| void CkArray::sendBroadcast | ( | CkMessage * | msg | ) |
Broadcast communication:.
Reflect a broadcast off this Pe:.
Definition at line 1311 of file ckarray.C.
References children, CkCopyMsg(), Converse::CkMyPe(), numChildren, recvBroadcast(), and thisProxy.
| void CkArray::recvBroadcast | ( | CkMessage * | msg | ) |
Increment broadcast count; deliver to all local elements.
Definition at line 1391 of file ckarray.C.
References broadcaster, CkLocMgr::callForAllRecords(), CmiFalse, CmiTrue, CkArrayBroadcaster::deliver(), elements, CkVec< T >::getVec(), idx, CkArrayBroadcaster::incoming(), locMgr, CkMigratableListT< T >::next(), CkVec< T >::push_back(), CkVec< T >::size(), stableLocations, and staticBroadcastHomeElements().
Referenced by recvBroadcastViaTree(), and sendBroadcast().
| void CkArray::sendExpeditedBroadcast | ( | CkMessage * | msg | ) |
| void CkArray::recvExpeditedBroadcast | ( | CkMessage * | msg | ) | [inline] |
| void CkArray::recvBroadcastViaTree | ( | CkMessage * | msg | ) |
Definition at line 1343 of file ckarray.C.
References children, CkCopyMsg(), numChildren, recvBroadcast(), and thisProxy.
| void CkArray::pup | ( | PUP::er & | p | ) | [virtual] |
Restore our default listeners:
set up broadcast cleaner
Reimplemented from CkReductionMgr.
Definition at line 848 of file ckarray.C.
References CkLocMgr::addManager(), broadcaster, CcdCallOnConditionKeep(), elements, PUP::er::isUnpacking(), listenerDataOffset, listeners, locMgr, locMgrID, numInitial, CkReductionMgr::pup(), reducer, stableLocations, staticSpringCleaning(), testPup(), IrrGroup::thisgroup, and thisProxy.
| void CkArray::ckJustMigrated | ( | void | ) | [inline, virtual] |
| virtual CmiBool CkArray::isArrMgr | ( | void | ) | [inline, virtual] |
| ArrayElement * CkArray::allocate | ( | int | elChareType, | |
| const CkArrayIndex & | idx, | |||
| CkMessage * | msg, | |||
| CmiBool | fromMigration | |||
| ) | [private] |
Are we currently inserting elements?
Allocate space for a new array element
Definition at line 904 of file ckarray.C.
References _chareTable, elem, ArrayElement_initInfo::fromMigration, init(), ArrayElement_initInfo::listenerData, malloc(), numInitial, ArrayElement_initInfo::numInitial, setMemoryTypeChare(), ArrayElement_initInfo::thisArray, ArrayElement_initInfo::thisArrayID, IrrGroup::thisgroup, and UsrToEnv().
Referenced by allocateMigrated(), and insertElement().
| void CkArray::springCleaning | ( | void | ) | [inline, private] |
Definition at line 501 of file ckarray.C.
References broadcaster, and CkArrayBroadcaster::springCleaning().
| void CkArray::staticSpringCleaning | ( | void * | forWhom, | |
| double | curWallTime | |||
| ) | [static, private] |
| void CkArray::addListener | ( | CkArrayListener * | l | ) | [inline] |
Definition at line 743 of file ckarray.h.
References CkArrayListener::ckGetLen().
Referenced by CkArray().
| void CkArray::flushStates | ( | ) | [inline, virtual] |
Reimplemented from IrrGroup.
Definition at line 757 of file ckarray.h.
References IrrGroup::flushStates().
| virtual int CkArray::numberReductionMessages | ( | ) | [inline, virtual] |
Reimplemented from CkReductionMgr.
Definition at line 760 of file ckarray.h.
References Converse::CkMyPe().
| void CkArray::broadcastHomeElements | ( | void * | data, | |
| CkLocRec * | rec, | |||
| CkArrayIndex * | index | |||
| ) |
Definition at line 1357 of file ckarray.C.
References _entryTable, CkArrayMessage::array_ep_bcast(), CkCopyMsg(), CkDeliver_queue, Converse::CkMyPe(), CmiMyPe(), CmiPrintf(), copy(), CkObjID::data, CkLocRec::deliver(), envelope::getsetArrayEp(), envelope::getsetArrayIndex(), envelope::getsetArrayMgr(), _ObjectID::group, CkLocMgr::homeElementCount, homePe(), _ckGroupID::idx, idx2str(), locMgr, _ObjectID::onPE, envelope::piggyBcastIdx, envelope::sender, envelope::setEpIdx(), envelope::setSrcPe(), envelope::SN, IrrGroup::thisgroup, envelope::TN, and UsrToEnv().
Referenced by staticBroadcastHomeElements().
| void CkArray::staticBroadcastHomeElements | ( | CkArray * | arr, | |
| void * | data, | |||
| CkLocRec * | rec, | |||
| CkArrayIndex * | index | |||
| ) | [static] |
Definition at line 1381 of file ckarray.C.
References broadcastHomeElements().
Referenced by recvBroadcast().
friend class ArrayElement [friend] |
friend class CProxy_ArrayBase [friend] |
CkMagicNumber<ArrayElement> CkArray::magic [private] |
CkLocMgr* CkArray::locMgr [private] |
Definition at line 644 of file ckarray.h.
Referenced by broadcastHomeElements(), CkArray(), insertElement(), pup(), recvBroadcast(), and remoteDoneInserting().
CkGroupID CkArray::locMgrID [private] |
CProxy_CkArray CkArray::thisProxy [private] |
Reimplemented from CkReductionMgr.
Definition at line 646 of file ckarray.h.
Referenced by doneInserting(), pup(), recvBroadcastViaTree(), sendBroadcast(), and sendExpeditedBroadcast().
ArrayElementList* CkArray::elements [private] |
int* CkArray::children [private] |
Definition at line 650 of file ckarray.h.
Referenced by CkArray(), recvBroadcastViaTree(), and sendBroadcast().
int CkArray::numChildren [private] |
Definition at line 651 of file ckarray.h.
Referenced by CkArray(), recvBroadcastViaTree(), and sendBroadcast().
bool CkArray::stableLocations [private] |
CkArrayIndex CkArray::numInitial [private] |
CmiBool CkArray::isInserting [private] |
Number of initial array elements.
Definition at line 719 of file ckarray.h.
Referenced by CkArray(), and remoteDoneInserting().
CkPupAblePtrVec<CkArrayListener> CkArray::listeners [private] |
Definition at line 740 of file ckarray.h.
Referenced by ArrayElement::ckAboutToMigrate(), CkArray(), ArrayElement::ckDestroy(), ArrayElement::ckJustMigrated(), ArrayElement::initBasics(), insertElement(), pup(), and remoteDoneInserting().
int CkArray::listenerDataOffset [private] |
CkArrayReducer* CkArray::reducer [private] |
Definition at line 754 of file ckarray.h.
Referenced by CkArray(), ArrayElement::contribute2(), and pup().
CkArrayBroadcaster* CkArray::broadcaster [private] |
Definition at line 755 of file ckarray.h.
Referenced by CkArray(), pup(), recvBroadcast(), and springCleaning().
1.5.5