PPL Logo

chpt< StateType > Class Template Reference

Templated checkpointing class derived from rep. More...

#include <chpt.h>

Inheritance diagram for chpt< StateType >:

Inheritance graph
[legend]
Collaboration diagram for chpt< StateType >:

Collaboration graph
[legend]

Public Member Functions

 chpt ()
 Basic Constructor.
virtual ~chpt ()
 Destructor.
void registerTimestamp (int idx, eventMsg *m, POSE_TimeType offset)
 Timestamps event message, sets priority, and records in spawned list.
void checkpoint (StateType *data)
 Checkpoint the state.
void restore (StateType *data)
 Restore the state from a checkpoint.
virtual void pup (PUP::er &p)
 Pack/unpack/sizing operator.
virtual void dump ()
 Dump all data fields.

Data Fields

int sinceLast

Detailed Description

template<class StateType>
class chpt< StateType >

Templated checkpointing class derived from rep.

This class makes it possible for optimistic synchronization strategies to automatically checkpoint objects of classes derived from this type.

Definition at line 9 of file chpt.h.


Constructor & Destructor Documentation

template<class StateType>
chpt< StateType >::chpt (  )  [inline]

Basic Constructor.

Definition at line 13 of file chpt.h.

template<class StateType>
virtual chpt< StateType >::~chpt (  )  [inline, virtual]

Destructor.

Definition at line 15 of file chpt.h.


Member Function Documentation

template<class StateType>
void chpt< StateType >::registerTimestamp ( int  idx,
eventMsg m,
POSE_TimeType  offset 
) [inline, virtual]

Timestamps event message, sets priority, and records in spawned list.

Reimplemented from rep.

Definition at line 33 of file chpt.h.

References eventMsg::evID, rep::myStrat, rep::ovt, rep::parent, POSE_TimeMax, sim::registerSent(), eventMsg::setPriority(), eventMsg::timestamp, and eventMsg::Timestamp().

Here is the call graph for this function:

template<class StateType>
void chpt< StateType >::checkpoint ( StateType *  data  )  [inline]

template<class StateType>
void chpt< StateType >::restore ( StateType *  data  )  [inline]

Restore the state from a checkpoint.

Used during a rollback by the Undo method: if the event being undone is not the final destination, we simply remove the checkpointed data; if the event is the final target for the rollback, then we restore the data, and remove the checkpointed data for it (it will be regenerated when the target event gets re-executed).

Definition at line 95 of file chpt.h.

References CmiAbort(), Event::cpData, strat::currentEvent, rep::localTimePool, rep::myStrat, Event::serialCPdata, Event::serialCPdataSz, PUP::mem::size(), strat::targetEvent, Event::timestamp, TimePool::tmp_free(), and rep::usesAntimethods().

Here is the call graph for this function:

template<class StateType>
virtual void chpt< StateType >::pup ( PUP::er p  )  [inline, virtual]

Pack/unpack/sizing operator.

Derived classes must provide pup

Reimplemented from rep.

Definition at line 26 of file chpt.h.

References rep::pup().

Here is the call graph for this function:

template<class StateType>
virtual void chpt< StateType >::dump (  )  [inline, virtual]

Dump all data fields.

Reimplemented from rep.

Definition at line 27 of file chpt.h.

References rep::dump().

Here is the call graph for this function:


Field Documentation

template<class StateType>
int chpt< StateType >::sinceLast

Definition at line 11 of file chpt.h.

Referenced by chpt< StateType >::checkpoint().


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

Generated on Mon Sep 21 08:18:40 2020 for Charm++ by  doxygen 1.5.5