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.
concepts.hpp File Reference
#include <cstddef>
#include <cstdint>
#include <string>
#include <tuple>
#include <type_traits>
+ Include dependency graph for concepts.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tim::concepts::empty
 
struct  tim::concepts::is_empty< Tp >
 concept that specifies that a variadic type is empty More...
 
struct  tim::concepts::is_empty< Tuple<> >
 
struct  tim::concepts::null_type
 
struct  tim::concepts::is_null_type< Tp >
 concept that specifies that a type is not a useful type More...
 
struct  tim::concepts::is_null_type< Tuple<> >
 
struct  tim::concepts::is_null_type< void >
 
struct  tim::concepts::is_null_type<::tim::null_type >
 
struct  tim::concepts::is_null_type< statistics< Tuple<> > >
 
struct  tim::concepts::is_null_type< statistics< void > >
 
struct  tim::concepts::is_null_type< statistics<::tim::null_type > >
 
struct  tim::concepts::placeholder
 
struct  tim::concepts::is_placeholder< Tp >
 concept that specifies that a type is not necessarily marked as not available but is still a dummy type More...
 
struct  tim::concepts::is_placeholder< component::placeholder< Types... > >
 
struct  tim::concepts::is_placeholder< component::placeholder< component::nothing > >
 
struct  tim::concepts::is_placeholder< component::nothing >
 
struct  tim::concepts::component
 
struct  tim::concepts::is_component< Tp >
 concept that specifies that a type is a component. Components are used to perform some measurement, capability, or logging implementation. Adding this concept can be performs through inheriting from tim::component::base, inheriting from tim::concepts::component, or specializing either tim::concepts::is_component or tim::trait::is_component (with the latter being deprecated). More...
 
struct  tim::concepts::quirk_type
 
struct  tim::concepts::is_quirk_type< Tp >
 concept that specifies that a type is a quirk. Quirks are used to modify the traditional behavior of component bundles slightly. E.g. disable calling start in the constructor of an auto_tuple. More...
 
struct  tim::concepts::api
 
struct  tim::concepts::is_api< Tp >
 concept that specifies that a type is an API. APIs are used to designate different project implementations, different external library tools, etc. More...
 
struct  tim::concepts::variadic
 
struct  tim::concepts::is_variadic< Tp >
 concept that specifies that a type is a generic variadic wrapper More...
 
struct  tim::concepts::wrapper
 
struct  tim::concepts::is_wrapper< Tp >
 concept that specifies that a type is a timemory variadic wrapper More...
 
struct  tim::concepts::stack_wrapper
 
struct  tim::concepts::is_stack_wrapper< Tp >
 concept that specifies that a type is a timemory variadic wrapper and components are stack-allocated More...
 
struct  tim::concepts::heap_wrapper
 
struct  tim::concepts::is_heap_wrapper< Tp >
 concept that specifies that a type is a timemory variadic wrapper and components are heap-allocated More...
 
struct  tim::concepts::mixed_wrapper
 
struct  tim::concepts::is_mixed_wrapper< Tp >
 concept that specifies that a type is a timemory variadic wrapper and variadic types are mix of stack- and heap- allocated More...
 
struct  tim::concepts::tagged
 
struct  tim::concepts::is_tagged< Tp >
 concept that specifies that a type's template parameters include a API specific tag as one of the template parameters (usually first) More...
 
struct  tim::concepts::comp_wrapper
 
struct  tim::concepts::is_comp_wrapper< Tp >
 concept that specifies that a type is a timemory variadic wrapper that does not perform auto start/stop, e.g. component_{tuple,list,hybrid} More...
 
struct  tim::concepts::auto_wrapper
 
struct  tim::concepts::is_auto_wrapper< Tp >
 concept that specifies that a type is a timemory variadic wrapper that performs auto start/stop, e.g. auto_{tuple,list,hybrid} More...
 
struct  tim::concepts::runtime_configurable
 
struct  tim::concepts::is_runtime_configurable< Tp >
 concept that specifies that a type is used to modify behavior at runtime. For example, the tim::component::user_bundle component is runtime configurable bc it allows you insert components at runtime. The timing category (tim::category::timing) is another example of a type that is runtime configurable – setting tim::trait::runtime_enabled<tim::category::timing>::set(false); will disable (at runtime) all the types which are part of the timing API. It should be noted that types which satisfy is_runtime_configurable<Tp>::value == true (e.g. tim::component::user_bundle) are not eligible to be inserted into other runtime configurable components; i.e. you cannot insert/add tim::component::user_trace_bundle into tim::component::user_global_bundle, etc. This restriction is primarily due to the significant increase in compile-time that arises from allowing this behavior. More...
 
struct  tim::concepts::external_function_wrapper
 
struct  tim::concepts::is_external_function_wrapper< Tp >
 concept that specifies that a component type wraps external functions More...
 
struct  tim::concepts::phase_id
 
struct  tim::concepts::is_phase_id< Tp >
 concept that specifies that a type is used for identifying a phase in some measurement. For example, tim::audit::incoming and tim::audit::outgoing can be added to overloads to distinguish whether the double type in double exp(double val) is val or whether it is the return value. More...
 
struct  tim::concepts::string_type
 
struct  tim::concepts::is_string_type< Tp >
 concept that specifies that a component type wraps external functions More...
 
struct  tim::concepts::is_string_type< char * >
 
struct  tim::concepts::is_string_type< const char * >
 
struct  tim::concepts::has_gotcha< T >
 determines if a variadic wrapper contains a gotcha component More...
 
struct  tim::concepts::has_user_bundle< T >
 concept that specifies that a type is a user_bundle type More...
 
struct  tim::concepts::is_output_archive< Tp >
 concept that specifies that a type is an output serialization archive More...
 
struct  tim::concepts::is_input_archive< Tp >
 concept that specifies that a type is an input serialization archive More...
 
struct  tim::concepts::is_archive< Tp >
 concept that specifies that a type is a serialization archive (input or output) More...
 
struct  tim::concepts::is_acceptable_conversion< Lhs, Rhs >
 This concept designates that is safe to perform a static_cast<Lhs>(rhs) where needed. This is primarily used in the tim::component::data_tracker where data_tracker<unsigned int, ...> might be provided another integral type, such as int. More...
 
struct  tim::concepts::tuple_type< T >
 This concept is used to express how to convert a given type into a std::tuple, e.g. tim::component_tuple<T...> to std::tuple<T...>. It is necessary for types like tim::component_bundle where certain template parameters are tags. More...
 
struct  tim::concepts::auto_type< T >
 This concept is used to express how to convert a component bundler into another component bundler which performs automatic starting upon construction. More...
 
struct  tim::concepts::component_type< T >
 This concept is used to express how to convert a component bundler which automatically starts upon construction into a type that requires an explicit call to start. More...
 

Namespaces

namespace  tim
 
namespace  tim::cereal
 
namespace  tim::cereal::detail
 
namespace  tim::audit
 
namespace  tim::trait
 
namespace  tim::component
 
namespace  tim::concepts
 

Macros

#define TIMEMORY_IMPL_IS_CONCEPT(CONCEPT)
 
#define TIMEMORY_CONCEPT_ALIAS(ALIAS, TYPE)
 
#define TIMEMORY_DEFINE_CONCRETE_CONCEPT(CONCEPT, SPECIALIZED_TYPE, VALUE)
 
#define TIMEMORY_DEFINE_TEMPLATE_CONCEPT(CONCEPT, SPECIALIZED_TYPE, VALUE, TYPE)
 
#define TIMEMORY_DEFINE_VARIADIC_CONCEPT(CONCEPT, SPECIALIZED_TYPE, VALUE, TYPE)
 
#define TIMEMORY_DEFINE_CONCRETE_CONCEPT_TYPE(CONCEPT, SPECIALIZED_TYPE, ...)
 
#define TIMEMORY_DEFINE_TEMPLATE_CONCEPT_TYPE(CONCEPT, SPECIALIZED_TYPE, TYPE, ...)
 
#define TIMEMORY_DEFINE_VARIADIC_CONCEPT_TYPE(CONCEPT, SPECIALIZED_TYPE, TYPE, ...)
 

Typedefs

using tim::concepts::input_archive_base = cereal::detail::InputArchiveBase
 
using tim::concepts::output_archive_base = cereal::detail::OutputArchiveBase
 
template<typename T >
using tim::is_empty_t = typename concepts::is_empty< T >::type
 
template<typename T >
using tim::is_variadic_t = typename concepts::is_variadic< T >::type
 
template<typename T >
using tim::is_wrapper_t = typename concepts::is_wrapper< T >::type
 
template<typename T >
using tim::is_stack_wrapper_t = typename concepts::is_stack_wrapper< T >::type
 
template<typename T >
using tim::is_heap_wrapper_t = typename concepts::is_heap_wrapper< T >::type
 
template<typename T >
using tim::concepts::is_empty_t = typename is_empty< T >::type
 
template<typename T >
using tim::concepts::is_variadic_t = typename is_variadic< T >::type
 
template<typename T >
using tim::concepts::is_wrapper_t = typename is_wrapper< T >::type
 
template<typename T >
using tim::concepts::is_stack_wrapper_t = typename is_stack_wrapper< T >::type
 
template<typename T >
using tim::concepts::is_heap_wrapper_t = typename is_heap_wrapper< T >::type
 
template<typename T >
using tim::concepts::tuple_type_t = typename tuple_type< T >::type
 
template<typename T >
using tim::concepts::auto_type_t = typename auto_type< T >::type
 
template<typename T >
using tim::concepts::component_type_t = typename component_type< T >::type
 

Class Documentation

◆ tim::concepts::empty

struct tim::concepts::empty

Definition at line 149 of file concepts.hpp.

+ Collaboration diagram for tim::concepts::empty:

◆ tim::concepts::placeholder

struct tim::concepts::placeholder

Definition at line 198 of file concepts.hpp.

+ Collaboration diagram for tim::concepts::placeholder:

◆ tim::concepts::api

struct tim::concepts::api

Definition at line 273 of file concepts.hpp.

+ Collaboration diagram for tim::concepts::api:

◆ tim::concepts::string_type

struct tim::concepts::string_type

Definition at line 379 of file concepts.hpp.

+ Collaboration diagram for tim::concepts::string_type:

◆ tim::concepts::tuple_type

struct tim::concepts::tuple_type
template<typename T>
struct tim::concepts::tuple_type< T >

This concept is used to express how to convert a given type into a std::tuple, e.g. tim::component_tuple<T...> to std::tuple<T...>. It is necessary for types like tim::component_bundle where certain template parameters are tags.

Definition at line 503 of file concepts.hpp.

+ Collaboration diagram for tim::concepts::tuple_type< T >:
Class Members
typedef typename tuple_type type

◆ tim::concepts::auto_type

struct tim::concepts::auto_type
template<typename T>
struct tim::concepts::auto_type< T >

This concept is used to express how to convert a component bundler into another component bundler which performs automatic starting upon construction.

Definition at line 513 of file concepts.hpp.

+ Collaboration diagram for tim::concepts::auto_type< T >:
Class Members
typedef typename auto_type type

◆ tim::concepts::component_type

struct tim::concepts::component_type
template<typename T>
struct tim::concepts::component_type< T >

This concept is used to express how to convert a component bundler which automatically starts upon construction into a type that requires an explicit call to start.

Definition at line 524 of file concepts.hpp.

+ Collaboration diagram for tim::concepts::component_type< T >:
Class Members
typedef typename component_type type

Macro Definition Documentation

◆ TIMEMORY_CONCEPT_ALIAS

#define TIMEMORY_CONCEPT_ALIAS (   ALIAS,
  TYPE 
)
Value:
namespace tim \
{ \
namespace concepts \
{ \
template <typename T> \
using ALIAS = typename TYPE<T>::type; \
} \
}
Definition: kokkosp.cpp:39

Definition at line 561 of file concepts.hpp.

◆ TIMEMORY_DEFINE_CONCRETE_CONCEPT

#define TIMEMORY_DEFINE_CONCRETE_CONCEPT (   CONCEPT,
  SPECIALIZED_TYPE,
  VALUE 
)
Value:
namespace tim \
{ \
namespace concepts \
{ \
template <> \
struct CONCEPT<SPECIALIZED_TYPE> : VALUE \
{}; \
} \
}

Definition at line 586 of file concepts.hpp.

◆ TIMEMORY_DEFINE_CONCRETE_CONCEPT_TYPE

#define TIMEMORY_DEFINE_CONCRETE_CONCEPT_TYPE (   CONCEPT,
  SPECIALIZED_TYPE,
  ... 
)
Value:
namespace tim \
{ \
namespace concepts \
{ \
template <> \
struct CONCEPT<SPECIALIZED_TYPE> \
{ \
using type = __VA_ARGS__; \
}; \
} \
}

Definition at line 625 of file concepts.hpp.

◆ TIMEMORY_DEFINE_TEMPLATE_CONCEPT

#define TIMEMORY_DEFINE_TEMPLATE_CONCEPT (   CONCEPT,
  SPECIALIZED_TYPE,
  VALUE,
  TYPE 
)
Value:
namespace tim \
{ \
namespace concepts \
{ \
template <TYPE T> \
struct CONCEPT<SPECIALIZED_TYPE<T>> : VALUE \
{}; \
} \
}

Definition at line 599 of file concepts.hpp.

◆ TIMEMORY_DEFINE_TEMPLATE_CONCEPT_TYPE

#define TIMEMORY_DEFINE_TEMPLATE_CONCEPT_TYPE (   CONCEPT,
  SPECIALIZED_TYPE,
  TYPE,
  ... 
)
Value:
namespace tim \
{ \
namespace concepts \
{ \
template <TYPE T> \
struct CONCEPT<SPECIALIZED_TYPE<T>> \
{ \
using type = __VA_ARGS__; \
}; \
} \
}

Definition at line 640 of file concepts.hpp.

◆ TIMEMORY_DEFINE_VARIADIC_CONCEPT

#define TIMEMORY_DEFINE_VARIADIC_CONCEPT (   CONCEPT,
  SPECIALIZED_TYPE,
  VALUE,
  TYPE 
)
Value:
namespace tim \
{ \
namespace concepts \
{ \
template <TYPE... T> \
struct CONCEPT<SPECIALIZED_TYPE<T...>> : VALUE \
{}; \
} \
}

Definition at line 612 of file concepts.hpp.

◆ TIMEMORY_DEFINE_VARIADIC_CONCEPT_TYPE

#define TIMEMORY_DEFINE_VARIADIC_CONCEPT_TYPE (   CONCEPT,
  SPECIALIZED_TYPE,
  TYPE,
  ... 
)
Value:
namespace tim \
{ \
namespace concepts \
{ \
template <TYPE... T> \
struct CONCEPT<SPECIALIZED_TYPE<T...>> \
{ \
using type = __VA_ARGS__; \
}; \
} \
}

Definition at line 655 of file concepts.hpp.

◆ TIMEMORY_IMPL_IS_CONCEPT

#define TIMEMORY_IMPL_IS_CONCEPT (   CONCEPT)
Value:
struct CONCEPT \
{}; \
template <typename Tp> \
struct is_##CONCEPT \
{ \
private: \
template <typename, typename = std::true_type> \
struct have : std::false_type \
{}; \
template <typename U> \
struct have<U, typename std::is_base_of<typename U::CONCEPT, U>::type> \
: std::true_type \
{}; \
template <typename U> \
struct have<U, typename std::is_base_of<typename U::CONCEPT##_type, U>::type> \
: std::true_type \
{}; \
\
public: \
using type = typename is_##CONCEPT::template have< \
typename std::remove_cv<Tp>::type>::type; \
static constexpr bool value = \
is_##CONCEPT::template have<typename std::remove_cv<Tp>::type>::value; \
};

Definition at line 39 of file concepts.hpp.