#include <rep.h>
Public Member Functions | |
rep () | |
Basic Constructor. | |
rep (POSE_TimeType init_ovt) | |
Initializing Constructor. | |
virtual | ~rep () |
Destructor. | |
void | init (eventMsg *m) |
Initializer called from poser wrapper constructor. | |
POSE_TimeType | OVT () |
Return the OVT. | |
void | SetOVT (POSE_TimeType t) |
Set the OVT to t. | |
void | useAntimethods () |
Make object use anti-methods rather than checkpointing. | |
void | turnOffAntimethods () |
Make object use checkpointing rather than anti-methods. | |
int | usesAntimethods () |
Check if this object uses anti-methods rather than checkpointing. | |
void | elapse (POSE_TimeType dt) |
Elapse time by incrementing the OVT by dt. | |
void | update (POSE_TimeType t, double rt) |
Update the OVT and ORT at event start to auto-elapse to event timestamp. | |
virtual void | terminus () |
Called on every object at end of simulation. | |
virtual void | registerTimestamp (int idx, eventMsg *m, POSE_TimeType offset) |
Timestamps event message, sets priority, and records in spawned list. | |
void | setSimulationStartGVT (POSE_TimeType startGVT) |
Set simulationStartGVT. | |
virtual rep & | operator= (const rep &obj) |
Assignment operator. | |
virtual void | dump () |
Dump all data fields. | |
virtual void | dump () |
virtual void | pup (PUP::er &p) |
Pack/unpack/sizing operator. | |
void | checkpoint (rep *) |
void | restore (rep *) |
void | POSE_srand (unsigned int pseed) |
int | POSE_rand () |
unsigned int | POSE_urand () |
long int | POSE_Linear_rand () |
double | POSE_Uniform_rand () |
long int | POSE_Linear_rand () |
double | POSE_Uniform_rand () |
Data Fields | |
strat * | myStrat |
Pointer to synchronization strategy. | |
sim * | parent |
Pointer to poser wrapper. | |
int | myHandle |
the object's unique handle | |
POSE_TimeType | ovt |
The object's virtual time (OVT). | |
double | ort |
The object's real time (ORT). | |
unsigned int | prand_seed |
Checkpointed seed for POSE_rand. | |
unsigned short int | prand48_seed [3] |
Checkpointed 48-bit seed to support uniform and linear rand. | |
int | anti_methods |
Flag indicating this object uses anti-methods rather than checkpoints. | |
POSE_TimeType | simulationStartGVT |
Starting GVT of the simulation. | |
TimePool * | localTimePool |
Definition at line 15 of file rep.h.
rep::rep | ( | POSE_TimeType | init_ovt | ) | [inline] |
void rep::init | ( | eventMsg * | m | ) |
Initializer called from poser wrapper constructor.
Definition at line 17 of file rep.C.
References anti_methods, int, myHandle, myStrat, ort, ovt, eventMsg::parent, parent, prand48_seed, prand_seed, eventMsg::str, and eventMsg::timestamp.
POSE_TimeType rep::OVT | ( | ) | [inline] |
Return the OVT.
Definition at line 61 of file rep.h.
Referenced by strat::SafeTime(), opt::SafeTime(), con::SafeTime(), sim::Status(), seq::Step(), adapt5::Step(), and adapt4::Step().
void rep::SetOVT | ( | POSE_TimeType | t | ) | [inline] |
void rep::useAntimethods | ( | ) | [inline] |
void rep::turnOffAntimethods | ( | ) | [inline] |
int rep::usesAntimethods | ( | ) | [inline] |
Check if this object uses anti-methods rather than checkpointing.
Definition at line 69 of file rep.h.
Referenced by chpt< StateType >::checkpoint(), eventQueue::CommitEvents(), chpt< StateType >::restore(), and opt::Rollback().
void rep::elapse | ( | POSE_TimeType | dt | ) | [inline] |
void rep::update | ( | POSE_TimeType | t, | |
double | rt | |||
) |
Update the OVT and ORT at event start to auto-elapse to event timestamp.
Base class to represent user object.
If event has timestamp > OVT, OVT elapses to timestamp, otherwise there is no change to OVT. ORT updates similarly.
Update the OVT and ORT at event start to auto-elapse to event timestamp
Definition at line 5 of file rep.C.
References eventQueue::currentPtr, POSE_Config::dop, sim::eq, ort, ovt, parent, pose_config, Event::srt, and Event::svt.
virtual void rep::terminus | ( | ) | [inline, virtual] |
Called on every object at end of simulation.
Definition at line 77 of file rep.h.
Referenced by sim::Terminate().
void rep::registerTimestamp | ( | int | idx, | |
eventMsg * | m, | |||
POSE_TimeType | offset | |||
) | [virtual] |
Timestamps event message, sets priority, and records in spawned list.
Reimplemented in chpt< StateType >.
Definition at line 31 of file rep.C.
References CkLocalBranch(), PVT::getGVT(), ovt, parent, POSE_TimeMax, sim::registerSent(), eventMsg::setPriority(), ThePVT, and eventMsg::Timestamp().
Referenced by sim::SeqResumeAfterCheckpoint().
void rep::setSimulationStartGVT | ( | POSE_TimeType | startGVT | ) | [inline] |
Set simulationStartGVT.
Definition at line 83 of file rep.h.
Referenced by sim::setSimulationStartGVT().
Assignment operator.
Derived classes must provide assignment
Definition at line 89 of file rep.h.
References anti_methods, myHandle, ort, ovt, prand48_seed, prand_seed, and simulationStartGVT.
virtual void rep::dump | ( | ) | [inline, virtual] |
Dump all data fields.
Reimplemented in chpt< StateType >.
Definition at line 103 of file rep.h.
Referenced by sim::dump(), and chpt< StateType >::dump().
virtual void rep::dump | ( | ) | [inline, virtual] |
virtual void rep::pup | ( | PUP::er & | p | ) | [inline, virtual] |
Pack/unpack/sizing operator.
Derived classes must provide pup
Reimplemented in chpt< StateType >.
Definition at line 109 of file rep.h.
Referenced by chpt< StateType >::pup().
long int rep::POSE_Linear_rand | ( | ) | [inline] |
double rep::POSE_Uniform_rand | ( | ) | [inline] |
Pointer to synchronization strategy.
Definition at line 19 of file rep.h.
Referenced by chpt< StateType >::checkpoint(), init(), chpt< StateType >::registerTimestamp(), and chpt< StateType >::restore().
Pointer to poser wrapper.
Definition at line 21 of file rep.h.
Referenced by chpt< StateType >::checkpoint(), init(), registerTimestamp(), chpt< StateType >::registerTimestamp(), and update().
the object's unique handle
Initialized to index of poser wrapper in POSE_objects array
Definition at line 24 of file rep.h.
Referenced by init(), operator=(), and seq::Step().
The object's virtual time (OVT).
Definition at line 26 of file rep.h.
Referenced by init(), operator=(), registerTimestamp(), chpt< StateType >::registerTimestamp(), sim::ReportLBdata(), sim::SeqResumeAfterCheckpoint(), and update().
double rep::ort |
The object's real time (ORT).
Definition at line 28 of file rep.h.
Referenced by init(), operator=(), and update().
unsigned int rep::prand_seed |
Checkpointed seed for POSE_rand.
Definition at line 30 of file rep.h.
Referenced by init(), and operator=().
unsigned short int rep::prand48_seed[3] |
Checkpointed 48-bit seed to support uniform and linear rand.
Definition at line 32 of file rep.h.
Referenced by init(), and operator=().
Flag indicating this object uses anti-methods rather than checkpoints.
Definition at line 34 of file rep.h.
Referenced by init(), and operator=().
Starting GVT of the simulation.
Initialize to -1, which is the "unset" value
Definition at line 37 of file rep.h.
Referenced by operator=().
Definition at line 39 of file rep.h.
Referenced by chpt< StateType >::checkpoint(), chpt< StateType >::restore(), and opt::Rollback().