#include <pvtobj.h>
Public Member Functions | |
pvtObjects () | |
Basic Constructor: preallocates space for 100 objects. | |
int | getNumObjs () |
Get number of objects in the list. | |
int | getNumSpaces () |
Get number of spaces in use in list. | |
void | SetIdle () |
Set posers to idle (ovt==-1). | |
void | Wake () |
Wake up all posers in list. | |
void | callAtSync () |
void | Commit () |
Call Commit on all posers. | |
void | CheckpointCommit () |
Call CheckpointCommit on all posers. | |
void | StratCalcs () |
Perform synchronization strategy calculations. | |
int | Insert (int index, POSE_TimeType ovt, int sync, sim *myPtr) |
Insert poser in list. | |
void | Delete (int idx) |
Delete a poser from the list. | |
void | dump () |
Dump data fields. | |
void | sanitize () |
Check validity of data fields. | |
Data Fields | |
pvtObjectNode * | objs |
the list of posers | |
Private Attributes | |
int | numObjs |
Number of posers present in the list. | |
int | numSpaces |
number of consecutive spaces in list that are or have been occupied | |
int | size |
number of spaces allocated in objs | |
int | firstEmpty |
lowest index of an empty slot in objs | |
int | stratIterCount |
counter for strat calculations |
Definition at line 70 of file pvtobj.h.
pvtObjects::pvtObjects | ( | ) |
Basic Constructor: preallocates space for 100 objects.
Definition at line 16 of file pvtobj.C.
References CkExit(), firstEmpty, malloc(), numObjs, numSpaces, objs, POSE_UnsetTS, size, and stratIterCount.
int pvtObjects::getNumObjs | ( | ) | [inline] |
Get number of objects in the list.
Definition at line 87 of file pvtobj.h.
References numObjs.
Referenced by PVT::getNumObjs().
int pvtObjects::getNumSpaces | ( | ) | [inline] |
Get number of spaces in use in list.
Definition at line 89 of file pvtobj.h.
References numSpaces.
Referenced by PVT::setGVT(), and PVT::startPhase().
void pvtObjects::SetIdle | ( | ) | [inline] |
void pvtObjects::Wake | ( | ) |
Wake up all posers in list.
Definition at line 72 of file pvtobj.C.
References pvtObjectNode::localObjPtr, numSpaces, and objs.
Referenced by PVT::startPhase().
void pvtObjects::callAtSync | ( | ) |
Definition at line 64 of file pvtobj.C.
References pvtObjectNode::localObjPtr, numSpaces, and objs.
Referenced by PVT::callAtSync().
void pvtObjects::Commit | ( | ) |
Call Commit on all posers.
Definition at line 78 of file pvtobj.C.
References pvtObjectNode::localObjPtr, numSpaces, and objs.
Referenced by PVT::setGVT().
void pvtObjects::CheckpointCommit | ( | ) |
Call CheckpointCommit on all posers.
Definition at line 84 of file pvtobj.C.
References pvtObjectNode::localObjPtr, numSpaces, and objs.
Referenced by PVT::setGVT().
void pvtObjects::StratCalcs | ( | ) |
Perform synchronization strategy calculations.
Definition at line 90 of file pvtobj.C.
References CkLocalBranch(), Converse::CkMyPe(), Converse::CkNumPes(), GVT::getGVTIterationCount(), int, pvtObjectNode::localObjPtr, sim::myStrat, numSpaces, objs, strat::STRAT_T, stratIterCount, TheGVT, and totalNumPosers.
Referenced by PVT::setGVT().
int pvtObjects::Insert | ( | int | index, | |
POSE_TimeType | ovt, | |||
int | sync, | |||
sim * | myPtr | |||
) |
Insert poser in list.
Inserts an object in the list in the firstEmpty slot, expanding the list size if necessary
Definition at line 29 of file pvtobj.C.
References CkExit(), firstEmpty, idx, numObjs, numSpaces, objs, POSE_UnsetTS, realloc(), pvtObjectNode::set(), and size.
Referenced by PVT::objRegister().
void pvtObjects::Delete | ( | int | idx | ) | [inline] |
Delete a poser from the list.
Definition at line 109 of file pvtobj.h.
References firstEmpty, numObjs, objs, POSE_UnsetTS, and pvtObjectNode::set().
Referenced by PVT::objRemove().
void pvtObjects::dump | ( | ) |
Dump data fields.
Definition at line 126 of file pvtobj.C.
References pvtObjectNode::dump(), firstEmpty, numObjs, numSpaces, objs, and size.
void pvtObjects::sanitize | ( | ) |
int pvtObjects::numObjs [private] |
Number of posers present in the list.
Definition at line 72 of file pvtobj.h.
Referenced by Delete(), dump(), getNumObjs(), Insert(), pvtObjects(), and sanitize().
int pvtObjects::numSpaces [private] |
number of consecutive spaces in list that are or have been occupied
Definition at line 74 of file pvtobj.h.
Referenced by callAtSync(), CheckpointCommit(), Commit(), dump(), getNumSpaces(), Insert(), pvtObjects(), sanitize(), SetIdle(), StratCalcs(), and Wake().
int pvtObjects::size [private] |
number of spaces allocated in objs
Definition at line 76 of file pvtobj.h.
Referenced by dump(), Insert(), pvtObjects(), and sanitize().
int pvtObjects::firstEmpty [private] |
lowest index of an empty slot in objs
Definition at line 78 of file pvtobj.h.
Referenced by Delete(), dump(), Insert(), pvtObjects(), and sanitize().
int pvtObjects::stratIterCount [private] |
counter for strat calculations
Definition at line 80 of file pvtobj.h.
Referenced by pvtObjects(), and StratCalcs().
the list of posers
Definition at line 83 of file pvtobj.h.
Referenced by callAtSync(), CheckpointCommit(), Commit(), Delete(), dump(), Insert(), PVT::objUpdateOVT(), pvtObjects(), sanitize(), SetIdle(), PVT::startPhase(), StratCalcs(), and Wake().