35#include "timemory/tpls/cereal/cereal.hpp"
53 constexpr bool empty()
const {
return true; }
54 constexpr size_t size()
const {
return 0; }
58 template <
typename ArchiveT>
71 template <
typename... Args>
92template <
typename Tp,
typename Value>
100 template <
typename U>
155 template <
typename Ret,
typename Lhs,
typename Rhs>
158 static_assert(std::is_pointer<Tp>::value ==
false,
"Error pointer base type");
161 TIMEMORY_DEFAULT_OBJECT(
base)
183 void get(
void*& ptr,
size_t _typeid_hash)
const;
202 template <
typename Up = Tp>
206 template <
typename Up = Tp>
217 template <
typename Archive,
typename Up =
Type,
219 void load(Archive& ar,
unsigned int);
222 template <
typename Archive,
typename Up =
Type,
224 void save(Archive& ar,
unsigned int version)
const;
226 template <
typename Vp,
typename Up = Tp,
242 using data_type::get_accum;
243 using data_type::get_last;
244 using data_type::get_value;
252 using data_type::set_accum;
253 using data_type::set_last;
254 using data_type::set_value;
275 if(rhs.get_is_transient())
282 if(rhs.get_is_transient())
294 using data_type::accum;
295 using data_type::last;
296 using data_type::value;
309#if !defined(DOXYGEN_SHOULD_SKIP_THIS)
314 template <typename Up = Type, typename UnitT = typename trait::units<Up>::type,
318 template <
typename Up =
Type,
323 template <typename Up = Type, typename UnitT = typename trait::units<Up>::type,
327 template <
typename Up =
Type,
348template <
typename Tp>
354 using EmptyT = std::tuple<>;
394 template <
typename Ret,
typename Lhs,
typename Rhs>
398 TIMEMORY_DEFAULT_OBJECT(
base)
401 template <
typename... Args>
412 TIMEMORY_INLINE int64_t
get_laps()
const {
return 0; }
413 TIMEMORY_INLINE
void*
get_iterator()
const {
return nullptr; }
415 TIMEMORY_INLINE
void set_laps(int64_t) {}
420 TIMEMORY_INLINE
void get() {}
421 void get(
void*& ptr,
size_t _typeid_hash)
const;
446 if(rhs.get_is_transient())
452 if(rhs.get_is_transient())
#define TIMEMORY_HOST_DEVICE_FUNCTION
Arbitrary Graph / Tree (i.e. binary-tree but not binary). It is unlikely that this class will interac...
Declare the base component types.
void load(Archive &ar, tim::node::graph< Tp > &d)
typename internal::base_data< Tp, ValueT >::type base_data_t
typename graph< node::graph< Tp > >::const_iterator graph_const_iterator_t
typename graph< node::graph< Tp > >::iterator graph_iterator_t
typename std::enable_if< B, T >::type enable_if_t
a generic type for prioritizing a function call to the base class over derived functions,...
tim::mpl::apply< std::string > string
const std::string std::ostream * os
Declare the operations types.
Declare the storage types.
Provide state configuration options for a component instance. The current states are:
void set_is_transient(bool v)
void set_is_on_stack(bool v)
bool get_depth_change() const
void set_is_running(bool v)
bool get_is_on_stack() const
bool get_is_transient() const
void set_depth_change(bool v)
bool get_is_running() const
bool get_is_invalid() const
void set_is_invalid(bool v)
static short get_precision()
Type & divide_oper(const Value &rhs)
Type & plus_oper(const Value &rhs)
friend std::ostream & operator<<(std::ostream &os, const base_type &obj)
void set_is_transient(bool v)
Type & multiply_oper(const Type &rhs)
Type & operator-=(const Value &rhs)
static base_storage_type * get_storage()
base_data_t< Tp, Value > data_type
auto get_iterator() const
void reset()
reset the values
graph_iterator_t< Tp > graph_iterator
auto get_display() const
retrieve the current measurement value in the units for the type in a format that can be piped to the...
static constexpr bool memory_category_v
Type & minus_oper(const Type &rhs)
static int64_t get_unit()
void save(Archive &ar, unsigned int version) const
serialization store (output)
static constexpr auto ios_showpoint
void print(std::ostream &, enable_if_t<!trait::uses_value_storage< Up, Value >::value, long >=0) const
static constexpr bool timing_category_v
static std::string get_label()
void set_iterator(graph_iterator itr)
Type & operator+=(const Type &rhs)
Type & multiply_oper(const Value &rhs)
base< Tp, Value > base_type
Type & operator*=(const Type &rhs)
int64_t get_laps() const
add a sample
Type & operator-=(const Type &rhs)
auto plus(crtp::base, const base_type &rhs)
Type & plus_oper(const Type &rhs)
auto minus(crtp::base, const base_type &rhs)
void set_stopped()
store that stop has been called
bool get_is_transient() const
Type & operator/=(const Value &rhs)
static std::string display_unit()
static std::string get_display_unit()
static const fmtflags format_flags
typename data_type::accum_type accum_type
static constexpr auto ios_fixed
void load(Archive &ar, unsigned int)
serialization load (input)
static void add_sample(Vp &&)
typename data_type::last_type last_type
static void configure(Args &&...)
static fmtflags get_format_flags()
Type & operator/=(const Type &rhs)
static opaque get_opaque(scope::config)
get the opaque binding for user-bundle
static std::string label()
void print(std::ostream &, enable_if_t< trait::uses_value_storage< Up, Value >::value, int >=0) const
storage< Tp, Value > storage_type
static constexpr bool timing_units_v
Type & operator+=(const Value &rhs)
Type & divide_oper(const Type &rhs)
void minus(const base_type &rhs)
static constexpr bool percent_units_v
static constexpr bool memory_units_v
Type & minus_oper(const Value &rhs)
static constexpr bool is_component
auto get() const
retrieve the current measurement value in the units for the type
std::vector< U > vector_t
Type & operator*=(const Value &rhs)
void get(void *&ptr, size_t _typeid_hash) const
assign type to a pointer
decltype(auto) load() const
void plus(const base_type &rhs)
void set_started()
store that start has been called
static std::string get_description()
static std::string description()
typename trait::dynamic_base< Tp >::type dynamic_type
typename trait::cache< Tp >::type cache_type
static constexpr auto ios_decimal
std::ios_base::fmtflags fmtflags
A very lightweight base which provides no storage.
static opaque get_opaque(Args &&...)
A very lightweight storage class which provides nothing.
constexpr bool empty() const
constexpr void reset() const
constexpr size_t true_size() const
static constexpr empty_storage * noninit_instance()
constexpr void print() const
constexpr void do_serialize(ArchiveT &)
constexpr size_t size() const
This is the compact representation of a measurement in the call-graph.
this is a placeholder type for optional type-traits. It is used as the default type for the type-trai...
invoked from the base class to provide default printing behavior
The purpose of this operation class is operating on two components to compose a result,...
The purpose of this operation class is construct an object with specific args.
This operation class is used for copying the object generically.
This operation class is used for division of a component.
This operation class is used for a single measurement for a component.
Define subtraction operations.
This operation class is used for multiplication of a component.
Define addition operations.
Print the storage for a component.
print routines for individual components
This operation class is used for sampling.
Call the set_prefix member function. These instantiations are always inlined because of the use of st...
This operation attempts to call a member function which the component provides to internally store wh...
This operation attempts to call a member function which the component provides to internally store wh...
Specification of how to accumulate statistics. This will not be used unless tim::trait::statistics ha...
this data type encodes the options of storage scope. The default is hierarchical (tree) scope....
trait that designates the type the static polymorphic base class (tim::component::base) inherit from.
trait that designates the width and precision should follow formatting settings related to memory mea...
trait that designates the width and precision should follow formatting settings related to timing mea...
trait that designates the units should follow unit settings related to memory measurements
trait that designates the units are a percentage
trait that designates the units should follow unit settings related to timing measurements
This trait is used to determine whether the (expensive) instantiation of the storage class happens.
typename typename typename