PPL Logo

rep Class Reference

Base representation class. More...

#include <rep.h>

Inheritance diagram for rep:

Inheritance graph
[legend]
Collaboration diagram for rep:

Collaboration graph
[legend]

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 repoperator= (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

stratmyStrat
 Pointer to synchronization strategy.
simparent
 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.
TimePoollocalTimePool

Detailed Description

Base representation class.

Definition at line 15 of file rep.h.


Constructor & Destructor Documentation

rep::rep (  )  [inline]

Basic Constructor.

Definition at line 42 of file rep.h.

rep::rep ( POSE_TimeType  init_ovt  )  [inline]

Initializing Constructor.

Definition at line 51 of file rep.h.

virtual rep::~rep (  )  [inline, virtual]

Destructor.

Definition at line 56 of file rep.h.


Member Function Documentation

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().

Here is the caller graph for this function:

void rep::SetOVT ( POSE_TimeType  t  )  [inline]

Set the OVT to t.

Definition at line 63 of file rep.h.

void rep::useAntimethods (  )  [inline]

Make object use anti-methods rather than checkpointing.

Definition at line 65 of file rep.h.

void rep::turnOffAntimethods (  )  [inline]

Make object use checkpointing rather than anti-methods.

Definition at line 67 of file rep.h.

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().

Here is the caller graph for this function:

void rep::elapse ( POSE_TimeType  dt  )  [inline]

Elapse time by incrementing the OVT by dt.

Definition at line 71 of file rep.h.

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void rep::setSimulationStartGVT ( POSE_TimeType  startGVT  )  [inline]

Set simulationStartGVT.

Definition at line 83 of file rep.h.

Referenced by sim::setSimulationStartGVT().

Here is the caller graph for this function:

virtual rep& rep::operator= ( const rep obj  )  [inline, virtual]

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().

Here is the caller graph for this function:

virtual void rep::dump (  )  [inline, virtual]

Reimplemented in chpt< StateType >.

Definition at line 105 of file rep.h.

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().

Here is the caller graph for this function:

void rep::checkpoint ( rep  )  [inline]

Definition at line 113 of file rep.h.

void rep::restore ( rep  )  [inline]

Definition at line 114 of file rep.h.

void rep::POSE_srand ( unsigned int  pseed  )  [inline]

Definition at line 116 of file rep.h.

int rep::POSE_rand (  )  [inline]

Definition at line 117 of file rep.h.

unsigned int rep::POSE_urand (  )  [inline]

Definition at line 124 of file rep.h.

long int rep::POSE_Linear_rand (  )  [inline]

Definition at line 132 of file rep.h.

double rep::POSE_Uniform_rand (  )  [inline]

Definition at line 133 of file rep.h.

long int rep::POSE_Linear_rand (  )  [inline]

Definition at line 135 of file rep.h.

References CrnRand().

Here is the call graph for this function:

double rep::POSE_Uniform_rand (  )  [inline]

Definition at line 136 of file rep.h.

References CrnRand().

Here is the call graph for this function:


Field Documentation

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().


The documentation for this class was generated from the following files:

Generated on Mon Sep 21 08:29:36 2020 for Charm++ by  doxygen 1.5.5