#include <revolve.h>
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 () |
The user only needs to tell which Checkpointing Procedure he wants to use
Definition at line 406 of file revolve.h.
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.
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 | ( | ) |
void Revolve::number_of_writes | ( | ) |
void Revolve::number_of_reads | ( | ) |
int Revolve::get_r | ( | int | steps, | |
int | snaps, | |||
ostream & | str | |||
) |
int Revolve::get_r | ( | ostream & | str | ) |