#include "Teuchos_ConfigDefs.hpp"
#include "Teuchos_PerformanceMonitorBase.hpp"
#include "Teuchos_Time.hpp"
Go to the source code of this file.
Namespaces | |
| namespace | Teuchos |
Classes | |
| class | Teuchos::TimeMonitor |
| A timer class that starts when constructed and stops when the destructor is called. More... | |
Defines | |
| #define | TEUCHOS_TIMER(funcName, strName) |
| Defines a static non-member function that returns a time monitor. | |
| #define | TEUCHOS_FUNC_TIME_MONITOR(FUNCNAME) |
| Defines a timer for a specific function. | |
Definition in file Teuchos_TimeMonitor.hpp.
|
|
Value: static Teuchos::Time& funcName() \ {static Teuchos::RefCountPtr<Time> rtn = \ Teuchos::TimeMonitor::getNewCounter(strName); return *rtn;}
Definition at line 45 of file Teuchos_TimeMonitor.hpp. |
|
|
Value: static Teuchos::RefCountPtr<Teuchos::Time> blabla_localTimer; \ if(!blabla_localTimer.get()) { \ std::ostringstream oss; \ oss << FUNCNAME; \ blabla_localTimer = Teuchos::TimeMonitor::getNewCounter(oss.str()); \ } \ Teuchos::TimeMonitor blabla_localTimeMonitor(*blabla_localTimer) Note that the name of the timer can be formated with stream inserts. For example, we can define a time monitor for a function as follows:
template<typename Scalar> void foo() { TEUCHOS_FUNC_TIME_MONITOR( "foo<"<<Teuchos::ScalarTraits<Scalar>::name()<<">()" ); ... } The timer can then be printed at the end of the program using
Teuchos::TimeMonitor::summarize(std::cout); Definition at line 77 of file Teuchos_TimeMonitor.hpp. |
1.3.9.1