PPL Logo

strat Class Reference

Base synchronization strategy class. More...

#include <strat.h>

Inheritance diagram for strat:

Inheritance graph
[legend]
Collaboration diagram for strat:

Collaboration graph
[legend]

Public Member Functions

 strat ()
 Basic Constructor.
virtual ~strat ()
 Destructor.
void init (eventQueue *q, rep *obj, sim *p, int pIdx)
 Initializer.
virtual void initSync ()
 Initialize synchronization strategy type (optimistic or conservative).
virtual void Step ()
 Strategy-specific forward execution step.
virtual void Rollback ()
 Strategy-specific rollback.
virtual void CancelEvents ()
 Strategy-specific event cancellation.
virtual POSE_TimeType SafeTime ()
 Calculate safe time (earliest time at which object can generate events).

Data Fields

int STRAT_T
 Type of strategy; see defines above.
EventtargetEvent
 Target event pointer.
EventcurrentEvent
 Current event being executed.

Protected Attributes

localStatlocalStats
PVTlocalPVT
 Local PVT branch.
eventQueueeq
 Pointer to the eventQueue in the poser wrapper.
repuserObj
 Pointer to the representation object in the poser wrapper.
simparent
 Pointer to the poser wrapper.

Detailed Description

Base synchronization strategy class.

Definition at line 21 of file strat.h.


Constructor & Destructor Documentation

strat::strat (  ) 

Basic Constructor.

Simulation synchronization strategy base class.

Basic Constructor

Definition at line 5 of file strat.C.

References CkLocalBranch(), currentEvent, eq, localPVT, localStats, parent, pose_config, POSE_Config::stats, STRAT_T, targetEvent, theLocalStats, ThePVT, and userObj.

Here is the call graph for this function:

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

Destructor.

Definition at line 51 of file strat.h.


Member Function Documentation

void strat::init ( eventQueue q,
rep obj,
sim p,
int  pIdx 
)

Initializer.

Definition at line 22 of file strat.C.

References eq, initSync(), parent, and userObj.

Here is the call graph for this function:

virtual void strat::initSync (  )  [inline, virtual]

Initialize synchronization strategy type (optimistic or conservative).

Reimplemented in con, opt, and seq.

Definition at line 55 of file strat.h.

Referenced by init().

Here is the caller graph for this function:

void strat::Step (  )  [virtual]

Strategy-specific forward execution step.

Code here MUST be overridden, but this gives a basic idea of how a forward execution step should go. Strategies must determine if it is safe to execute an event.

Reimplemented in adapt, adapt2, adapt3, adapt4, adapt5, con, opt, opt2, opt3, seq, and spec.

Definition at line 28 of file strat.C.

References sim::Activate(), currentEvent, eventQueue::currentPtr, sim::Deactivate(), Event::done, eq, Event::fnIdx, Event::msg, parent, POSE_Objects, sim::ResolveFn(), eventQueue::ShiftEvent(), and Event::timestamp.

Referenced by sim::Cancel(), sim::CheckpointStep(), and sim::Step().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void strat::Rollback (  )  [inline, virtual]

Strategy-specific rollback.

Reimplemented in opt.

Definition at line 62 of file strat.h.

virtual void strat::CancelEvents (  )  [inline, virtual]

Strategy-specific event cancellation.

Reimplemented in con, and opt.

Definition at line 64 of file strat.h.

virtual POSE_TimeType strat::SafeTime (  )  [inline, virtual]

Calculate safe time (earliest time at which object can generate events).

Reimplemented in con, and opt.

Definition at line 66 of file strat.h.

References rep::OVT(), and userObj.

Referenced by sim::Status().

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

PVT* strat::localPVT [protected]

eventQueue* strat::eq [protected]

rep* strat::userObj [protected]

Pointer to the representation object in the poser wrapper.

Definition at line 32 of file strat.h.

Referenced by init(), opt::Rollback(), SafeTime(), opt::SafeTime(), con::SafeTime(), seq::Step(), adapt5::Step(), adapt4::Step(), and strat().

sim* strat::parent [protected]

Target event pointer.

Used by strategy to denote point in event queue to 1) rollback to 2) checkpoint up to etc.

Definition at line 45 of file strat.h.

Referenced by chpt< StateType >::restore(), opt::Rollback(), and strat().


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

Generated on Mon Sep 21 08:30:15 2020 for Charm++ by  doxygen 1.5.5