Revolve Class Reference

This class manages to create Schedules for Online or Offline Checkpointing.class to create Checkpoint Schedules. More...

#include <revolve.h>

List of all members.

Public Member Functions

 Revolve (int st, int sn, ostream &_str)
 Constructor for Offline-Checkpointing.
 Revolve (int st, int sn, int sn_ram, ostream &_str)
 Constructor for Multi-Stage Offline-Checkpointing.
 Revolve (int sn, ostream &_str)
 Constructor for Online-Checkpointing.
ACTION::action revolve (int *check, int *capo, int *fine, int snaps, int *info, bool *where_to_put)
 The calling sequence is REVOLVE(CHECK,CAPO,FINE,SNAPS,INFO) with the return value being one of the actions to be taken.
ACTION::action revolve (int *check, int *capo, int *fine, int snaps, int *info)
ACTION::action revolve ()
int adjust (int steps, ostream &str)
 The function ADJUST(STEPS) is provided.
int maxrange (int ss, int tt, ostream &str)
 The auxiliary function MAXRANGE(SNAPS,REPS) returns the integer (SNAPS+REPS)!/(SNAPS!REPS!) provided SNAPS >=0, REPS >= 0.
double expense (int steps, int snaps, ostream &str)
 To choose an appropriated value of SNAPS the function EXPENSE(STEPS,SNAPS) estimates the run-time factor incurred by REVOLVE for a particular value of SNAPS.
int numforw (int steps, int snaps, ostream &str)
 The necessary number of forward steps without recording is calculated by the function NUMFORW(STEPS,SNAPS).
void turn (int fine)
 Turn starts the reversal of the schedule.
vector< int > get_write_and_read_counts ()
int get_number_of_writes_i (int l, int c, int i)
int get_number_of_reads_i (int l, int c, int i)
int getadvances ()
int getcheck ()
int getcheckram ()
int getcheckrom ()
int getcapo ()
int getfine ()
int getinfo ()
int getoldcapo ()
bool getwhere ()
void set_info (int inf)
void number_of_writes ()
void number_of_reads ()
int get_r (int steps, int snaps, ostream &str)
int get_r (ostream &str)
 ~Revolve ()


Detailed Description

This class manages to create Schedules for Online or Offline Checkpointing.class to create Checkpoint Schedules.

The user only needs to tell which Checkpointing Procedure he wants to use

Definition at line 406 of file revolve.h.


Constructor & Destructor Documentation

Revolve::Revolve ( int  st,
int  sn,
ostream &  _str 
)

Constructor for Offline-Checkpointing.

Revolve::Revolve ( int  st,
int  sn,
int  sn_ram,
ostream &  _str 
)

Constructor for Multi-Stage Offline-Checkpointing.

Revolve::Revolve ( int  sn,
ostream &  _str 
)

Constructor for Online-Checkpointing.

Revolve::~Revolve (  ) 

Definition at line 456 of file revolve.h.


Member Function Documentation

ACTION::action Revolve::revolve ( int *  check,
int *  capo,
int *  fine,
int  snaps,
int *  info,
bool *  where_to_put 
)

The calling sequence is REVOLVE(CHECK,CAPO,FINE,SNAPS,INFO) with the return value being one of the actions to be taken.

The calling parameters are all integers with the following meaning: CHECK - number of checkpoint being written or retrieved. CAPO - beginning of subrange currently being processed. FINE - end of subrange currently being processed.SNAPS - upper bound on number of checkpoints taken. INFO - determines how much information will be printed and contains information about an error occured

ACTION::action Revolve::revolve ( int *  check,
int *  capo,
int *  fine,
int  snaps,
int *  info 
)

ACTION::action Revolve::revolve (  ) 

int Revolve::adjust ( int  steps,
ostream &  str 
)

The function ADJUST(STEPS) is provided.

It can be used to determine a value of SNAPS so that the increase in spatial complexity equals approximately the increase in temporal complexity. For that ADJUST computes a return value satisfying SNAPS ~= log_4 (STEPS) because of the theory developed in the paper mentioned above.

int Revolve::maxrange ( int  ss,
int  tt,
ostream &  str 
)

The auxiliary function MAXRANGE(SNAPS,REPS) returns the integer (SNAPS+REPS)!/(SNAPS!REPS!) provided SNAPS >=0, REPS >= 0.

Otherwise there will be appropriate error messages and the value -1 will be returned. If the binomial expression is not representable as a signed 4 byte integer, greater than 2^31-1, this maximal value is returned and a warning message printed.

double Revolve::expense ( int  steps,
int  snaps,
ostream &  str 
)

To choose an appropriated value of SNAPS the function EXPENSE(STEPS,SNAPS) estimates the run-time factor incurred by REVOLVE for a particular value of SNAPS.

The ratio NUMFORW(STEPS,SNAPS)/STEPS is returned. This ratio corresponds to the run-time factor of the execution relative to the run-time of one forward time step.

int Revolve::numforw ( int  steps,
int  snaps,
ostream &  str 
)

The necessary number of forward steps without recording is calculated by the function NUMFORW(STEPS,SNAPS).

STEPS denotes the total number of time steps, i.e. FINE-CAPO during the first call of REVOLVE. When SNAPS is less than 1 an error message will be given and -1 is returned as value.

Definition at line 430 of file revolve.h.

References Schedule::numforw().

void Revolve::turn ( int  fine  ) 

Turn starts the reversal of the schedule.

This means that Online Checkpointing is finished.

vector<int> Revolve::get_write_and_read_counts (  ) 

int Revolve::get_number_of_writes_i ( int  l,
int  c,
int  i 
)

int Revolve::get_number_of_reads_i ( int  l,
int  c,
int  i 
)

int Revolve::getadvances (  ) 

Definition at line 440 of file revolve.h.

References Schedule::get_advances().

int Revolve::getcheck (  ) 

Definition at line 441 of file revolve.h.

int Revolve::getcheckram (  ) 

Definition at line 442 of file revolve.h.

int Revolve::getcheckrom (  ) 

Definition at line 443 of file revolve.h.

int Revolve::getcapo (  ) 

Definition at line 444 of file revolve.h.

int Revolve::getfine (  ) 

Definition at line 445 of file revolve.h.

int Revolve::getinfo (  ) 

Definition at line 446 of file revolve.h.

int Revolve::getoldcapo (  ) 

Definition at line 447 of file revolve.h.

bool Revolve::getwhere (  ) 

Definition at line 448 of file revolve.h.

void Revolve::set_info ( int  inf  ) 

Definition at line 449 of file revolve.h.

void Revolve::number_of_writes (  ) 

Definition at line 450 of file revolve.h.

References Checkpoint::number_of_writes.

void Revolve::number_of_reads (  ) 

Definition at line 451 of file revolve.h.

References Checkpoint::number_of_reads.

int Revolve::get_r ( int  steps,
int  snaps,
ostream &  str 
)

int Revolve::get_r ( ostream &  str  ) 


The documentation for this class was generated from the following file:
Generated on 5 Jan 2017 for IWAVECORE by  doxygen 1.4.7