MADNESS 0.10.1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
madness::profiling::TaskEvent Class Reference

Task event class. More...

#include <thread.h>

Public Member Functions

void start (const std::pair< void *, unsigned short > &id, const unsigned short threads, const double submit_time)
 Record the start time of the task and collect task information.
 
void stop ()
 Record the stop time of the task.
 

Private Member Functions

std::string get_name () const
 Get name of the function pointer.
 

Static Private Member Functions

static void print_demangled (std::ostream &os, const char *symbol)
 Print demangled symbol name.
 

Private Attributes

std::pair< void *, unsigned short > id_
 Task identification information.
 
unsigned short threads_
 Number of threads used by the task.
 
double times_ [3]
 Task trace times: { submit, start, stop }.
 

Friends

std::ostream & operator<< (std::ostream &os, const TaskEvent &te)
 Output the task data using a tab-separated list.
 

Detailed Description

Task event class.

This class is used to record the task trace information, including submit, start, and stop times, as well as identification information.

Member Function Documentation

◆ get_name()

std::string madness::profiling::TaskEvent::get_name ( ) const
inlineprivate

Get name of the function pointer.

Returns
The mangled function name.

References id_.

◆ print_demangled()

static void madness::profiling::TaskEvent::print_demangled ( std::ostream &  os,
const char *  symbol 
)
inlinestaticprivate

Print demangled symbol name.

Add the demangled symbol name to os. If demangling fails, the unmodified symbol name is used instead. If symbol is NULL, "UNKNOWN" is used instead. A tab character is added after the symbol name.

Parameters
[in,out]osThe output stream.
[in]symbolThe symbol to add to the stream.

References madness::name(), and status.

◆ start()

void madness::profiling::TaskEvent::start ( const std::pair< void *, unsigned short > &  id,
const unsigned short  threads,
const double  submit_time 
)
inline

Record the start time of the task and collect task information.

Parameters
[in,out]idThe task identifier (a function pointer or const char*) and an integer to differentiate the different types.
[in]threadsThe number of threads this task uses.
[in]submit_timeThe time that the task was submitted to the task queue.

References id_, threads_, times_, and madness::wall_time().

◆ stop()

void madness::profiling::TaskEvent::stop ( )
inline

Record the stop time of the task.

References times_, and madness::wall_time().

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const TaskEvent te 
)
friend

Output the task data using a tab-separated list.

Output information includes

  • the ID pointer
  • the function, member function, and object type name
  • the number of threads used by the task
  • the submit time
  • the start time
  • the stop time.
Parameters
[in,out]osThe output stream.
[in]teThe task event to be output.
Returns
The os reference.

Member Data Documentation

◆ id_

std::pair<void*, unsigned short> madness::profiling::TaskEvent::id_
private

Task identification information.

Referenced by get_name(), and start().

◆ threads_

unsigned short madness::profiling::TaskEvent::threads_
private

Number of threads used by the task.

Referenced by start().

◆ times_

double madness::profiling::TaskEvent::times_[3]
private

Task trace times: { submit, start, stop }.

Referenced by start(), and stop().


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