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.
types.hpp
Go to the documentation of this file.
1// MIT License
2//
3// Copyright (c) 2020, The Regents of the University of California,
4// through Lawrence Berkeley National Laboratory (subject to receipt of any
5// required approvals from the U.S. Dept. of Energy). All rights reserved.
6//
7// Permission is hereby granted, free of charge, to any person obtaining a copy
8// of this software and associated documentation files (the "Software"), to deal
9// in the Software without restriction, including without limitation the rights
10// to use, copy, modify, merge, publish, distribute, sublicense, and
11// copies of the Software, and to permit persons to whom the Software is
12// furnished to do so, subject to the following conditions:
13//
14// The above copyright notice and this permission notice shall be included in all
15// copies or substantial portions of the Software.
16//
17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23// SOFTWARE.
24
25#pragma once
26
30
31#include <cstdint>
32#include <iostream>
33#include <string>
34#include <type_traits>
35
36///
37/// \macro TSTAG
38/// \brief for tuple_size overloads, clang uses 'class tuple_size' while GCC uses
39/// 'struct tuple_size'... which results in a lot of mismatches-tag warnings
40///
41#if !defined(TSTAG)
42# if defined(TIMEMORY_CLANG_COMPILER)
43# define TSTAG(X) class
44# else
45# define TSTAG(X) X
46# endif
47#endif
48
49//======================================================================================//
50//
51namespace tim
52{
53//--------------------------------------------------------------------------------------//
54//
55// Forward declaration of variadic wrapper types
56//
57//--------------------------------------------------------------------------------------//
58
59template <typename... Types>
60class lightweight_tuple;
61
62template <typename... Types>
64
65template <typename... Types>
66class component_tuple;
67
68template <typename... Types>
69class component_list;
70
71template <typename... Types>
73
74template <typename... Types>
76
77template <typename... Types>
78class auto_tuple;
79
80template <typename... Types>
81class auto_list;
82
83template <typename TupleT, typename ListT>
85
86template <typename TupleT, typename ListT>
87class auto_hybrid;
88
89//
90// actual definition of various bundles
91//
92template <typename Tag, typename CompT, typename BundleT>
93class auto_base_bundle<Tag, CompT, BundleT>;
94
95template <typename ApiT, typename... Types>
96class auto_bundle<ApiT, Types...>;
97
98template <typename ApiT, typename... Types>
99class component_bundle<ApiT, Types...>;
100
101//
102// concepts for conversion
103//
104namespace concepts
105{
106//
107template <typename... Types>
108struct component_type<auto_tuple<Types...>>
109{
110 using type = component_tuple<Types...>;
111};
112//
113template <typename... Types>
114struct component_type<auto_list<Types...>>
115{
116 using type = component_list<Types...>;
117};
118//
119template <typename... Types>
121{
122 using type = component_bundle<Types...>;
123};
124//
125template <typename... Types>
127{
128 using type = component_hybrid<Types...>;
129};
130//
131} // namespace concepts
132//
133namespace mpl
134{
135#if !defined(CXX17)
136template <typename F, typename... Args>
138: std::is_constructible<std::function<void(Args...)>,
139 std::reference_wrapper<std::remove_reference_t<F>>>
140{};
141
142template <typename R, typename F, typename... Args>
144: std::is_constructible<std::function<R(Args...)>,
145 std::reference_wrapper<std::remove_reference_t<F>>>
146{};
147#else
148template <typename F, typename... Args>
149using is_invocable = std::is_invocable<F, Args...>;
150
151template <typename R, typename F, typename... Args>
152using is_invocable_r = std::is_invocable<R, F, Args...>;
153#endif
154/// \class execution_handler
155/// \tparam BundleT A component bundler, e.g. component_bundle
156/// \tparam DataT The data type returned from a function that was executed inside
157/// the chained member functions calls of BundleT
158///
159/// \brief This is an intermediate type that permits operations such as:
160///
161/// \code{.cpp}
162/// long fibonacci(long);
163///
164/// long run(long n)
165/// {
166/// using bundle_t = tim::component_tuple<wall_clock>;
167///
168/// return bundle_t{ "run" }.start().execute(fibonacci, n).stop().return_result();
169/// }
170///
171/// long fibonacci(long n)
172/// {
173/// using bundle_t = tim::component_tuple<wall_clock>;
174///
175/// return (n < 2) ? n :
176/// }
177/// \endcode
178template <typename BundleT, typename DataT>
180
181template <typename BundleT, typename FuncT, typename... Args>
182auto
183execute(BundleT&& _bundle, FuncT&& _func, Args&&... _args,
185 !std::is_void<std::result_of_t<FuncT(Args...)>>::value,
186 int> = 0);
187//
188template <typename BundleT, typename FuncT, typename... Args>
189auto
190execute(BundleT&& _bundle, FuncT&& _func, Args&&... _args,
192 std::is_void<std::result_of_t<FuncT(Args...)>>::value,
193 int> = 0);
194//
195//
196template <typename BundleT, typename ValueT>
197auto
198execute(BundleT&& _bundle, ValueT&& _value,
200//
201} // namespace mpl
202} // namespace tim
203
204//--------------------------------------------------------------------------------------//
205//
206// IS VARIADIC / IS WRAPPER
207//
208//--------------------------------------------------------------------------------------//
209// these are variadic types used to bundle components together
210TIMEMORY_DEFINE_VARIADIC_CONCEPT(is_variadic, std::tuple, true_type, typename)
212
213// there are timemory-specific variadic wrappers
214#if defined(TIMEMORY_USE_DEPRECATED)
215TIMEMORY_DEFINE_VARIADIC_CONCEPT(is_wrapper, auto_hybrid, true_type, typename)
216TIMEMORY_DEFINE_VARIADIC_CONCEPT(is_wrapper, component_hybrid, true_type, typename)
217#endif
218
219// {auto,component}_bundle are empty if one template is supplied
220TIMEMORY_DEFINE_TEMPLATE_CONCEPT(is_empty, auto_bundle, true_type, typename)
222
223//======================================================================================//
224
225TIMEMORY_DEFINE_VARIADIC_CONCEPT_TYPE(tuple_type, std::tuple, typename, std::tuple<T...>)
226TIMEMORY_DEFINE_VARIADIC_CONCEPT_TYPE(auto_type, std::tuple, typename, auto_bundle<T...>)
228 component_bundle<T...>)
229
233 component_bundle<T...>)
234
235//======================================================================================//
236
237namespace tim
238{
239namespace concepts
240{
241template <typename T, typename... Types>
242struct tuple_type<component_bundle<T, Types...>>
243{
244 using type = std::tuple<Types...>;
245};
246//
247//--------------------------------------------------------------------------------------//
248//
249template <typename T, typename... Types>
250struct tuple_type<auto_bundle<T, Types...>>
251{
252 using type = std::tuple<Types...>;
253};
254} // namespace concepts
255} // namespace tim
256//======================================================================================//
257
258namespace tim
259{
260//--------------------------------------------------------------------------------------//
261//
262// convert all variadic wrappers into type lists
263//
264//--------------------------------------------------------------------------------------//
265//
266// Final result
267//
268//--------------------------------------------------------------------------------------//
269//
270template <typename... Types>
271struct type_list_only
272{
273 using type = type_list<Types...>;
274};
275//
276//--------------------------------------------------------------------------------------//
277//
278// Second to last result
279//
280//--------------------------------------------------------------------------------------//
281//
282template <typename... Lhs, typename... Rhs>
283struct type_list_only<type_list<Lhs...>, type_list<Rhs...>>
284{
285 using type = typename type_list_only<Lhs..., Rhs...>::type;
286};
287//
288//--------------------------------------------------------------------------------------//
289//
290// Encountered variadic while reducing but tail still exists
291//
292//--------------------------------------------------------------------------------------//
293//
294template <typename... Lhs, typename... Types, typename... Rhs>
295struct type_list_only<type_list<Lhs...>, std::tuple<Types...>, Rhs...>
296{
297 using type = typename type_list_only<typename type_list_only<Lhs..., Types...>::type,
298 typename type_list_only<Rhs...>::type>::type;
299};
300
301template <typename... Lhs, typename... Types, typename... Rhs>
302struct type_list_only<type_list<Lhs...>, component_tuple<Types...>, Rhs...>
303{
304 using type = typename type_list_only<typename type_list_only<Lhs..., Types...>::type,
305 typename type_list_only<Rhs...>::type>::type;
306};
307
308template <typename... Lhs, typename... Types, typename... Rhs>
309struct type_list_only<type_list<Lhs...>, component_list<Types...>, Rhs...>
310{
311 using type = typename type_list_only<typename type_list_only<Lhs..., Types...>::type,
312 typename type_list_only<Rhs...>::type>::type;
313};
314
315#if defined(TIMEMORY_USE_DEPRECATED)
316template <typename Tup, typename Lst, typename... Lhs, typename... Rhs>
317struct type_list_only<type_list<Lhs...>, component_hybrid<Tup, Lst>, Rhs...>
318{
319 using type = typename type_list_only<typename type_list_only<Lhs..., Tup, Lst>::type,
320 typename type_list_only<Rhs...>::type>::type;
321};
322#endif
323
324template <typename... Lhs, typename... Types, typename... Rhs>
325struct type_list_only<type_list<Lhs...>, auto_tuple<Types...>, Rhs...>
326{
327 using type = typename type_list_only<typename type_list_only<Lhs..., Types...>::type,
328 typename type_list_only<Rhs...>::type>::type;
329};
330
331template <typename... Lhs, typename... Types, typename... Rhs>
332struct type_list_only<type_list<Lhs...>, auto_list<Types...>, Rhs...>
333{
334 using type = typename type_list_only<typename type_list_only<Lhs..., Types...>::type,
335 typename type_list_only<Rhs...>::type>::type;
336};
337
338#if defined(TIMEMORY_USE_DEPRECATED)
339template <typename Tup, typename Lst, typename... Lhs, typename... Rhs>
340struct type_list_only<type_list<Lhs...>, auto_hybrid<Tup, Lst>, Rhs...>
341{
342 using type = typename type_list_only<typename type_list_only<Lhs..., Tup, Lst>::type,
343 typename type_list_only<Rhs...>::type>::type;
344};
345#endif
346//
347//--------------------------------------------------------------------------------------//
348//
349// Listed first
350//
351//--------------------------------------------------------------------------------------//
352//
353template <typename... Lhs, typename... Rhs>
354struct type_list_only<type_list<Lhs...>, Rhs...>
355{
356 using type = typename type_list_only<typename type_list_only<Lhs...>::type,
357 typename type_list_only<Rhs...>::type>::type;
358};
359
360template <typename... Types, typename... Rhs>
361struct type_list_only<std::tuple<Types...>, Rhs...>
362{
363 using type = typename type_list_only<typename type_list_only<Types...>::type,
364 typename type_list_only<Rhs...>::type>::type;
365};
366
367template <typename... Types, typename... Rhs>
368struct type_list_only<component_tuple<Types...>, Rhs...>
369{
370 using type = typename type_list_only<typename type_list_only<Types...>::type,
371 typename type_list_only<Rhs...>::type>::type;
372};
373
374template <typename... Types, typename... Rhs>
375struct type_list_only<component_list<Types...>, Rhs...>
376{
377 using type = typename type_list_only<typename type_list_only<Types...>::type,
378 typename type_list_only<Rhs...>::type>::type;
379};
380
381template <typename... Types, typename... Rhs>
382struct type_list_only<auto_tuple<Types...>, Rhs...>
383{
384 using type = typename type_list_only<typename type_list_only<Types...>::type,
385 typename type_list_only<Rhs...>::type>::type;
386};
387
388template <typename... Types, typename... Rhs>
389struct type_list_only<auto_list<Types...>, Rhs...>
390{
391 using type = typename type_list_only<typename type_list_only<Types...>::type,
392 typename type_list_only<Rhs...>::type>::type;
393};
394
395#if defined(TIMEMORY_USE_DEPRECATED)
396template <typename Tup, typename Lst, typename... Rhs>
397struct type_list_only<component_hybrid<Tup, Lst>, Rhs...>
398{
399 using tup_types = typename type_list_only<Tup>::type;
400 using lst_types = typename type_list_only<Lst>::type;
401 using type = component_hybrid<convert_t<tup_types, component_tuple<>>,
402 convert_t<lst_types, component_list<>>>;
403};
404
405template <typename Tup, typename Lst, typename... Rhs>
406struct type_list_only<auto_hybrid<Tup, Lst>, Rhs...>
407{
408 using tup_types = typename type_list_only<Tup>::type;
409 using lst_types = typename type_list_only<Lst>::type;
410 using type = auto_hybrid<convert_t<tup_types, component_tuple<>>,
411 convert_t<lst_types, component_list<>>>;
412};
413#endif
414//
415//--------------------------------------------------------------------------------------//
416//
417// Concatenation of variadic wrappers
418//
419//--------------------------------------------------------------------------------------//
420//
421namespace impl
422{
423template <typename... Types>
424struct concat
425{
426 using type = std::tuple<Types...>;
427};
428
429template <typename... Types>
430struct concat<type_list<Types...>>
431{
432 using type = std::tuple<Types...>;
433};
434
435template <typename... Types>
436struct concat<std::tuple<Types...>>
437{
438 using type = std::tuple<Types...>;
439};
440
441template <typename... Types>
442struct concat<component_tuple<Types...>>
443{
444 using type = typename concat<Types...>::type;
445};
446
447template <typename... Types>
448struct concat<component_list<Types...>>
449{
450 using type = typename concat<Types...>::type;
451};
452
453template <typename... Types>
454struct concat<component_list<Types*...>> : concat<component_list<Types...>>
455{};
456
457template <typename... Types>
458struct concat<auto_tuple<Types...>>
459{
460 using type = typename concat<Types...>::type;
461};
462
463template <typename... Types>
464struct concat<auto_list<Types...>>
465{
466 using type = typename concat<Types...>::type;
467};
468
469template <typename... Types>
470struct concat<auto_list<Types*...>> : concat<auto_list<Types...>>
471{};
472
473template <typename... Lhs, typename... Rhs>
474struct concat<std::tuple<Lhs...>, std::tuple<Rhs...>>
475{
476 using type = typename concat<Lhs..., Rhs...>::type;
477};
478
479//--------------------------------------------------------------------------------------//
480// component_hybrid
481//--------------------------------------------------------------------------------------//
482#if defined(TIMEMORY_USE_DEPRECATED)
483template <typename... TupTypes, typename... LstTypes>
484struct concat<component_hybrid<std::tuple<TupTypes...>, std::tuple<LstTypes...>>>
485{
486 using tuple_type = component_tuple<TupTypes...>;
487 using list_type = component_list<LstTypes...>;
488 using type = component_hybrid<tuple_type, list_type>;
489};
490
491template <typename... TupTypes, typename... LstTypes>
492struct concat<component_hybrid<component_tuple<TupTypes...>, std::tuple<LstTypes...>>>
493{
494 using tuple_type = component_tuple<TupTypes...>;
495 using list_type = component_list<LstTypes...>;
496 using type = component_hybrid<tuple_type, list_type>;
497};
498
499template <typename... TupTypes, typename... LstTypes>
500struct concat<component_hybrid<std::tuple<TupTypes...>, component_list<LstTypes...>>>
501{
502 using tuple_type = component_tuple<TupTypes...>;
503 using list_type = component_list<LstTypes...>;
504 using type = component_hybrid<tuple_type, list_type>;
505};
506
507template <typename... TupTypes, typename... LstTypes>
508struct concat<component_hybrid<type_list<TupTypes...>, type_list<LstTypes...>>>
509{
510 using tuple_type = component_tuple<TupTypes...>;
511 using list_type = component_list<LstTypes...>;
512 using type = component_hybrid<tuple_type, list_type>;
513};
514
515template <typename... TupTypes, typename... LstTypes>
516struct concat<component_hybrid<component_tuple<TupTypes...>, type_list<LstTypes...>>>
517{
518 using tuple_type = component_tuple<TupTypes...>;
519 using list_type = component_list<LstTypes...>;
520 using type = component_hybrid<tuple_type, list_type>;
521};
522
523template <typename... TupTypes, typename... LstTypes>
524struct concat<component_hybrid<type_list<TupTypes...>, component_list<LstTypes...>>>
525{
526 using tuple_type = component_tuple<TupTypes...>;
527 using list_type = component_list<LstTypes...>;
528 using type = component_hybrid<tuple_type, list_type>;
529};
530
531//--------------------------------------------------------------------------------------//
532// auto_hybrid
533//--------------------------------------------------------------------------------------//
534
535template <typename... TupTypes, typename... LstTypes>
536struct concat<auto_hybrid<std::tuple<TupTypes...>, std::tuple<LstTypes...>>>
537{
538 using tuple_type = component_tuple<TupTypes...>;
539 using list_type = component_list<LstTypes...>;
540 using type = auto_hybrid<tuple_type, list_type>;
541};
542
543template <typename... TupTypes, typename... LstTypes>
544struct concat<auto_hybrid<component_tuple<TupTypes...>, std::tuple<LstTypes...>>>
545{
546 using tuple_type = component_tuple<TupTypes...>;
547 using list_type = component_list<LstTypes...>;
548 using type = auto_hybrid<tuple_type, list_type>;
549};
550
551template <typename... TupTypes, typename... LstTypes>
552struct concat<auto_hybrid<std::tuple<TupTypes...>, component_list<LstTypes...>>>
553{
554 using tuple_type = component_tuple<TupTypes...>;
555 using list_type = component_list<LstTypes...>;
556 using type = auto_hybrid<tuple_type, list_type>;
557};
558
559template <typename... TupTypes, typename... LstTypes>
560struct concat<auto_hybrid<type_list<TupTypes...>, type_list<LstTypes...>>>
561{
562 using tuple_type = component_tuple<TupTypes...>;
563 using list_type = component_list<LstTypes...>;
564 using type = auto_hybrid<tuple_type, list_type>;
565};
566
567template <typename... TupTypes, typename... LstTypes>
568struct concat<auto_hybrid<component_tuple<TupTypes...>, type_list<LstTypes...>>>
569{
570 using tuple_type = component_tuple<TupTypes...>;
571 using list_type = component_list<LstTypes...>;
572 using type = auto_hybrid<tuple_type, list_type>;
573};
574
575template <typename... TupTypes, typename... LstTypes>
576struct concat<auto_hybrid<type_list<TupTypes...>, component_list<LstTypes...>>>
577{
578 using tuple_type = component_tuple<TupTypes...>;
579 using list_type = component_list<LstTypes...>;
580 using type = auto_hybrid<tuple_type, list_type>;
581};
582#endif
583//--------------------------------------------------------------------------------------//
584//
585// Combine
586//
587//--------------------------------------------------------------------------------------//
588
589template <typename... Lhs, typename... Rhs>
590struct concat<std::tuple<Lhs...>, Rhs...>
591{
592 using type = typename concat<typename concat<Lhs...>::type,
593 typename concat<Rhs...>::type>::type;
594};
595
596//--------------------------------------------------------------------------------------//
597// component_tuple
598//--------------------------------------------------------------------------------------//
599
600template <typename... Lhs, typename... Rhs>
601struct concat<component_tuple<Lhs...>, Rhs...>
602{
603 using type = typename concat<typename concat<Lhs...>::type,
604 typename concat<Rhs...>::type>::type;
605};
606
607//--------------------------------------------------------------------------------------//
608// component_list
609//--------------------------------------------------------------------------------------//
610
611template <typename... Lhs, typename... Rhs>
612struct concat<component_list<Lhs...>, Rhs...>
613{
614 using type = typename concat<typename concat<Lhs...>::type,
615 typename concat<Rhs...>::type>::type;
616};
617
618template <typename... Lhs, typename... Rhs>
619struct concat<component_list<Lhs...>*, Rhs*...>
620: public concat<component_list<Lhs...>, Rhs...>
621{};
622
623template <typename... Lhs, typename... Rhs>
624struct concat<component_list<Lhs...>*, Rhs...>
625: public concat<component_list<Lhs...>, Rhs...>
626{};
627
628//--------------------------------------------------------------------------------------//
629// auto_tuple
630//--------------------------------------------------------------------------------------//
631
632template <typename... Lhs, typename... Rhs>
633struct concat<auto_tuple<Lhs...>, Rhs...>
634{
635 using type = typename concat<typename concat<Lhs...>::type,
636 typename concat<Rhs...>::type>::type;
637};
638
639//--------------------------------------------------------------------------------------//
640// auto_list
641//--------------------------------------------------------------------------------------//
642
643template <typename... Lhs, typename... Rhs>
644struct concat<auto_list<Lhs...>, Rhs...>
645{
646 using type = typename concat<typename concat<Lhs...>::type,
647 typename concat<Rhs...>::type>::type;
648};
649
650template <typename... Lhs, typename... Rhs>
651struct concat<auto_list<Lhs...>*, Rhs*...> : public concat<auto_list<Lhs...>, Rhs...>
652{};
653
654template <typename... Lhs, typename... Rhs>
655struct concat<auto_list<Lhs...>*, Rhs...> : public concat<auto_list<Lhs...>, Rhs...>
656{};
657
658//--------------------------------------------------------------------------------------//
659// component_hybrid
660//--------------------------------------------------------------------------------------//
661#if defined(TIMEMORY_USE_DEPRECATED)
662template <typename Tup, typename Lst, typename... Rhs, typename... Tail>
663struct concat<component_hybrid<Tup, Lst>, component_tuple<Rhs...>, Tail...>
664{
665 using type =
666 typename concat<component_hybrid<typename concat<Tup, Rhs...>::type, Lst>,
667 Tail...>::type;
668 using tuple_type = typename type::tuple_t;
669 using list_type = typename type::list_t;
670};
671
672template <typename Tup, typename Lst, typename... Rhs, typename... Tail>
673struct concat<component_hybrid<Tup, Lst>, component_list<Rhs...>, Tail...>
674{
675 using type =
676 typename concat<component_hybrid<Tup, typename concat<Lst, Rhs...>::type>,
677 Tail...>::type;
678 using tuple_type = typename type::tuple_t;
679 using list_type = typename type::list_t;
680};
681
682//--------------------------------------------------------------------------------------//
683// auto_hybrid
684//--------------------------------------------------------------------------------------//
685
686template <typename Tup, typename Lst, typename... Rhs, typename... Tail>
687struct concat<auto_hybrid<Tup, Lst>, component_tuple<Rhs...>, Tail...>
688{
689 using type = typename concat<auto_hybrid<typename concat<Tup, Rhs...>::type, Lst>,
690 Tail...>::type;
691 using tuple_type = typename type::tuple_t;
692 using list_type = typename type::list_t;
693};
694
695template <typename Tup, typename Lst, typename... Rhs, typename... Tail>
696struct concat<auto_hybrid<Tup, Lst>, component_list<Rhs...>, Tail...>
697{
698 using type = typename concat<auto_hybrid<Tup, typename concat<Lst, Rhs...>::type>,
699 Tail...>::type;
700 using tuple_type = typename type::tuple_t;
701 using list_type = typename type::list_t;
702};
703#endif
704} // namespace impl
705
706template <typename... Types>
707using concat = typename impl::concat<Types...>::type;
708
709// template <typename... Types>
710// using concat = typename type_list_only<Types...>::type;
711
712} // namespace tim
713
714//======================================================================================//
715
716namespace std
717{
718//
719//--------------------------------------------------------------------------------------//
720//
721// Forward declare intent to define these once all the type-traits have been set
722// after including "timemory/components/types.hpp"
723//
724//--------------------------------------------------------------------------------------//
725//
726template <typename... Types>
727TSTAG(struct)
728tuple_size<tim::lightweight_tuple<Types...>>;
729
730template <typename Tag, typename... Types>
731TSTAG(struct)
732tuple_size<tim::component_bundle<Tag, Types...>>;
733
734template <typename... Types>
735TSTAG(struct)
736tuple_size<tim::component_tuple<Types...>>;
737
738template <typename... Types>
739TSTAG(struct)
740tuple_size<tim::component_list<Types...>>;
741
742template <typename... Types>
743TSTAG(struct)
744tuple_size<tim::auto_bundle<Types...>>;
745
746template <typename... Types>
747TSTAG(struct)
748tuple_size<tim::auto_tuple<Types...>>;
749
750template <typename... Types>
751TSTAG(struct)
752tuple_size<tim::auto_list<Types...>>;
753
754#if defined(TIMEMORY_USE_DEPRECATED)
755template <typename TupleT, typename ListT>
756TSTAG(struct)
757tuple_size<tim::component_hybrid<TupleT, ListT>>;
758
759template <typename TupleT, typename ListT>
760TSTAG(struct)
761tuple_size<tim::auto_hybrid<TupleT, ListT>>;
762#endif
763//
764//--------------------------------------------------------------------------------------//
765//
766} // namespace std
This is a variadic component wrapper where all components are optional at runtime....
Definition: auto_list.hpp:91
This is a variadic component wrapper where all components are allocated on the stack and cannot be di...
Definition: auto_tuple.hpp:65
This is a variadic component wrapper where all components are optional at runtime....
This is a variadic component wrapper where all components are allocated on the stack and cannot be di...
This is a variadic component wrapper which provides the least amount of runtime and compilation overh...
This is an intermediate type that permits operations such as:
STL namespace.
This concept is used to express how to convert a given type into a std::tuple, e.g....
Definition: concepts.hpp:504
This concept is used to express how to convert a component bundler which automatically starts upon co...
Definition: concepts.hpp:525
auto execute(BundleT &&_bundle, FuncT &&_func, Args &&... _args, enable_if_t< is_invocable< FuncT, Args... >::value &&!std::is_void< std::result_of_t< FuncT(Args...)> >::value, int >)
Definition: kokkosp.cpp:39
typename impl::concat< Types... >::type concat
Definition: types.hpp:707
std::array< char *, 4 > _args
typename std::enable_if< B, T >::type enable_if_t
Alias template for enable_if.
Definition: types.hpp:190
Static polymorphic base class for automatic start/stop bundlers.
Definition: types.hpp:72
This is a variadic component wrapper which combines the features of tim::component_tuple<T....
Definition: types.hpp:63
This is a variadic component wrapper which combines the features of tim::auto_tuple<T....
Definition: types.hpp:75
typename TIMEMORY_DEFINE_TEMPLATE_CONCEPT(is_empty, auto_bundle, true_type, typename) TIMEMORY_DEFINE_TEMPLATE_CONCEPT(is_empty
typename component_bundle
Definition: types.hpp:221
#define TSTAG(X)
\macro TSTAG
Definition: types.hpp:45
typename typename typename
Definition: types.hpp:226
type_list
Definition: types.hpp:211
TIMEMORY_DEFINE_VARIADIC_CONCEPT(is_variadic, std::tuple, true_type, typename) TIMEMORY_DEFINE_VARIADIC_CONCEPT(is_variadic
typename typename TIMEMORY_DEFINE_VARIADIC_CONCEPT_TYPE(tuple_type, std::tuple, typename, std::tuple< T... >) TIMEMORY_DEFINE_VARIADIC_CONCEPT_TYPE(auto_type