STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Static Public Member Functions | Friends
stapl::probe< T, Tag > Class Template Reference

The probe is used to profile sections of code and dump the measurements to std::cout. More...

Public Member Functions

 probe (void)
 Creates an empty probe object that does nothing.
 
 ~probe (void)
 Destroys the probe object, stopping the corresponding counter.
 
 probe (probe &&other)
 
probeoperator= (probe &&other)
 
 probe (probe const &)=delete
 
probeoperator= (probe const &)=delete
 
void stop (void)
 Stops the probe.
 
void swap (probe &other) noexcept
 

Static Public Member Functions

static probe get (std::string const &name)
 Returns a probe with the given name.
 
template<typename... U>
static probe get (U const &... u)
 Returns a probe with the given prefix and name.
 
static void clear (void)
 Clears all probes.
 
static std::ostream & dump (std::ostream &os)
 Prints all probes.
 

Friends

std::ostream & operator<< (std::ostream &os, probe const &p)
 

Detailed Description

template<typename T, typename Tag = void>
class stapl::probe< T, Tag >

The probe is used to profile sections of code and dump the measurements to std::cout.

You can use the probe like this:

void foo(void)
{
probe_type p = probe_type::get(__func__, "'s probe"); // foo's probe
// some code
{
probe_type p = probe_type::get("goo's probe");
goo();
}
}

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