Turi Create  4.0
turi::trace_count Struct Reference

#include <core/system/platform/perf/tracepoint.hpp>

Public Member Functions

void initialize (std::string n, std::string desc, bool print_out=true)
 
void incorporate (unsigned long long val) __attribute__((always_inline))
 
void incorporate (const trace_count &val) __attribute__((always_inline))
 
trace_countoperator+= (trace_count &val)
 
 ~trace_count ()
 
void print (std::ostream &out, unsigned long long tpersec=0) const
 

Detailed Description

Implementation detail of the tracing macros.

Definition at line 49 of file tracepoint.hpp.

Constructor & Destructor Documentation

◆ ~trace_count()

turi::trace_count::~trace_count ( )

Destructor. Will print to cerr if initialize() is called with "true" as the 3rd argument

Member Function Documentation

◆ incorporate() [1/2]

void turi::trace_count::incorporate ( unsigned long long  val)
inline

Adds an event time to the trace

Definition at line 83 of file tracepoint.hpp.

◆ incorporate() [2/2]

void turi::trace_count::incorporate ( const trace_count val)
inline

Adds the counts in a second tracer to the current tracer.

Definition at line 99 of file tracepoint.hpp.

◆ initialize()

void turi::trace_count::initialize ( std::string  n,
std::string  desc,
bool  print_out = true 
)
inline

Initializes the tracer with a name, a description and whether to print on destruction

Definition at line 72 of file tracepoint.hpp.

◆ operator+=()

trace_count& turi::trace_count::operator+= ( trace_count val)
inline

Adds the counts in a second tracer to the current tracer.

Definition at line 115 of file tracepoint.hpp.

◆ print()

void turi::trace_count::print ( std::ostream &  out,
unsigned long long  tpersec = 0 
) const

Prints the tracer counts


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