#include <ckarray.h>
Public Member Functions | |
ArrayElement (void) | |
ArrayElement (CkMigrateMessage *m) | |
virtual | ~ArrayElement () |
void | pup (PUP::er &p) |
Pack/unpack routine (called before and after migration). | |
virtual void | ckAboutToMigrate (void) |
Called by the system just before and after migration to another processor:. | |
virtual void | ckJustMigrated (void) |
virtual void | ckJustRestored (void) |
virtual void | ckDestroy (void) |
Delete this object. | |
virtual char * | ckDebugChareName (void) |
Return a strdup'd array containing this object's string name. | |
virtual int | ckDebugChareID (char *, int) |
Place into str a copy of the id of this object up to limit bytes, return the number of bytes used for the id. | |
void | migrateMe (int toPe) |
Synonym for ckMigrate. | |
void | contribute2 (CkArrayIndex myIndex, int dataSize, const void *data, CkReduction::reducerType type, const CkCallback &cb, CMK_REFNUM_TYPE userFlag=(CMK_REFNUM_TYPE)-1) |
void | contribute2 (int dataSize, const void *data, CkReduction::reducerType type, CMK_REFNUM_TYPE userFlag=(CMK_REFNUM_TYPE)-1) |
void | contribute2 (int dataSize, const void *data, CkReduction::reducerType type, const CkCallback &cb, CMK_REFNUM_TYPE userFlag=(CMK_REFNUM_TYPE)-1) |
void | contribute2 (CkReductionMsg *msg) |
void | contribute2 (const CkCallback &cb, CMK_REFNUM_TYPE userFlag=(CMK_REFNUM_TYPE)-1) |
void | contribute2 (CMK_REFNUM_TYPE userFlag=(CMK_REFNUM_TYPE)-1) |
CK_REDUCTION_CONTRIBUTE_METHODS_DECL void | defrag (CkReductionMsg *msg) |
const CkArrayID & | ckGetArrayID (void) const |
ck::ObjID | ckGetID (void) const |
int | ckGetArraySize (void) const |
int | getRedNo (void) const |
void | inmem_checkpoint (CkArrayCheckPTReqMessage *m) |
void | recvBroadcast (CkMessage *) |
Data Fields | |
int | grid_queue_interval |
int | grid_queue_threshold |
int | msg_count |
int | msg_count_grid |
int | border_flag |
Protected Member Functions | |
virtual void | CkAbort (const char *str) const |
A more verbose form of abort. | |
Protected Attributes | |
CkArray * | thisArray |
CkArrayID | thisArrayID |
int | budPEs [2] |
Private Member Functions | |
void | initBasics (void) |
void | init_checkpt () |
Private Attributes | |
int | numInitialElements |
AllreduceMgr * | allredMgr |
int | listenerData [CK_ARRAYLISTENER_MAXLEN] |
Friends | |
class | CkArray |
class | CkArrayListener |
class | CkMemCheckPT |
class | CkLocMgr |
Unlike regular chares, array elements can migrate from one Pe to another. Each element has a unique index.
Definition at line 290 of file ckarray.h.
ArrayElement::ArrayElement | ( | void | ) |
Definition at line 285 of file ckarray.C.
References init_checkpt(), and initBasics().
ArrayElement::ArrayElement | ( | CkMigrateMessage * | m | ) |
Definition at line 293 of file ckarray.C.
References initBasics().
ArrayElement::~ArrayElement | ( | ) | [virtual] |
void ArrayElement::initBasics | ( | void | ) | [private] |
Definition at line 247 of file ckarray.C.
References allredMgr, _ObjectID::array, border_flag, ckGetID(), CmiGridQueueGetInterval(), CmiGridQueueGetThreshold(), CkObjID::data, ArrayElement_initInfo::fromMigration, ck::ObjID::getID(), grid_queue_interval, grid_queue_threshold, _ObjectID::s_array::id, info, PUP::l, ArrayElement_initInfo::listenerData, listenerData, CkArray::listeners, Chare::mlogData, msg_count, msg_count_grid, ArrayElement_initInfo::numInitial, numInitialElements, ChareMlogData::objID, ArrayElement_initInfo::thisArray, thisArray, ArrayElement_initInfo::thisArrayID, thisArrayID, CkObjID::type, and TypeArray.
Referenced by ArrayElement().
void ArrayElement::pup | ( | PUP::er & | p | ) | [virtual] |
Pack/unpack routine (called before and after migration).
Reimplemented from CkMigratable.
Reimplemented in ArrayElemExt, Cell, Cell2D, Cell1D, Cell3D, ArmciVirtualProcessor, threadCollide, and TCharmClient1D.
Definition at line 439 of file ckarray.C.
References border_flag, budPEs, CkArrayID::ckLocalBranch(), grid_queue_interval, grid_queue_threshold, PUP::er::isUnpacking(), listenerData, msg_count, msg_count_grid, p, CkArrayID::pup(), CkMigratable::pup(), PUP::sync_last_system, PUP::er::syncComment(), thisArray, and thisArrayID.
Referenced by TCharmClient1D::pup(), Cell::pup(), and ArrayElemExt::pup().
void ArrayElement::ckAboutToMigrate | ( | void | ) | [virtual] |
Called by the system just before and after migration to another processor:.
Reimplemented from CkMigratable.
Definition at line 299 of file ckarray.C.
References CkMigratable::ckAboutToMigrate(), PUP::l, CkArray::listeners, and thisArray.
Referenced by TCharm::ckAboutToMigrate().
void ArrayElement::ckJustMigrated | ( | void | ) | [virtual] |
Reimplemented from CkMigratable.
Reimplemented in threadCollide, and TCharmClient1D.
Definition at line 304 of file ckarray.C.
References CkMigratable::ckJustMigrated(), PUP::l, CkArray::listeners, and thisArray.
Referenced by TCharmClient1D::ckJustMigrated(), TCharm::ckJustMigrated(), ParFUMShadowArray::ckJustMigrated(), femMeshModify::ckJustMigrated(), and MBlockChunk::ckJustMigrated().
void ArrayElement::ckJustRestored | ( | void | ) | [virtual] |
Reimplemented from CkMigratable.
Definition at line 310 of file ckarray.C.
References CkMigratable::ckJustRestored().
Referenced by TCharm::ckJustRestored().
void ArrayElement::ckDestroy | ( | void | ) | [virtual] |
Delete this object.
Reimplemented from CkMigratable.
Definition at line 416 of file ckarray.C.
References _BgOutOfCoreFlag, CkMigratable::ckGetID(), CkArray::deleteElt(), PUP::l, CkArray::listeners, and thisArray.
char * ArrayElement::ckDebugChareName | ( | void | ) | [virtual] |
Return a strdup'd array containing this object's string name.
Reimplemented from Chare.
Definition at line 465 of file ckarray.C.
References _chareTable, buf, CkMigratable::ckGetChareType(), PUP::d, PUP::s, strdup(), and CkMigratable::thisIndexMax.
Referenced by CpdList_arrayElements::add(), and CpdList_arrayElementNames::add().
Place into str a copy of the id of this object up to limit bytes, return the number of bytes used for the id.
Reimplemented from Chare.
Definition at line 483 of file ckarray.C.
References thisArrayID, and CkMigratable::thisIndexMax.
void ArrayElement::migrateMe | ( | int | toPe | ) | [inline] |
Synonym for ckMigrate.
Definition at line 320 of file ckarray.h.
Referenced by CkMigrateExt().
void ArrayElement::contribute2 | ( | CkArrayIndex | myIndex, | |
int | dataSize, | |||
const void * | data, | |||
CkReduction::reducerType | type, | |||
const CkCallback & | cb, | |||
CMK_REFNUM_TYPE | userFlag = (CMK_REFNUM_TYPE)-1 | |||
) |
Definition at line 354 of file ckarray.C.
References allredMgr, CkCallback::bcastArray, CkReductionMsg::buildNew(), CkReductionMsg::callback, AllreduceMgr::cb, CkArrayListener::ckGetOffset(), CkReductionMgr::contribute(), CkCallback::d, CkReductionMsg::fragNo, listenerData, msg, CkReductionMsg::nFrags, CkArray::reducer, CkReductionMsg::reducer, CkCallback::sendArray, CkReductionMsg::setCallback(), CkReductionMsg::setMigratableContributor(), CkReductionMsg::setUserFlag(), size, thisArray, thisArrayID, CkCallback::type, and CkReductionMsg::userFlag.
void ArrayElement::contribute2 | ( | int | dataSize, | |
const void * | data, | |||
CkReduction::reducerType | type, | |||
CMK_REFNUM_TYPE | userFlag = (CMK_REFNUM_TYPE)-1 | |||
) |
Definition at line 316 of file ckarray.C.
References CkReductionMsg::buildNew(), CkArrayListener::ckGetOffset(), CkReductionMgr::contribute(), listenerData, msg, CkArray::reducer, CkReductionMsg::setMigratableContributor(), CkReductionMsg::setUserFlag(), and thisArray.
void ArrayElement::contribute2 | ( | int | dataSize, | |
const void * | data, | |||
CkReduction::reducerType | type, | |||
const CkCallback & | cb, | |||
CMK_REFNUM_TYPE | userFlag = (CMK_REFNUM_TYPE)-1 | |||
) |
Definition at line 324 of file ckarray.C.
References CkReductionMsg::buildNew(), CkArrayListener::ckGetOffset(), CkReductionMgr::contribute(), listenerData, msg, CkArray::reducer, CkReductionMsg::setCallback(), CkReductionMsg::setMigratableContributor(), CkReductionMsg::setUserFlag(), and thisArray.
void ArrayElement::contribute2 | ( | CkReductionMsg * | msg | ) |
Definition at line 333 of file ckarray.C.
References CkArrayListener::ckGetOffset(), CkReductionMgr::contribute(), listenerData, CkArray::reducer, CkReductionMsg::setMigratableContributor(), and thisArray.
void ArrayElement::contribute2 | ( | const CkCallback & | cb, | |
CMK_REFNUM_TYPE | userFlag = (CMK_REFNUM_TYPE)-1 | |||
) |
Definition at line 338 of file ckarray.C.
References CkReductionMsg::buildNew(), CkArrayListener::ckGetOffset(), CkReductionMgr::contribute(), listenerData, msg, CkReduction::nop, CkArray::reducer, CkReductionMsg::setCallback(), CkReductionMsg::setMigratableContributor(), CkReductionMsg::setUserFlag(), and thisArray.
void ArrayElement::contribute2 | ( | CMK_REFNUM_TYPE | userFlag = (CMK_REFNUM_TYPE)-1 |
) |
Definition at line 346 of file ckarray.C.
References CkReductionMsg::buildNew(), CkArrayListener::ckGetOffset(), CkReductionMgr::contribute(), listenerData, msg, CkReduction::nop, CkArray::reducer, CkReductionMsg::setMigratableContributor(), CkReductionMsg::setUserFlag(), and thisArray.
CK_REDUCTION_CONTRIBUTE_METHODS_DECL void ArrayElement::defrag | ( | CkReductionMsg * | msg | ) | [inline] |
const CkArrayID& ArrayElement::ckGetArrayID | ( | void | ) | const [inline] |
Definition at line 337 of file ckarray.h.
Referenced by CkCallback::CkCallback().
ck::ObjID ArrayElement::ckGetID | ( | void | ) | const [inline] |
Reimplemented from CkMigratable.
Definition at line 338 of file ckarray.h.
Referenced by CkArrayBroadcaster::deliver(), initBasics(), and ~ArrayElement().
int ArrayElement::getRedNo | ( | void | ) | const |
Definition at line 408 of file ckarray.C.
References CkArrayListener::ckGetOffset(), listenerData, CkArray::reducer, and thisArray.
Referenced by CkArrayGetReductionNumber().
void ArrayElement::CkAbort | ( | const char * | str | ) | const [protected, virtual] |
A more verbose form of abort.
Reimplemented from CkMigratable.
Definition at line 492 of file ckarray.C.
References CkMigratable::CkAbort(), Converse::CkMyPe(), idx2str(), and CkMigratable::thisIndexMax.
Referenced by chunk::deriveNodes(), TCharmClient1D::findThread(), chunk::sanityCheck(), and chunk::updateNodeCoords().
void ArrayElement::init_checkpt | ( | ) | [private] |
Definition at line 167 of file ckmemcheckpoint.C.
References _memChkptOn, budPEs, CkInRestarting(), Converse::CkMyPe(), CkLocMgr::getGroupID(), CkArray::getLocMgr(), CkLocMgr::managers, thisArray, thisArrayID, and CkMigratable::thisIndexMax.
Referenced by ArrayElement().
void ArrayElement::inmem_checkpoint | ( | CkArrayCheckPTReqMessage * | m | ) |
Definition at line 187 of file ckmemcheckpoint.C.
References CkArrayCheckPTMessage::aid, budPEs, CkElementCreation_migrate, CkArrayCheckPTMessage::cp_flag, CkLocMgr::getGroupID(), CkArray::getLocMgr(), CkArrayCheckPTMessage::index, CkArrayCheckPTMessage::len, CkArrayCheckPTMessage::locMgr, msg, CkMigratable::myRec, p, CkArrayCheckPTMessage::packData, CkLocMgr::pupElementsFor(), PUP::sizer::size(), size, thisArray, thisArrayID, and CkMigratable::thisIndexMax.
void ArrayElement::recvBroadcast | ( | CkMessage * | m | ) |
Definition at line 499 of file ckarray.C.
References CkMigratable::ckInvokeEntry(), and UsrToEnv().
friend class CkArrayListener [friend] |
friend class CkMemCheckPT [friend] |
friend class CkLocMgr [friend] |
int ArrayElement::numInitialElements [private] |
AllreduceMgr* ArrayElement::allredMgr [private] |
Definition at line 298 of file ckarray.h.
Referenced by CK_REDUCTION_CONTRIBUTE_METHODS_DEF(), contribute2(), and initBasics().
CkArray* ArrayElement::thisArray [protected] |
Definition at line 345 of file ckarray.h.
Referenced by ckAboutToMigrate(), ckDestroy(), ckJustMigrated(), contribute2(), getRedNo(), init_checkpt(), initBasics(), inmem_checkpoint(), pup(), and ~ArrayElement().
CkArrayID ArrayElement::thisArrayID [protected] |
Definition at line 346 of file ckarray.h.
Referenced by ArrayElemExt::__entryMethod(), ArmciVirtualProcessor::ArmciVirtualProcessor(), ArrayElemExt::ArrayElemExt(), Cell1D::Cell1D(), Cell2D::Cell2D(), Cell3D::Cell3D(), ckDebugChareID(), contribute2(), taskGraphArray::deleteElement(), threadCollide::getArrayID(), init_checkpt(), initBasics(), inmem_checkpoint(), Cell3D::pup(), Cell1D::pup(), Cell2D::pup(), pup(), taskGraphArray::requestData(), taskGraphArray::taskGraphArray(), and taskGraphArray::tryToSolve().
int ArrayElement::listenerData[CK_ARRAYLISTENER_MAXLEN] [private] |
Definition at line 353 of file ckarray.h.
Referenced by CkArrayListener::ckGetData(), contribute2(), getRedNo(), initBasics(), CkMemCheckPT::inmem_restore(), pup(), CkLocMgr::pupElementsFor(), and CkArray::stampListenerData().
int ArrayElement::budPEs[2] [protected] |
Definition at line 359 of file ckarray.h.
Referenced by init_checkpt(), inmem_checkpoint(), CkMemCheckPT::inmem_restore(), and pup().
Reimplemented in Cell.
Definition at line 371 of file ckarray.h.
Referenced by initBasics(), and pup().