dune-fem  2.4.1-rc
Classes | Public Types | Static Public Member Functions | List of all members
Dune::Fem::Timer< true > Struct Template Reference

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/misc/femtimer.hh>

Public Types

enum  operation { max, sum }
 

Static Public Member Functions

static void start ()
 push a new timer to the stack More...
 
static double stop ()
 retrieve a timer from the stack More...
 
static unsigned int addTo (const std::string &name, int nr=0)
 
static void removeFrom (unsigned int id)
 remove a timer with given id More...
 
static void removeAll ()
 remove all timers More...
 
static void start (int id, int nr=0)
 
static double stop (int id, int nr=0, operation op=sum)
 
static double stop (int id, operation op)
 
static void reset ()
 reset all timers to zero More...
 
static void reset (int id)
 reset a given timer with all its subtimers More...
 
static void reset (int id, int nr)
 rest a given subtimer More...
 
static void print (std::ostream &out, int id)
 print the values of a given timer (plus subtimers) to a stream More...
 
static void print (std::ostream &out, const std::string &msg="")
 print the values of all timers to a stream More...
 
static void printFile (const std::string &fileName, int step=1)
 
static void printFile (const TimeProviderBase &tp, const std::string &fileName, int step=1)
 

Member Enumeration Documentation

enum Dune::Fem::Timer< true >::operation
Enumerator
max 
sum 

Member Function Documentation

static unsigned int Dune::Fem::Timer< true >::addTo ( const std::string &  name,
int  nr = 0 
)
inlinestatic

add a new timer with description

Parameters
namedescription for output
nrnumber of subtimers to store
Returns
id used to identify this timer in all following calls
static void Dune::Fem::Timer< true >::print ( std::ostream &  out,
int  id 
)
inlinestatic

print the values of a given timer (plus subtimers) to a stream

static void Dune::Fem::Timer< true >::print ( std::ostream &  out,
const std::string &  msg = "" 
)
inlinestatic

print the values of all timers to a stream

static void Dune::Fem::Timer< true >::printFile ( const std::string &  fileName,
int  step = 1 
)
inlinestatic

print the values of all timers to a file if the file is open a new line is appended

Parameters
fileNamename of the file
steponly add a line to the file each step calls of this method

References Dune::Fem::MPIManager::rank().

static void Dune::Fem::Timer< true >::printFile ( const TimeProviderBase tp,
const std::string &  fileName,
int  step = 1 
)
inlinestatic

print the values of all timers to a file if the file is open a new line is appended information taken from a time provider is also added to the file

Parameters
tpthe time provider
fileNamename of the file
steponly add a line to the file each step calls of this method

References Dune::Fem::MPIManager::comm(), Dune::Std::max(), Dune::Std::min(), and Dune::Fem::MPIManager::rank().

static void Dune::Fem::Timer< true >::removeAll ( )
inlinestatic

remove all timers

static void Dune::Fem::Timer< true >::removeFrom ( unsigned int  id)
inlinestatic

remove a timer with given id

static void Dune::Fem::Timer< true >::reset ( )
inlinestatic

reset all timers to zero

static void Dune::Fem::Timer< true >::reset ( int  id)
inlinestatic

reset a given timer with all its subtimers

static void Dune::Fem::Timer< true >::reset ( int  id,
int  nr 
)
inlinestatic

rest a given subtimer

static void Dune::Fem::Timer< true >::start ( )
inlinestatic

push a new timer to the stack

static void Dune::Fem::Timer< true >::start ( int  id,
int  nr = 0 
)
inlinestatic

start a given timer (or subtimer)

Parameters
idthe id returned by the method addTo
nrthe number of the subtimer
static double Dune::Fem::Timer< true >::stop ( )
inlinestatic

retrieve a timer from the stack

static double Dune::Fem::Timer< true >::stop ( int  id,
int  nr = 0,
operation  op = sum 
)
inlinestatic

stop a given timer (or subtimer)

Parameters
idthe id of the timer as returned by the method addTo
nrthe number of the subtimer
opthe operation to perform (sum or max)
Returns
the total (or max) time used by this timer since the last reset
static double Dune::Fem::Timer< true >::stop ( int  id,
operation  op 
)
inlinestatic

stop a given timer (with subtimer 0)

Parameters
idthe id of the timer as returned by the method addTo
opthe operation to perform (sum or max)
Returns
the total (or max) time used by this timer since the last reset

The documentation for this struct was generated from the following files: