Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Tsqr_TrivialTimer.hpp
00001 #ifndef __TSQR_TrivialTimer_hpp
00002 #define __TSQR_TrivialTimer_hpp
00003 
00004 #include <string>
00005 
00008 
00009 namespace TSQR {
00010 
00016   class TrivialTimer {
00017   public:
00022     TrivialTimer (const std::string& theName, bool doStart = false);
00023 
00029     void start (bool reset = false);
00030     
00032     double stop ();
00033 
00035     bool isRunning () const { return isRunning_; }
00036 
00038     const std::string& name() const { return name_; }
00039 
00040   private:
00042     std::string name_;
00043 
00050     size_t counter_;
00051     
00053     bool isRunning_;
00054 
00056     static void verifyConcept();
00057   };
00058 
00059 } // namespace TSQR
00060 
00061 #endif // __TSQR_TrivialTimer_hpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends