QUDA  0.9.0
Public Member Functions | Public Attributes | List of all members
quda::Timer Struct Reference

#include <quda_internal.h>

Collaboration diagram for quda::Timer:
Collaboration graph
[legend]

Public Member Functions

 Timer ()
 
void Start (const char *func, const char *file, int line)
 
void Stop (const char *func, const char *file, int line)
 
double Last ()
 
void Reset (const char *func, const char *file, int line)
 

Public Attributes

double time
 
double last
 
timeval start
 
timeval stop
 
bool running
 
int count
 

Detailed Description

Use this for recording a fine-grained profile of a QUDA algorithm. This uses host-side measurement, so should be used for timing fully host-device synchronous algorithms.Enumeration type used for writing a simple but extensible profiling framework.

Definition at line 106 of file quda_internal.h.

Constructor & Destructor Documentation

◆ Timer()

quda::Timer::Timer ( )
inline

Definition at line 125 of file quda_internal.h.

Member Function Documentation

◆ Last()

double quda::Timer::Last ( )
inline

Definition at line 152 of file quda_internal.h.

References last.

◆ Reset()

void quda::Timer::Reset ( const char *  func,
const char *  file,
int  line 
)
inline

Definition at line 154 of file quda_internal.h.

References count, errorQuda, func, last, printfQuda, running, and time.

◆ Start()

void quda::Timer::Start ( const char *  func,
const char *  file,
int  line 
)
inline

Definition at line 127 of file quda_internal.h.

References errorQuda, func, printfQuda, running, and start.

Referenced by quda::TimeProfile::Start_(), and quda::TimeProfile::StartGlobal().

Here is the caller graph for this function:

◆ Stop()

void quda::Timer::Stop ( const char *  func,
const char *  file,
int  line 
)
inline

Definition at line 136 of file quda_internal.h.

References count, errorQuda, func, last, printfQuda, running, start, stop, time, timeval::tv_sec, and timeval::tv_usec.

Referenced by quda::TimeProfile::Stop_(), and quda::TimeProfile::StopGlobal().

Here is the caller graph for this function:

Member Data Documentation

◆ count

int quda::Timer::count

Definition at line 123 of file quda_internal.h.

Referenced by Reset(), and Stop().

◆ last

double quda::Timer::last

Used to store when the timer was last started

Definition at line 111 of file quda_internal.h.

Referenced by Last(), quda::TimeProfile::Last(), Reset(), and Stop().

◆ running

bool quda::Timer::running

Keep track of number of calls

Definition at line 120 of file quda_internal.h.

Referenced by Reset(), Start(), and Stop().

◆ start

timeval quda::Timer::start

Used to store when the timer was last stopped

Definition at line 114 of file quda_internal.h.

Referenced by Start(), and Stop().

◆ stop

timeval quda::Timer::stop

Are we currently timing?

Definition at line 117 of file quda_internal.h.

Referenced by Stop().

◆ time

double quda::Timer::time

< The cumulative sum of time The last recorded time interval

Definition at line 108 of file quda_internal.h.

Referenced by quda::TimeProfile::Print(), quda::TimeProfile::PrintGlobal(), Reset(), and Stop().


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