25 #ifndef __TPIE_FRACTIONAL_PROGRESS__
26 #define __TPIE_FRACTIONAL_PROGRESS__
37 #define TPIE_FSI __FILE__,__FUNCTION__
51 class fractional_progress;
63 const char *
function,
66 description_importance importance=IMPORTANCE_MAJOR,
69 void setup(
const char *
id,
71 const char *
function,
74 description_importance importance=IMPORTANCE_MAJOR,
82 virtual void init(stream_size_type range);
94 stream_size_type m_estimate;
120 void init(stream_size_type range=0);
127 void push_breadcrumb(
const char * crumb, description_importance importance) {
128 if (m_pi) m_pi->push_breadcrumb(crumb, importance);
131 void pop_breadcrumb() {
132 if (m_pi) m_pi->pop_breadcrumb();
149 stream_size_type m_time_sum;
151 void stat(std::string, time_type, stream_size_type);
152 std::vector< std::pair<std::string, std::pair<time_type, stream_size_type> > > m_stat;
154 std::string sub_indicators_ss();
159 void update_fractions(
const char * name,
float frac, stream_size_type n);
160 void load_fractions(
const std::string & path);
161 void save_fractions(
const std::string & path,
bool force =
false);
164 #endif //__TPIE_FRACTIONAL_PROGRESS__
The base class for indicating the progress of some task.
unique_id_type & id()
Return this progress indicator's unique id.
Central file abstraction.
Fractional progress reporter.
This file contains a few deprecated definitions for legacy code.
void init_fraction_db(bool capture_progress=false)
Used by tpie_init to initialize the fraction database.
void finish_fraction_db()
Used by tpie_finish to deinitialize the fraction database.
void done()
Advance the indicator to the end.
void init(stream_size_type range=0)
Initialize progress indicator.
virtual void init(stream_size_type range)
Initialize progress indicator.
Miscellaneous utility functions.
virtual void done()
Advance the indicator to the end.
Indicate progress of a part of a computation.
Subindicator for fractional progress reporting.