STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
stapl::confidence_interval_controller< Counter > Class Template Referenceabstract

Base class to built upon by programs that want to collect profile information about certain functions. More...

Public Member Functions

 base_profiler (std::string inname="untitled", std::string ver="STAPL", int argc=0, char **argv=nullptr)
 
unsigned int get_iterations (void) const
 
double get_avg (void) const
 
double get_min (void) const
 
double get_max (void) const
 
double get_std (void) const
 
double get_conf (void) const
 
std::string const & get_name (void) const
 
bool get_validation_result () const
 
virtual void initialize (void)
 
virtual void initialize_iteration (void)
 
virtual void run (void)=0
 
virtual void finalize_iteration (void)
 
virtual bool continue_iterating (void)
 
virtual void finalize (void)
 
virtual void check_validity (void)
 Method used in the general validation run (validate()) to actually check for the validity of the results and set m_passed to appropriate value. More...
 
virtual void collect_profile (void)
 
virtual void report (std::stringstream &ss)
 
void report (void)
 
void set_options (int argc, char **argv)
 

Protected Member Functions

virtual void print_extra_information (std::stringstream &ss)
 Profilers may use multiple counters to collect different pieces of information, such as L2 or L3 cache misses; these may be reported in addition to the default counter (usually time) by overriding this method.
 
metric_type reflect_metric (metric_type const &m) const
 
template<typename T >
reflect_value (T x) const
 

Protected Attributes

std::string name
 Basic name of the profiler.
 
time_t m_start_time
 Starting time of this profiling run.
 
time_t m_wallclock_sec
 Total time taken by this profiling run.
 
std::size_t m_max_wallclock_sec
 Maximum allowed time for this profiling run before terminating it.
 
std::size_t m_cache_size
 Cache size in MB to be flushed before every iteration.
 
std::size_t m_cache_tmp
 Temporary variable to prevent the compiler optimizing out cache flushing.
 
std::string m_file_name_prefix
 Prefix for the filename to dump the profiler report into.
 
Counter m_counter
 Performance counter.
 
bool m_passed
 Flag indicating the validation status (. More...
 

Detailed Description

template<typename Counter>
class stapl::confidence_interval_controller< Counter >

Base class to built upon by programs that want to collect profile information about certain functions.

Backed by confidence_interval_controller to control the iteration until desired confidence level has been reached, compute sample statistics and report the results.

Template Parameters
CounterCounter type used.

Member Function Documentation

◆ reflect_metric()

template<typename Counter >
metric_type stapl::confidence_interval_controller< Counter >::reflect_metric ( metric_type const &  m) const
protected

Helper function to facilitate RMIs used when collecting the results.

◆ check_validity()

template<typename Counter >
virtual void stapl::confidence_interval_controller< Counter >::check_validity ( void  )
virtual

Method used in the general validation run (validate()) to actually check for the validity of the results and set m_passed to appropriate value.

Specialized profilers may customize this method for simple validity checking based on the results of a single profiling run. If different code than the one used for profiling purposes has to be executed to obtain results for validation, the full validate() method has to be overriden.

Note
m_passed will be set locally – a reduction will be typically required to determine the global validity.

Member Data Documentation

◆ m_passed

template<typename Counter >
bool stapl::confidence_interval_controller< Counter >::m_passed
protected

Flag indicating the validation status (.

See also
validate())

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