TBCI Numerical high perf. C++ Library  2.8.0
Classes | Macros
stopwatch.h File Reference
#include "tbci/config_manual.h"
#include <time.h>
#include <sys/times.h>
#include <sys/time.h>
Include dependency graph for stopwatch.h:

Go to the source code of this file.

Classes

class  stopw_base
 base class for all the stop watches to minimize code duplication More...
 
class  stopwatch
 
class  stopwatch_u
 Stopwatch class using times() to measure userspace CPU time of ourselves and our children. More...
 
class  stopwatch_us
 Stopwatch class using times() to measure userspace and system CPU time of ourselves and our children. More...
 
class  stopwatch_e
 Stopwatch class using gettimeofday() / _ftime() / time() to measure elapsed (= wall clock) time. More...
 

Macros

#define CLK_TCK   ((clock_t) sysconf (_SC_CLK_TCK))
 This whole CLOCKS_PER_SEC and CLK_TCK business is terribly FUCKED UP ! We need CLK_TCK, as it gives the REAL resolution, but somebody (POSIX?) decided it should not be there. More...
 
#define LONG_MIN   (-2147483647L - 1L)
 
#define CPS   CLOCKS_PER_SEC
 

Detailed Description

Implementation of timing functions with stopwatch like semantics.

originally from Template Numerical Toolkit (TNT) for Linear Algebra

R. Pozo Applied and Computational Mathematics Division National Institute of Standards and Technology

Author
R. Pozo
K. Garloff
Date
98/08/19
Version
Id:
stopwatch.h,v 1.14.2.21 2019/05/28 11:13:02 garloff Exp

Definition in file stopwatch.h.

Macro Definition Documentation

#define CLK_TCK   ((clock_t) sysconf (_SC_CLK_TCK))

This whole CLOCKS_PER_SEC and CLK_TCK business is terribly FUCKED UP ! We need CLK_TCK, as it gives the REAL resolution, but somebody (POSIX?) decided it should not be there.

Therefore this crazy hack.

Todo:
REAL solution for CLK_TCK related stuff!

Definition at line 58 of file stopwatch.h.

#define CPS   CLOCKS_PER_SEC

Definition at line 78 of file stopwatch.h.

#define LONG_MIN   (-2147483647L - 1L)

Definition at line 68 of file stopwatch.h.