LIBINT  2.1.0-stable
Public Types | Public Member Functions | Static Public Member Functions | List of all members
libint2::Timers< N > Class Template Reference

Timers aggregates N C++11 "timers"; used to high-resolution profile stages of integral computation. More...

#include <timer.h>

Public Types

typedef std::chrono::duration< double > dur_t
 
typedef std::chrono::high_resolution_clock clock_t
 
typedef std::chrono::time_point< clock_t > time_point_t
 

Public Member Functions

void set_now_overhead (size_t ns)
 use this to report the overhead of now() call; if set, the reported timings will be adjusted for this overhead More...
 
void start (size_t t)
 starts timer t
 
dur_t stop (size_t t)
 stops timer t More...
 
double read (size_t t) const
 reads value (in seconds) of timer t , converted to double
 
void clear ()
 resets timers to zero
 

Static Public Member Functions

static time_point_t now ()
 returns the current time point
 

Detailed Description

template<size_t N>
class libint2::Timers< N >

Timers aggregates N C++11 "timers"; used to high-resolution profile stages of integral computation.

Template Parameters
Nthe number of timers
Note
member functions are not reentrant, use one Timers object per thread

Member Function Documentation

template<size_t N>
void libint2::Timers< N >::set_now_overhead ( size_t  ns)
inline

use this to report the overhead of now() call; if set, the reported timings will be adjusted for this overhead

Note
this is clearly compiler and system dependent, please measure carefully (turn off turboboost, etc.) using src/bin/profile/chrono.cc

Referenced by libint2::TwoBodyEngine< Kernel >::precision().

template<size_t N>
dur_t libint2::Timers< N >::stop ( size_t  t)
inline

stops timer t

Returns
the duration, corrected for overhead, elapsed since the last call to start(t)

Referenced by libint2::TwoBodyEngine< Kernel >::compute().


The documentation for this class was generated from the following file: