33 #ifndef PARALLEL_PROGRESS_H_
34 #define PARALLEL_PROGRESS_H_
72 void start(
double total, std::string msg,
size_t numProc);
74 inline void set(
size_t now)
79 inline void set(
int now)
85 inline void set(
double now)
90 void setD(
double now);
105 #define PARALLEL_PROGRESS_START(progVarName, dSize, msg, numProcs) \
106 ug::ParallelProgress progVarName; { std::stringstream ss; ss << msg; progVarName.start(dSize, ss.str(), numProcs); }
108 #define PARALLEL_PROGRESS_UPDATE(progVarName, d) progVarName.set(d);
109 #define PARALLEL_PROGRESS_FINISH(progVarName) progVarName.stop();
Definition: parallel_progress.h:52
void stop()
Definition: parallel_progress.cpp:70
int m_length
Definition: parallel_progress.h:99
void set(size_t now)
Definition: parallel_progress.h:74
void start(double total, std::string msg, size_t numProc)
Definition: parallel_progress.cpp:75
double m_now
Definition: parallel_progress.h:98
ParallelProgress()
Definition: parallel_progress.cpp:40
double startS
Definition: parallel_progress.h:54
void set(int now)
Definition: parallel_progress.h:79
size_t iNextValueToUpdate
Definition: parallel_progress.h:95
double dNextValueToUpdate
Definition: parallel_progress.h:94
void setD(double now)
Definition: parallel_progress.cpp:55
std::string m_msg
Definition: parallel_progress.h:100
void set_length(int l)
Definition: parallel_progress.h:62
void calc_next_value()
Definition: parallel_progress.h:67
double m_total
Definition: parallel_progress.h:97
~ParallelProgress()
Definition: parallel_progress.h:58
void set(double now)
Definition: parallel_progress.h:85
int posNow
Definition: parallel_progress.h:96
stopwatch class for quickly taking times