#include <cklocrec.h>
Public Member Functions | |
CkLocRec (CkLocMgr *mgr, bool fromMigration, bool ignoreArrival, const CkArrayIndex &idx_, CmiUInt8 id) | |
void | migrateMe (int toPe) |
void | destroy (void) |
~CkLocRec () | |
bool | invokeEntry (CkMigratable *obj, void *msg, int idx, bool doFree) |
Invoke the given entry method on this element. | |
void | startTiming (int ignore_running=0) |
Control the load balancer:. | |
void | stopTiming (int ignore_running=0) |
void | setObjTime (double cputime) |
double | getObjTime () |
void * | getObjUserData (int idx) |
void | startTiming (int ignore_running=0) |
void | stopTiming (int ignore_running=0) |
const CkArrayIndex & | getIndex (void) const |
CmiUInt8 | getID () const |
LBDatabase * | getLBDB (void) const |
MetaBalancer * | getMetaBalancer (void) const |
LDObjHandle | getLdHandle () const |
void | recvMigrate (int dest) |
void | setMigratable (int migratable) |
void | setPupSize (size_t obj_pup_size) |
set migratable | |
void | AsyncMigrate (bool use) |
bool | isAsyncMigrate () |
void | ReadyMigrate (bool ready) |
bool | isReadyMigrate () |
called from user | |
bool | checkBufferedMigration () |
int | MigrateToPe () |
void | Migrated () |
void | setMeasure (bool status) |
void | AsyncMigrate (bool use) |
bool | isAsyncEvacuate () |
void | AsyncEvacuate (bool set) |
bool | isBounced () |
void | Bounced (bool set) |
Static Public Member Functions | |
static void | staticMigrate (LDObjHandle h, int dest) |
static void | staticMetaLBResumeWaitingChares (LDObjHandle h, int lb_ideal_period) |
static void | staticMetaLBCallLBOnChares (LDObjHandle h) |
Private Attributes | |
CkLocMgr * | myLocMgr |
CkArrayIndex | idx |
CmiUInt8 | id |
Element's array index. | |
bool * | deletedMarker |
bool | running |
Set this if we're deleted during processing. | |
bool | asyncMigrate |
True when inside a startTiming/stopTiming pair. | |
bool | readyMigrate |
if readyMove is inited | |
bool | enable_measure |
status whether it is ready to migrate | |
int | nextPe |
LBDatabase * | the_lbdb |
next migration dest processor | |
MetaBalancer * | the_metalb |
LDObjHandle | ldHandle |
bool | asyncEvacuate |
bool | bounced |
The location manager's main hashtable maps array indices to CkLocRec *'s.
Definition at line 13 of file cklocrec.h.
CkLocRec::CkLocRec | ( | CkLocMgr * | mgr, | |
bool | fromMigration, | |||
bool | ignoreArrival, | |||
const CkArrayIndex & | idx_, | |||
CmiUInt8 | id | |||
) |
Definition at line 1838 of file cklocation.C.
References _lb_args, asyncEvacuate, asyncMigrate, bounced, enable_measure, CkLocMgr::getGroupID(), CkLocMgr::getLBDB(), CkLocMgr::getMetaBalancer(), CkLocMgr::getOMHandle(), _ckGroupID::idx, idx, idx2str(), ldHandle, CkLBArgs::metaLbOn(), LBDatabase::Migrated(), nextPe, readyMigrate, LBDatabase::RegisterObj(), the_lbdb, and the_metalb.
CkLocRec::~CkLocRec | ( | ) |
Definition at line 1878 of file cklocation.C.
References deletedMarker, idx, idx2str(), ldHandle, stopTiming(), the_lbdb, and LBDatabase::UnregisterObj().
void CkLocRec::migrateMe | ( | int | toPe | ) |
Definition at line 1887 of file cklocation.C.
References CkLocMgr::emigrate(), and myLocMgr.
Referenced by checkBufferedMigration(), CkEmmigrateElement(), CkMigratable::ckMigrate(), and recvMigrate().
void CkLocRec::destroy | ( | void | ) |
Definition at line 1922 of file cklocation.C.
References myLocMgr, and CkLocMgr::reclaim().
Referenced by CkMigratable::~CkMigratable().
bool CkLocRec::invokeEntry | ( | CkMigratable * | obj, | |
void * | msg, | |||
int | idx, | |||
bool | doFree | |||
) |
Invoke the given entry method on this element.
Returns false if the element died during the receive. If doFree is true, the message is freed after send; if false, the message can be reused.
Definition at line 1954 of file cklocation.C.
References _entryTable, checkBufferedMigration(), CkDeliverMessageFree(), CkDeliverMessageReadonly(), deletedMarker, ForChareMsg, envelope::getEvent(), envelope::getSrcPe(), envelope::getTotalsize(), idx, idx2str(), startTiming(), stopTiming(), and UsrToEnv().
Referenced by CkLocMgr::addElementToRec(), CkArrayPrefetch_readFromSwap(), CkMigratable::ckInvokeEntry(), and CkLocMgr::pupElementsFor().
void CkLocRec::startTiming | ( | int | ignore_running = 0 |
) |
Control the load balancer:.
Definition at line 1895 of file cklocation.C.
References enable_measure, idx, idx2str(), ldHandle, LBDatabase::ObjectStart(), running, and the_lbdb.
Referenced by CkMigratable::ckStartTiming(), invokeEntry(), and CkMigratable::timingBeforeCall().
void CkLocRec::stopTiming | ( | int | ignore_running = 0 |
) |
Definition at line 1900 of file cklocation.C.
References enable_measure, idx, idx2str(), ldHandle, LBDatabase::ObjectStop(), running, and the_lbdb.
Referenced by CkMigratable::ckStopTiming(), invokeEntry(), CkMigratable::timingAfterCall(), and ~CkLocRec().
void CkLocRec::setObjTime | ( | double | cputime | ) |
Definition at line 1905 of file cklocation.C.
References LBDatabase::EstObjLoad(), ldHandle, and the_lbdb.
Referenced by CkMigratable::setObjTime().
double CkLocRec::getObjTime | ( | ) |
Definition at line 1908 of file cklocation.C.
References LBDatabase::GetObjLoad(), ldHandle, and the_lbdb.
Referenced by CkMigratable::AtSync(), and CkMigratable::getObjTime().
void * CkLocRec::getObjUserData | ( | int | idx | ) |
Definition at line 1914 of file cklocation.C.
References LBDatabase::GetDBObjUserData(), ldHandle, and the_lbdb.
Referenced by CkMigratable::getObjUserData().
void CkLocRec::startTiming | ( | int | ignore_running = 0 |
) | [inline] |
Definition at line 53 of file cklocrec.h.
void CkLocRec::stopTiming | ( | int | ignore_running = 0 |
) | [inline] |
Definition at line 54 of file cklocrec.h.
const CkArrayIndex& CkLocRec::getIndex | ( | void | ) | const [inline] |
Definition at line 56 of file cklocrec.h.
References idx.
Referenced by CkLocMgr::addElementToRec(), CkEmmigrateElement(), CkMigratable::ckGetArrayIndex(), CkMigratable::commonInit(), CkLocMgr::deliverMsg(), CkLocMgr::emigrate(), CkLocation::getIndex(), CkLocMgr::pupElementsFor(), and CkLocMgr::reclaim().
CmiUInt8 CkLocRec::getID | ( | ) | const [inline] |
Definition at line 57 of file cklocrec.h.
References id.
Referenced by CkArray::broadcastHomeElements(), CkLocMgr::callMethod(), CkMigratable::ckGetID(), CkLocMgr::emigrate(), CkLocation::getID(), CkLocMgr::migratableList(), CkLocMgr::pupElementsFor(), and CkLocMgr::reclaim().
LBDatabase* CkLocRec::getLBDB | ( | void | ) | const [inline] |
Definition at line 61 of file cklocrec.h.
References the_lbdb.
Referenced by _verifyAckRequestHandler(), CkMigratable::AtSync(), CkMigratable::ckFinishConstruction(), CkMigratable::getLBDB(), CkMigratable::metaLBCallLB(), and CkMigratable::~CkMigratable().
MetaBalancer* CkLocRec::getMetaBalancer | ( | void | ) | const [inline] |
Definition at line 62 of file cklocrec.h.
References the_metalb.
Referenced by CkMigratable::AtSync(), CkMigratable::commonInit(), CkMigratable::getMetaBalancer(), CkMigratable::recvLBPeriod(), and CkMigratable::~CkMigratable().
LDObjHandle CkLocRec::getLdHandle | ( | ) | const [inline] |
Definition at line 63 of file cklocrec.h.
References ldHandle.
Referenced by _verifyAckRequestHandler().
void CkLocRec::staticMigrate | ( | LDObjHandle | h, | |
int | dest | |||
) | [static] |
Definition at line 2016 of file cklocation.C.
References idx, idx2str(), LDObjUserData(), and recvMigrate().
void CkLocRec::staticMetaLBResumeWaitingChares | ( | LDObjHandle | h, | |
int | lb_ideal_period | |||
) | [static] |
Definition at line 2004 of file cklocation.C.
References idx, idx2str(), CkLocMgr::informLBPeriod(), LDObjUserData(), and myLocMgr.
void CkLocRec::staticMetaLBCallLBOnChares | ( | LDObjHandle | h | ) | [static] |
Definition at line 2010 of file cklocation.C.
References idx, idx2str(), LDObjUserData(), CkLocMgr::metaLBCallLB(), and myLocMgr.
void CkLocRec::recvMigrate | ( | int | dest | ) |
Definition at line 2023 of file cklocation.C.
References migrateMe(), nextPe, and readyMigrate.
Referenced by staticMigrate().
void CkLocRec::setMigratable | ( | int | migratable | ) |
Definition at line 2059 of file cklocation.C.
References ldHandle, LBDatabase::Migratable(), LBDatabase::NonMigratable(), and the_lbdb.
Referenced by CkMigratable::setMigratable().
void CkLocRec::setPupSize | ( | size_t | obj_pup_size | ) |
set migratable
Definition at line 2067 of file cklocation.C.
References ldHandle, LBDatabase::setPupSize(), and the_lbdb.
Referenced by CkMigratable::setPupSize().
void CkLocRec::AsyncMigrate | ( | bool | use | ) |
Definition at line 2031 of file cklocation.C.
References asyncMigrate, ldHandle, the_lbdb, and LBDatabase::UseAsyncMigrate().
Referenced by CkElementEvacuate::addLocation(), CkMigratable::AtSync(), CkEmmigrateElement(), and CkLocMgr::immigrate().
bool CkLocRec::isAsyncMigrate | ( | ) | [inline] |
Definition at line 71 of file cklocrec.h.
References asyncMigrate.
Referenced by CkLocMgr::emigrate().
void CkLocRec::ReadyMigrate | ( | bool | ready | ) | [inline] |
Definition at line 72 of file cklocrec.h.
References readyMigrate.
Referenced by CkMigratable::pup(), and CkMigratable::ReadyMigrate().
bool CkLocRec::isReadyMigrate | ( | ) | [inline] |
called from user
Definition at line 73 of file cklocrec.h.
References readyMigrate.
Referenced by CkMigratable::pup().
bool CkLocRec::checkBufferedMigration | ( | ) |
Definition at line 2037 of file cklocation.C.
References migrateMe(), nextPe, and readyMigrate.
Referenced by invokeEntry().
int CkLocRec::MigrateToPe | ( | ) |
Definition at line 2052 of file cklocation.C.
References nextPe.
Referenced by CkMigratable::MigrateToPe().
void CkLocRec::Migrated | ( | ) |
Definition at line 2072 of file cklocation.C.
References ldHandle, LBDatabase::Migrated(), and the_lbdb.
void CkLocRec::setMeasure | ( | bool | status | ) | [inline] |
Definition at line 79 of file cklocrec.h.
References enable_measure.
Referenced by CkMigratable::ckFinishConstruction().
void CkLocRec::AsyncMigrate | ( | bool | use | ) | [inline] |
Definition at line 81 of file cklocrec.h.
bool CkLocRec::isAsyncEvacuate | ( | ) | [inline] |
Definition at line 92 of file cklocrec.h.
References asyncEvacuate.
Referenced by CkElementEvacuate::addLocation().
void CkLocRec::AsyncEvacuate | ( | bool | set | ) | [inline] |
Definition at line 93 of file cklocrec.h.
References asyncEvacuate.
Referenced by CkMigratable::AsyncEvacuate(), and CkMigratable::pup().
bool CkLocRec::isBounced | ( | ) | [inline] |
Definition at line 94 of file cklocrec.h.
References bounced.
Referenced by CkLocMgr::emigrate().
void CkLocRec::Bounced | ( | bool | set | ) | [inline] |
Definition at line 95 of file cklocrec.h.
References bounced.
Referenced by CkLocMgr::immigrate().
CkLocMgr* CkLocRec::myLocMgr [private] |
Definition at line 15 of file cklocrec.h.
Referenced by destroy(), migrateMe(), staticMetaLBCallLBOnChares(), and staticMetaLBResumeWaitingChares().
CkArrayIndex CkLocRec::idx [private] |
Definition at line 16 of file cklocrec.h.
Referenced by CkLocRec(), getIndex(), invokeEntry(), startTiming(), staticMetaLBCallLBOnChares(), staticMetaLBResumeWaitingChares(), staticMigrate(), stopTiming(), and ~CkLocRec().
CmiUInt8 CkLocRec::id [private] |
bool* CkLocRec::deletedMarker [private] |
bool CkLocRec::running [private] |
Set this if we're deleted during processing.
Definition at line 19 of file cklocrec.h.
Referenced by startTiming(), and stopTiming().
bool CkLocRec::asyncMigrate [private] |
True when inside a startTiming/stopTiming pair.
Definition at line 21 of file cklocrec.h.
Referenced by AsyncMigrate(), CkLocRec(), and isAsyncMigrate().
bool CkLocRec::readyMigrate [private] |
if readyMove is inited
Definition at line 22 of file cklocrec.h.
Referenced by checkBufferedMigration(), CkLocRec(), isReadyMigrate(), ReadyMigrate(), and recvMigrate().
bool CkLocRec::enable_measure [private] |
status whether it is ready to migrate
Definition at line 23 of file cklocrec.h.
Referenced by CkLocRec(), setMeasure(), startTiming(), and stopTiming().
int CkLocRec::nextPe [private] |
Definition at line 24 of file cklocrec.h.
Referenced by checkBufferedMigration(), CkLocRec(), MigrateToPe(), and recvMigrate().
LBDatabase* CkLocRec::the_lbdb [private] |
next migration dest processor
Definition at line 25 of file cklocrec.h.
Referenced by AsyncMigrate(), CkLocRec(), getLBDB(), getObjTime(), getObjUserData(), Migrated(), setMigratable(), setObjTime(), setPupSize(), startTiming(), stopTiming(), and ~CkLocRec().
MetaBalancer* CkLocRec::the_metalb [private] |
LDObjHandle CkLocRec::ldHandle [private] |
Definition at line 27 of file cklocrec.h.
Referenced by AsyncMigrate(), CkLocRec(), getLdHandle(), getObjTime(), getObjUserData(), Migrated(), setMigratable(), setObjTime(), setPupSize(), startTiming(), stopTiming(), and ~CkLocRec().
bool CkLocRec::asyncEvacuate [private] |
Definition at line 81 of file cklocrec.h.
Referenced by AsyncEvacuate(), CkLocRec(), and isAsyncEvacuate().
bool CkLocRec::bounced [private] |