Enabling statistics in timemory has two parts:
More...
#include "timemory/operations/types/add_statistics.hpp"
|
template<typename StatsT > |
| add_statistics (const type &_obj, StatsT &_stats, bool _last=false) |
|
| add_statistics (const type &_obj, bool _last=false) |
|
template<typename U > |
auto | operator() (const U &rhs, bool _last=false) const |
|
template<typename StatsT , typename U = type> |
void | operator() (const U &rhs, StatsT &stats, bool _last=false, enable_if_t< enabled_statistics< U, StatsT >::value, int >=0) const |
|
template<typename StatsT , typename U = type> |
void | operator() (const U &, StatsT &, bool=true, enable_if_t<!enabled_statistics< U, StatsT >::value, int >=0) const |
|
template<
typename T>
struct tim::operation::add_statistics< T >
Enabling statistics in timemory has two parts:
- tim::trait::record_statistics must be set to true for component
- tim::trait::statistics must set the data type of the statistics
- this is usually set to the data type returned from get()
- tuple<> is the default and will fully disable statistics unless changed
Definition at line 114 of file add_statistics.hpp.
◆ type
◆ add_statistics() [1/2]
◆ add_statistics() [2/2]
◆ operator()() [1/3]
◆ operator()() [2/3]
◆ operator()() [3/3]
Definition at line 195 of file add_statistics.hpp.
200 using incoming_t = decay_t<typename StatsT::value_type>;
201 using expected_t = decay_t<typename trait::statistics<U>::type>;
205 static_assert(trait::permissive_statistics<U>::value ||
206 std::is_same<incoming_t, expected_t>::value,
207 "add_statistics was passed a data type different than declared "
208 "trait::statistics type. To disable this error, e.g. permit "
209 "implicit conversion, set trait::permissive_statistics "
210 "to true_type for component");
211 using stats_policy_type = policy::record_statistics<U>;
213 demangle<StatsT>().c_str(), (_last) ?
"y" :
"n");
214 stats_policy_type{}(stats, rhs, _last);
#define DEBUG_PRINT_HERE(...)
References DEBUG_PRINT_HERE.
The documentation for this struct was generated from the following files: