25 #ifndef TIMEMORY_VARIADIC_LIGHTWEIGHT_TUPLE_CPP_
26 #define TIMEMORY_VARIADIC_LIGHTWEIGHT_TUPLE_CPP_ 1
42 template <
typename... Types>
43 template <
typename... T>
55 template <
typename... Types>
56 template <
typename... T>
68 template <
typename... Types>
69 template <
typename... T>
80 template <
typename... Types>
91 template <
typename... Types>
101 template <
typename... Types>
110 template <
typename... Types>
122 template <
typename... Types>
128 tmp.m_scope = _scope;
135 template <
typename... Types>
154 template <
typename... Types>
171 template <
typename... Types>
172 template <
typename... Args>
183 template <
typename... Types>
184 template <
typename... Args>
188 invoke::invoke<operation::sample, TIMEMORY_API>(m_data, std::forward<Args>(args)...);
195 template <
typename... Types>
196 template <
typename... Args>
207 template <
typename... Types>
208 template <
typename... Args>
221 template <
typename... Types>
222 template <
typename... Args>
234 template <
typename... Types>
235 template <
typename... Args>
247 template <
typename... Types>
248 template <
typename... Args>
252 return invoke::get(m_data, std::forward<Args>(args)...);
258 template <
typename... Types>
259 template <
typename... Args>
269 template <
typename... Types>
273 invoke::invoke_impl::invoke_data<operation::minus, TIMEMORY_API>(m_data, rhs.
m_data);
274 m_laps -= rhs.m_laps;
280 template <
typename... Types>
284 invoke::invoke_impl::invoke_data<operation::minus, TIMEMORY_API>(m_data, rhs.
m_data);
285 m_laps -= rhs.m_laps;
291 template <
typename... Types>
295 invoke::invoke_impl::invoke_data<operation::plus, TIMEMORY_API>(m_data, rhs.
m_data);
296 m_laps += rhs.m_laps;
302 template <
typename... Types>
306 invoke::invoke_impl::invoke_data<operation::plus, TIMEMORY_API>(m_data, rhs.
m_data);
307 m_laps += rhs.m_laps;
313 template <
typename... Types>
322 template <
typename... Types>
331 template <
typename... Types>
340 template <
typename... Types>
351 template <
typename... Types>
362 template <
typename... Types>
366 static thread_local
bool _once = []() {
367 apply_v::type_access<operation::init_storage, data_type>();
This is a variadic component wrapper which provides the least amount of runtime and compilation overh...
lightweight_tuple clone(bool store, scope::config _scope=scope::get_default())
void set_prefix(const string_t &) const
this_type & operator-=(const this_type &rhs)
T * get()
get member functions taking either a type
this_type & stop(Args &&...)
this_type & measure(Args &&...)
typename bundle_type::data_type data_type
tim::variadic::impl::quirk_config< T, type_list< Types... >, U... > quirk_config
this_type & operator+=(const this_type &rhs)
this_type & reset(Args &&...)
lightweight_tuple()=default
this_type & sample(Args &&...)
this_type & start(Args &&...)
static void init_storage()
requests the component initialize their storage
auto get_labeled(Args &&...) const
this_type & record(Args &&...)
typename bundle_type::string_t string_t
this_type & set_scope(scope::config)
#define IF_CONSTEXPR(...)
void set_scope(TupleT< Tp... > &obj, Args &&... args)
void set_prefix(TupleT< Tp... > &obj, Args &&... args)
void record(TupleT< Tp... > &obj, Args &&... args)
void pop(TupleT< Tp... > &obj, Args &&... args)
auto get(TupleT< Tp... > &obj, Args &&... args)
void stop(TupleT< Tp... > &obj, Args &&... args)
void measure(TupleT< Tp... > &obj, Args &&... args)
void push(TupleT< Tp... > &obj, Args &&... args)
auto get_labeled(TupleT< Tp... > &obj, Args &&... args)
void reset(TupleT< Tp... > &obj, Args &&... args)
void start(TupleT< Tp... > &obj, Args &&... args)
Ret invoke(string_view_t &&label, Func &&func, Args &&... args)
std::bitset< scope_count > data_type
A light-weight alternative to std::function. Pass any callback - including capturing lambdas - cheapl...
void consume_parameters(ArgsT &&...) TIMEMORY_HIDDEN
void init(Args &&... args)
hash_map_ptr_t & get_hash_ids()
lightweight tuple-alternative for meta-programming logic
a variadic type which holds zero or more quirks that are passed to the constructor of a component bun...
this data type encodes the options of storage scope. The default is hierarchical (tree) scope....