QUDA  0.9.0
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
quda::TimeProfile Class Reference

#include <quda_internal.h>

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

Public Member Functions

 TimeProfile (std::string fname)
 
 TimeProfile (std::string fname, bool use_global)
 
void Print ()
 
void Start_ (const char *func, const char *file, int line, QudaProfileType idx)
 
void Stop_ (const char *func, const char *file, int line, QudaProfileType idx)
 
void Reset_ (const char *func, const char *file, int line)
 
double Last (QudaProfileType idx)
 

Static Public Member Functions

static void PrintGlobal ()
 

Static Private Member Functions

static void StopGlobal (const char *func, const char *file, int line, QudaProfileType idx)
 
static void StartGlobal (const char *func, const char *file, int line, QudaProfileType idx)
 

Private Attributes

std::string fname
 
Timer profile [QUDA_PROFILE_COUNT]
 
bool switchOff
 
bool use_global
 

Static Private Attributes

static std::string pname []
 
static Timer global_profile [QUDA_PROFILE_COUNT]
 
static bool global_switchOff [QUDA_PROFILE_COUNT] = {}
 
static int global_total_level [QUDA_PROFILE_COUNT] = {}
 

Detailed Description

Definition at line 232 of file quda_internal.h.

Constructor & Destructor Documentation

◆ TimeProfile() [1/2]

quda::TimeProfile::TimeProfile ( std::string  fname)
inline

Definition at line 275 of file quda_internal.h.

◆ TimeProfile() [2/2]

quda::TimeProfile::TimeProfile ( std::string  fname,
bool  use_global 
)
inline

Print out the profile information

Definition at line 277 of file quda_internal.h.

Member Function Documentation

◆ Last()

double quda::TimeProfile::Last ( QudaProfileType  idx)
inline

◆ Print()

void quda::TimeProfile::Print ( )

< Print out the profile information

Definition at line 6 of file timer.cpp.

References quda::count, fname, fused_exterior_ndeg_tm_dslash_cuda_gen::i, pname, printfQuda, profile, quda::QUDA_PROFILE_COUNT, quda::QUDA_PROFILE_TOTAL, quda::Timer::time, time(), and warningQuda.

Referenced by quda::Deflation::Deflation(), endQuda(), quda::MG::MG(), quda::printAPIProfile(), quda::printLaunchTimer(), quda::Deflation::~Deflation(), quda::Dirac::~Dirac(), and quda::MG::~MG().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintGlobal()

void quda::TimeProfile::PrintGlobal ( )
static

Definition at line 55 of file timer.cpp.

References quda::count, global_profile, fused_exterior_ndeg_tm_dslash_cuda_gen::i, pname, printfQuda, quda::QUDA_PROFILE_LOWER_LEVEL, quda::QUDA_PROFILE_TOTAL, quda::Timer::time, time(), and warningQuda.

Referenced by endQuda().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Reset_()

void quda::TimeProfile::Reset_ ( const char *  func,
const char *  file,
int  line 
)
inline

Definition at line 307 of file quda_internal.h.

References func, idx, profile, and quda::QUDA_PROFILE_COUNT.

◆ Start_()

void quda::TimeProfile::Start_ ( const char *  func,
const char *  file,
int  line,
QudaProfileType  idx 
)
inline

Definition at line 282 of file quda_internal.h.

References fname, func, idx, profile, PUSH_RANGE, quda::QUDA_PROFILE_TOTAL, quda::Timer::Start(), StartGlobal(), switchOff, and use_global.

Here is the call graph for this function:

◆ StartGlobal()

static void quda::TimeProfile::StartGlobal ( const char *  func,
const char *  file,
int  line,
QudaProfileType  idx 
)
inlinestaticprivate

Definition at line 262 of file quda_internal.h.

References func, global_profile, global_switchOff, global_total_level, idx, and quda::Timer::Start().

Referenced by Start_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Stop_()

void quda::TimeProfile::Stop_ ( const char *  func,
const char *  file,
int  line,
QudaProfileType  idx 
)
inline

Definition at line 295 of file quda_internal.h.

References func, idx, POP_RANGE, profile, quda::QUDA_PROFILE_TOTAL, quda::Timer::Stop(), StopGlobal(), switchOff, and use_global.

Here is the call graph for this function:

◆ StopGlobal()

static void quda::TimeProfile::StopGlobal ( const char *  func,
const char *  file,
int  line,
QudaProfileType  idx 
)
inlinestaticprivate

Definition at line 249 of file quda_internal.h.

References func, global_profile, global_switchOff, global_total_level, idx, and quda::Timer::Stop().

Referenced by Stop_().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fname

std::string quda::TimeProfile::fname
private

Which function are we profiling

Definition at line 233 of file quda_internal.h.

Referenced by Print(), and Start_().

◆ global_profile

Timer quda::TimeProfile::global_profile
staticprivate

Definition at line 245 of file quda_internal.h.

Referenced by PrintGlobal(), StartGlobal(), and StopGlobal().

◆ global_switchOff

bool quda::TimeProfile::global_switchOff = {}
staticprivate

Definition at line 246 of file quda_internal.h.

Referenced by StartGlobal(), and StopGlobal().

◆ global_total_level

int quda::TimeProfile::global_total_level = {}
staticprivate

Definition at line 247 of file quda_internal.h.

Referenced by StartGlobal(), and StopGlobal().

◆ pname

std::string quda::TimeProfile::pname
staticprivate
Initial value:
= { "download", "upload", "init", "preamble", "compute",
"comms", "epilogue", "free", "file i/o", "dummy", "pack kernel",
"dslash kernel", "gather", "scatter",
"kernel launch", "event record",
"event query", "stream wait event", "set func attribute",
"event synchronize", "stream synchronize", "device synchronize",
"memcpy d2d async", "memcpy d2h async", "memcpy2d d2h async",
"memcpy h2d async", "comms start", "comms query", "constant", "total" }

Definition at line 239 of file quda_internal.h.

Referenced by Print(), and PrintGlobal().

◆ profile

Timer quda::TimeProfile::profile[QUDA_PROFILE_COUNT]
private

Definition at line 238 of file quda_internal.h.

Referenced by Last(), Print(), Reset_(), Start_(), and Stop_().

◆ switchOff

bool quda::TimeProfile::switchOff
private

Definition at line 241 of file quda_internal.h.

Referenced by Start_(), and Stop_().

◆ use_global

bool quda::TimeProfile::use_global
private

Definition at line 242 of file quda_internal.h.

Referenced by Start_(), and Stop_().


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