21 #include <boost/date_time/posix_time/posix_time.hpp>
25 #ifndef __TPIE_EXECUTION_TIME_PREDICTOR_H__
26 #define __TPIE_EXECUTION_TIME_PREDICTOR_H__
35 typedef uint64_t time_type;
51 inline unique_id_type & operator << (
const std::type_info & type) {
52 ss << type.name() <<
";";
return *
this;
57 ss <<
typeid(T).name() <<
":" << x <<
";";
return *
this;
60 inline std::string operator()() {
return ss.str();}
76 void start_execution(stream_size_type n);
77 time_type end_execution();
78 std::string estimate_remaining_time(
double progress);
80 static void start_pause();
81 static void end_pause();
82 static void disable_time_storing();
89 boost::posix_time::ptime m_start_time;
96 time_type m_pause_time_at_start;
102 static time_type s_pause_time;
103 static boost::posix_time::ptime s_start_pause_time;
104 static bool s_store_times;
109 #endif //__TPIE_EXECUTION_TIME_PREDICTOR_H__
This file contains a few deprecated definitions for legacy code.
void init_execution_time_db()
Used by tpie_init to initialize the execution time database.
time_type estimate_execution_time(stream_size_type n, double &confidence)
Estimate execution time.
Miscellaneous utility functions.
Computations related to prime numbers.
void finish_execution_time_db()
Used by tpie_finish to deinitialize the execution time database.