Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Tsqr_TimeStats.hpp
00001 #ifndef __TSQR_TimeStats_hpp
00002 #define __TSQR_TimeStats_hpp
00003 
00004 #include <Teuchos_RCP.hpp>
00005 #include <ostream>
00006 #include <stdexcept>
00007 
00010 
00011 namespace TSQR {
00012 
00018   class TimeStats {
00019   public:
00020     TimeStats();
00021     ~TimeStats() {}
00022 
00025     void init ();
00026 
00029     void update (const double curTime);
00030 
00043     void
00044     print (std::ostream& out, 
00045      const bool humanReadable,
00046      const std::string& label,
00047      const std::string& labelLabel,
00048      const bool printHeaders) const;
00049 
00052     double min() const { return min_; }
00053 
00056     double max() const { return max_; }
00057 
00060     double mean() const { return mean_; }
00061 
00064     double total() const { return total_; }
00065 
00068     int count() const { return count_; }
00069 
00077     TimeStats (const int newCount, 
00078          const double newMin,
00079          const double newMax,
00080          const double newMean,
00081          const double newTotal) :
00082       min_ (newMin), 
00083       max_ (newMax), 
00084       mean_ (newMean),
00085       total_ (newTotal),
00086       count_ (newCount)
00087     {}
00088 
00089   private:
00090     double min_, max_, mean_, total_;
00091     int count_;
00092   };
00093 
00094   
00095 
00096 } // namespace TSQR
00097 
00098 #endif // __TSQR_TimeStats_hpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends