timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
tim::trait::report< T > Struct Template Reference

trait that allows runtime configuration of reporting certain types of values. Only applies to text output. This will allows modifying the value set by the specific "report_*" type-trait. More...

#include "timemory/mpl/type_traits.hpp"

+ Collaboration diagram for tim::trait::report< T >:

Public Types

enum  field : short {
  COUNT = 0 ,
  DEPTH ,
  METRIC ,
  UNITS ,
  SUM ,
  MEAN ,
  STATS ,
  SELF ,
  MIN ,
  MAX ,
  VARIANCE ,
  STDDEV ,
  FIELDS_END
}
 
using value_type = std::array< bool, FIELDS_END >
 

Static Public Member Functions

static bool get (short idx)
 
static void set (short idx, bool val)
 
static bool count ()
 
static void count (bool val)
 
static bool depth ()
 
static void depth (bool val)
 
static bool metric ()
 
static void metric (bool val)
 
static bool units ()
 
static void units (bool val)
 
static bool sum ()
 
static void sum (bool val)
 
static bool mean ()
 
static void mean (bool val)
 
static bool stats ()
 
static void stats (bool val)
 
static bool self ()
 
static void self (bool val)
 
static bool min ()
 
static void min (bool val)
 
static bool max ()
 
static void max (bool val)
 
static bool variance ()
 
static void variance (bool val)
 
static bool stddev ()
 
static void stddev (bool val)
 

Detailed Description

template<typename T>
struct tim::trait::report< T >

trait that allows runtime configuration of reporting certain types of values. Only applies to text output. This will allows modifying the value set by the specific "report_*" type-trait.

Definition at line 630 of file type_traits.hpp.

Member Typedef Documentation

◆ value_type

template<typename T >
using tim::trait::report< T >::value_type = std::array<bool, FIELDS_END>

Definition at line 656 of file type_traits.hpp.

Member Enumeration Documentation

◆ field

template<typename T >
enum tim::trait::report::field : short
Enumerator
COUNT 
DEPTH 
METRIC 
UNITS 
SUM 
MEAN 
STATS 
SELF 
MIN 
MAX 
VARIANCE 
STDDEV 
FIELDS_END 

Definition at line 639 of file type_traits.hpp.

Member Function Documentation

◆ count() [1/2]

template<typename T >
static bool tim::trait::report< T >::count ( )
inlinestatic

Definition at line 669 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()
std::array< bool, FIELDS_END > value_type

◆ count() [2/2]

template<typename T >
static void tim::trait::report< T >::count ( bool  val)
inlinestatic

Definition at line 669 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ depth() [1/2]

template<typename T >
static bool tim::trait::report< T >::depth ( )
inlinestatic

Definition at line 670 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ depth() [2/2]

template<typename T >
static void tim::trait::report< T >::depth ( bool  val)
inlinestatic

Definition at line 670 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ get()

template<typename T >
static bool tim::trait::report< T >::get ( short  idx)
inlinestatic

Definition at line 658 of file type_traits.hpp.

659 {
660 return get_runtime_value().at(idx % FIELDS_END) &&
661 get_runtime_env().at(idx % FIELDS_END);
662 }

References tim::trait::report< T >::FIELDS_END.

◆ max() [1/2]

template<typename T >
static bool tim::trait::report< T >::max ( )
inlinestatic

Definition at line 678 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ max() [2/2]

template<typename T >
static void tim::trait::report< T >::max ( bool  val)
inlinestatic

Definition at line 678 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ mean() [1/2]

template<typename T >
static bool tim::trait::report< T >::mean ( )
inlinestatic

Definition at line 674 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ mean() [2/2]

template<typename T >
static void tim::trait::report< T >::mean ( bool  val)
inlinestatic

Definition at line 674 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ metric() [1/2]

template<typename T >
static bool tim::trait::report< T >::metric ( )
inlinestatic

Definition at line 671 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ metric() [2/2]

template<typename T >
static void tim::trait::report< T >::metric ( bool  val)
inlinestatic

Definition at line 671 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ min() [1/2]

template<typename T >
static bool tim::trait::report< T >::min ( )
inlinestatic

Definition at line 677 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ min() [2/2]

template<typename T >
static void tim::trait::report< T >::min ( bool  val)
inlinestatic

Definition at line 677 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ self() [1/2]

template<typename T >
static bool tim::trait::report< T >::self ( )
inlinestatic

Definition at line 676 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ self() [2/2]

template<typename T >
static void tim::trait::report< T >::self ( bool  val)
inlinestatic

Definition at line 676 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ set()

template<typename T >
static void tim::trait::report< T >::set ( short  idx,
bool  val 
)
inlinestatic

Definition at line 664 of file type_traits.hpp.

665 {
666 get_runtime_value().at(idx % FIELDS_END) = val;
667 }

References tim::trait::report< T >::FIELDS_END.

◆ stats() [1/2]

template<typename T >
static bool tim::trait::report< T >::stats ( )
inlinestatic

Definition at line 675 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ stats() [2/2]

template<typename T >
static void tim::trait::report< T >::stats ( bool  val)
inlinestatic

Definition at line 675 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ stddev() [1/2]

template<typename T >
static bool tim::trait::report< T >::stddev ( )
inlinestatic

Definition at line 680 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ stddev() [2/2]

template<typename T >
static void tim::trait::report< T >::stddev ( bool  val)
inlinestatic

Definition at line 680 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ sum() [1/2]

template<typename T >
static bool tim::trait::report< T >::sum ( )
inlinestatic

Definition at line 673 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ sum() [2/2]

template<typename T >
static void tim::trait::report< T >::sum ( bool  val)
inlinestatic

Definition at line 673 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ units() [1/2]

template<typename T >
static bool tim::trait::report< T >::units ( )
inlinestatic

Definition at line 672 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ units() [2/2]

template<typename T >
static void tim::trait::report< T >::units ( bool  val)
inlinestatic

Definition at line 672 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ variance() [1/2]

template<typename T >
static bool tim::trait::report< T >::variance ( )
inlinestatic

Definition at line 679 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

◆ variance() [2/2]

template<typename T >
static void tim::trait::report< T >::variance ( bool  val)
inlinestatic

Definition at line 679 of file type_traits.hpp.

682:
683 static value_type& get_runtime_value()

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