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/or sell
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/**
26 * \file timemory/operations/types.hpp
27 * \brief Declare the operations types
28 */
29
30#pragma once
31
32#include "timemory/backends/dmp.hpp"
40
41#include <functional>
42#include <iosfwd>
43#include <type_traits>
44#include <utility>
45
46namespace std
47{
48//
49//--------------------------------------------------------------------------------------//
50//
51template <typename... Types>
52TSTAG(struct)
53tuple_size<::tim::type_list<Types...>>
54{
55public:
56 static constexpr size_t value = sizeof...(Types);
57};
58//
59//--------------------------------------------------------------------------------------//
60//
61} // namespace std
62
63namespace tim
64{
65//
66//--------------------------------------------------------------------------------------//
67//
68template <typename Tp>
70//
71template <template <typename...> class Tuple, typename... Tp>
72struct remove_pointers<Tuple<Tp...>>
73{
74 using type = Tuple<std::remove_pointer_t<Tp>...>;
75};
76//
77template <typename Tp>
79//
80template <typename Tp>
81struct basic_tree;
82//
83namespace node
84{
85template <typename Tp>
86struct tree;
87}
88//
89//--------------------------------------------------------------------------------------//
90//
91namespace data
92{
93struct stream;
94}
95//
96namespace utility
97{
98using stream = data::stream;
99}
100//--------------------------------------------------------------------------------------//
101//
102template <typename T>
103struct statistics;
104//
105//--------------------------------------------------------------------------------------//
106//
107// operations
108//
109//--------------------------------------------------------------------------------------//
110//
111// components that provide the invocation (i.e. WHAT the components need to do)
112//
113namespace operation
114{
115//
116//--------------------------------------------------------------------------------------//
117//
118template <typename Up, typename Ap = trait::is_available_t<Up>>
119struct has_data;
120//
121template <typename Up>
122struct has_data<Up, true_type>
123{
124 // shorthand for non-void
125 using Vp = typename Up::value_type;
126 static constexpr bool value = !std::is_void<Vp>::value;
127};
128//
129template <typename Up>
130struct has_data<Up, false_type>
131{
132 // shorthand for non-void
133 using Vp = void;
134 static constexpr bool value = !std::is_void<Vp>::value;
135};
136//
137//--------------------------------------------------------------------------------------//
138//
139template <typename Up>
141{
142 // shorthand for available + non-void
143 using Vp = typename Up::value_type;
145};
146//
147//--------------------------------------------------------------------------------------//
148//
149template <typename Up>
151{
152 // shorthand for available + uses_value_storage
153 static constexpr bool value =
155};
156//
157//--------------------------------------------------------------------------------------//
158//
159template <typename U>
161//
162//--------------------------------------------------------------------------------------//
163//
164namespace internal
165{
166template <typename U>
167auto
168resolve_record_type(int) -> decltype(
169 U::record(),
170 typename mpl::function_traits<decltype(std::declval<U>().record())>::result_type())
171{
172 return U::record();
173}
174//
175//--------------------------------------------------------------------------------------//
176//
177template <typename U>
178void
180{}
181} // namespace internal
182//
183//--------------------------------------------------------------------------------------//
184//
185template <typename U>
186decltype(internal::resolve_record_type<U>(0))
188{
189 return internal::resolve_record_type<U>(0);
190}
191//
192//--------------------------------------------------------------------------------------//
193//
194template <typename T, typename V = typename T::value_type>
196{
197 using type =
198 typename mpl::function_traits<decltype(&resolve_record_type<T>)>::result_type;
199 static constexpr bool value =
200 (!std::is_void<V>::value && !std::is_void<type>::value && is_enabled<T>::value &&
201 std::is_same<V, type>::value);
202};
203//
204//--------------------------------------------------------------------------------------//
205//
206template <typename Up, typename Vp>
208{
209 using EmptyT = std::tuple<>;
210
211 static constexpr bool value =
213};
214//
215//--------------------------------------------------------------------------------------//
216//
217template <typename U, typename StatsT>
219{
220 using EmptyT = std::tuple<>;
221
222 static constexpr bool value =
223 (trait::record_statistics<U>::value && !std::is_same<StatsT, EmptyT>::value);
224};
225//
226//--------------------------------------------------------------------------------------//
227//
229{
230 enum value
231 {
233 global
234 };
235};
236//
238//
239template <int ModeV>
240using mode_constant = std::integral_constant<int, ModeV>;
241//
242//--------------------------------------------------------------------------------------//
243//
244template <typename U>
246//
247//--------------------------------------------------------------------------------------//
248//
249template <typename T>
250struct async;
251//
252//--------------------------------------------------------------------------------------//
253//
254template <typename T>
255struct init;
256//
257//--------------------------------------------------------------------------------------//
258//
259template <typename T>
260struct init_storage;
261//
262//--------------------------------------------------------------------------------------//
263//
264template <typename T>
265struct fini_storage;
266//
267//--------------------------------------------------------------------------------------//
268//
269template <typename T>
270struct construct;
271//
272//--------------------------------------------------------------------------------------//
273//
274template <typename T>
275struct set_prefix;
276//
277//--------------------------------------------------------------------------------------//
278//
279template <typename T>
280struct set_scope;
281//
282//--------------------------------------------------------------------------------------//
283//
284template <typename T>
285struct set_state;
286//
287//--------------------------------------------------------------------------------------//
288//
289template <typename T>
290struct push_node;
291//
292//--------------------------------------------------------------------------------------//
293//
294template <typename T>
295struct pop_node;
296//
297//--------------------------------------------------------------------------------------//
298//
299template <typename T>
300struct record;
301//
302//--------------------------------------------------------------------------------------//
303//
304template <typename T>
305struct reset;
306//
307//--------------------------------------------------------------------------------------//
308//
309template <typename T>
310struct measure;
311//
312//--------------------------------------------------------------------------------------//
313//
314template <typename T>
315struct sample;
316//
317//--------------------------------------------------------------------------------------//
318//
319template <typename Ret, typename Lhs, typename Rhs>
320struct compose;
321//
322//--------------------------------------------------------------------------------------//
323//
324template <typename T>
325struct insert
326{
327 TIMEMORY_DEFAULT_OBJECT(insert)
328
329 template <typename Up, typename... Args>
330 TIMEMORY_HOT auto operator()(Up& obj, Args&&... args) const
331 {
332 static_assert(!std::is_pointer<Up>::value,
333 "SFINAE tests will always fail with pointer types");
334 return sfinae(obj, 0, 0, std::forward<Args>(args)...);
335 }
336
337private:
338 template <typename Up, typename... Args>
339 static TIMEMORY_HOT auto sfinae(Up& obj, int, int, Args&&... args)
340 -> decltype(obj.insert(std::forward<Args>(args)...))
341 {
342 return obj.insert(std::forward<Args>(args)...);
343 }
344
345 template <typename Up, typename... Args>
346 static TIMEMORY_HOT auto sfinae(Up& obj, int, long, Args&&... args)
347 -> decltype(obj->insert(std::forward<Args>(args)...))
348 {
349 return obj->insert(std::forward<Args>(args)...);
350 }
351
352 template <typename Up, typename... Args>
353 static TIMEMORY_INLINE auto sfinae(Up&, long, long, Args&&...) -> std::nullptr_t
354 {
355 return nullptr;
356 }
357};
358//
359//--------------------------------------------------------------------------------------//
360//
361template <typename T>
363{
364 TIMEMORY_DEFAULT_OBJECT(stack_push)
365
366 template <typename Up, typename Vp>
367 TIMEMORY_HOT void operator()(Up& obj, Vp&& arg) const
368 {
369 static_assert(!std::is_pointer<Up>::value,
370 "SFINAE tests will always fail with pointer types");
371 sfinae(obj, 0, 0, std::forward<Vp>(arg));
372 }
373
374private:
375 template <typename Up, typename Vp>
376 TIMEMORY_HOT auto sfinae(Up& obj, int, int, Vp&& arg) const
377 -> decltype(obj.stack_push(std::forward<Vp>(arg)), void())
378 {
379 obj.stack_push(std::forward<Vp>(arg));
380 }
381
382 template <typename Up, typename Vp>
383 TIMEMORY_HOT auto sfinae(Up& obj, int, long, Vp&& arg) const
384 -> decltype(obj->stack_push(std::forward<Vp>(arg)), void())
385 {
386 if(obj)
387 obj->stack_push(std::forward<Vp>(arg));
388 }
389
390 template <typename Up, typename... Args>
391 TIMEMORY_INLINE void sfinae(Up&, long, long, Args&&...) const
392 {}
393};
394//
395//--------------------------------------------------------------------------------------//
396//
397template <typename T>
398struct pop
399{
400 TIMEMORY_DEFAULT_OBJECT(pop)
401
402 template <typename Up, typename... Args>
403 TIMEMORY_HOT decltype(auto) operator()(Up& obj, Args&&... args) const
404 {
405 static_assert(!std::is_pointer<Up>::value,
406 "SFINAE tests will always fail with pointer types");
407 return sfinae(obj, 0, std::forward<Args>(args)...);
408 }
409
410private:
411 template <typename Up, typename... Args>
412 TIMEMORY_HOT auto sfinae(Up& obj, int, Args&&... args) const
413 -> decltype(obj.pop(std::forward<Args>(args)...))
414 {
415 return obj.pop(std::forward<Args>(args)...);
416 }
417
418 template <typename Up, typename... Args>
419 TIMEMORY_INLINE void sfinae(Up&, long, Args&&...) const
420 {}
421};
422//
423//--------------------------------------------------------------------------------------//
424//
425template <typename T>
427{
428 TIMEMORY_DEFAULT_OBJECT(stack_pop)
429
430 template <typename Up, typename Vp>
431 TIMEMORY_HOT void operator()(Up& obj, Vp&& arg) const
432 {
433 static_assert(!std::is_pointer<Up>::value,
434 "SFINAE tests will always fail with pointer types");
435 sfinae(obj, 0, 0, std::forward<Vp>(arg));
436 }
437
438private:
439 template <typename Up, typename Vp>
440 TIMEMORY_HOT auto sfinae(Up& obj, int, int, Vp&& arg) const
441 -> decltype(obj.stack_pop(std::forward<Vp>(arg)), void())
442 {
443 obj.stack_pop(std::forward<Vp>(arg));
444 }
445
446 template <typename Up, typename Vp>
447 TIMEMORY_HOT auto sfinae(Up& obj, int, long, Vp&& arg) const
448 -> decltype(obj->stack_pop(std::forward<Vp>(arg)), void())
449 {
450 if(obj)
451 obj->stack_pop(std::forward<Vp>(arg));
452 }
453
454 template <typename Up, typename... Args>
455 TIMEMORY_INLINE void sfinae(Up&, long, long, Args&&...) const
456 {}
457};
458//
459//--------------------------------------------------------------------------------------//
460//
461/// \struct tim::operation::set_started
462/// \tparam T Component type
463///
464/// \brief This operation attempts to call a member function which the component provides
465/// to internally store whether or not it is currently within a phase measurement (to
466/// prevent restarts)
467template <typename T>
469{
470 TIMEMORY_DEFAULT_OBJECT(set_started)
471
472 template <typename Up>
473 TIMEMORY_HOT auto operator()(Up& obj) const
474 {
475 static_assert(!std::is_pointer<Up>::value,
476 "SFINAE tests will always fail with pointer types");
477 return sfinae(obj, 0);
478 }
479
480private:
481 template <typename Up>
482 static TIMEMORY_HOT auto sfinae(Up& obj, int) -> decltype(obj.set_started())
483 {
484 return obj.set_started();
485 }
486
487 template <typename Up>
488 static TIMEMORY_INLINE auto sfinae(Up&, long) -> void
489 {}
490};
491//
492//--------------------------------------------------------------------------------------//
493//
494/// \struct tim::operation::set_stopped
495/// \tparam T Component type
496///
497/// \brief This operation attempts to call a member function which the component provides
498/// to internally store whether or not it is currently within a phase measurement (to
499/// prevent stopping when it hasn't been started)
500template <typename T>
502{
503 TIMEMORY_DEFAULT_OBJECT(set_stopped)
504
505 template <typename Up>
506 TIMEMORY_HOT auto operator()(Up& obj) const
507 {
508 static_assert(!std::is_pointer<Up>::value,
509 "SFINAE tests will always fail with pointer types");
510 return sfinae(obj, 0);
511 }
512
513private:
514 template <typename Up>
515 static TIMEMORY_HOT auto sfinae(Up& obj, int) -> decltype(obj.set_stopped())
516 {
517 return obj.set_stopped();
518 }
519
520 template <typename Up>
521 static TIMEMORY_INLINE auto sfinae(Up&, long) -> void
522 {}
523};
524//
525//--------------------------------------------------------------------------------------//
526//
527/// \struct tim::operation::set_depth_change
528/// \tparam T Component type
529///
530/// \brief This operation attempts to call a member function which the component provides
531/// to internally store whether or not the component triggered a depth change when it
532/// was push to the call-stack or when it was popped from the call-stack
533template <typename T>
534struct set_depth_change;
535//
536//--------------------------------------------------------------------------------------//
537//
538/// \struct tim::operation::set_is_flat
539/// \tparam T Component type
540///
541/// \brief This operation attempts to call a member function which the component provides
542/// to internally store whether or not the component triggered a depth change when it
543/// was push to the call-stack or when it was popped from the call-stack
544template <typename T>
545struct set_is_flat;
546//
547//--------------------------------------------------------------------------------------//
548//
549/// \struct tim::operation::set_is_on_stack
550/// \tparam T Component type
551///
552/// \brief This operation attempts to call a member function which the component provides
553/// to internally store whether or not the component is referenced in persistent storage
554template <typename T>
555struct set_is_on_stack;
556//
557//--------------------------------------------------------------------------------------//
558//
559/// \struct tim::operation::set_is_invalid
560/// \tparam T Component type
561///
562/// \brief This operation attempts to call a member function which sets whether or not
563/// the component is in a valid state for data access and updates.
564template <typename T>
565struct set_is_invalid;
566//
567//--------------------------------------------------------------------------------------//
568//
569/// \struct tim::operation::set_is_running
570/// \tparam T Component type
571///
572/// \brief This operation attempts to call a member function which sets whether or not
573/// the component is currently collecting.
574template <typename T>
575struct set_is_running;
576//
577//--------------------------------------------------------------------------------------//
578//
579/// \struct tim::operation::set_iterator
580/// \tparam T Component type
581///
582/// \brief This operation attempts to call a member function which sets a pointer to
583/// a reference value in persistant storage.
584template <typename T>
585struct set_iterator;
586//
587//--------------------------------------------------------------------------------------//
588//
589/// \struct tim::operation::is_running
590/// \tparam T Component type
591/// \tparam DefaultValue The value to return if the member function is not provided
592///
593/// \brief This operation attempts to call a member function which provides whether or not
594/// the component currently within a phase measurement
595template <typename T, bool DefaultValue>
597{
598 TIMEMORY_DEFAULT_OBJECT(is_running)
599
600 template <typename Up>
601 TIMEMORY_HOT auto operator()(const Up& obj) const
602 {
603 static_assert(!std::is_pointer<Up>::value,
604 "SFINAE tests will always fail with pointer types");
605 return sfinae(obj, 0);
606 }
607
608private:
609 template <typename Up>
610 static auto sfinae(const Up& obj, int) -> decltype(obj.get_is_running())
611 {
612 return obj.get_is_running();
613 }
614
615 template <typename Up>
616 static auto sfinae(const Up& obj, long) -> decltype(obj.is_running())
617 {
618 return obj.is_running();
619 }
620
621 template <typename Up>
622 static auto sfinae(const Up&, ...) -> bool
623 {
624 return DefaultValue;
625 }
626};
627//
628//--------------------------------------------------------------------------------------//
629//
630/// \struct tim::operation::get_is_flat
631/// \tparam T Component type
632/// \tparam DefaultValue The value to return if the member function is not provided
633///
634/// \brief This operation attempts to call a member function which provides whether or not
635/// the component pushed to storage at a depth of zero.
636template <typename T, bool DefaultValue>
638{
639 TIMEMORY_DEFAULT_OBJECT(get_is_flat)
640
641 template <typename Up>
642 TIMEMORY_INLINE auto operator()(const Up& obj) const
643 {
644 static_assert(!std::is_pointer<Up>::value,
645 "SFINAE tests will always fail with pointer types");
646 return sfinae(obj, 0);
647 }
648
649private:
650 template <typename Up>
651 static auto sfinae(const Up& obj, int) -> decltype(obj.get_is_flat())
652 {
653 return obj.get_is_flat();
654 }
655
656 template <typename Up>
657 static auto sfinae(const Up&, ...) -> bool
658 {
659 return DefaultValue;
660 }
661};
662//
663//--------------------------------------------------------------------------------------//
664//
665/// \struct tim::operation::get_is_invalid
666/// \tparam T Component type
667/// \tparam DefaultValue The value to return if the member function is not provided
668///
669/// \brief This operation attempts to call a member function which provides whether or not
670/// the component is in a valid state for data access and updates.
671template <typename T, bool DefaultValue>
673{
674 TIMEMORY_DEFAULT_OBJECT(get_is_invalid)
675
676 template <typename Up>
677 TIMEMORY_INLINE auto operator()(const Up& obj) const
678 {
679 static_assert(!std::is_pointer<Up>::value,
680 "SFINAE tests will always fail with pointer types");
681 return sfinae(obj, 0);
682 }
683
684private:
685 template <typename Up>
686 static auto sfinae(const Up& obj, int) -> decltype(obj.get_is_invalid())
687 {
688 return obj.get_is_invalid();
689 }
690
691 template <typename Up>
692 static auto sfinae(const Up&, ...) -> bool
693 {
694 return DefaultValue;
695 }
696};
697//
698//--------------------------------------------------------------------------------------//
699//
700/// \struct tim::operation::get_is_on_stack
701/// \tparam T Component type
702/// \tparam DefaultValue The value to return if the member function is not provided
703///
704/// \brief This operation attempts to call a member function which provides whether or not
705/// the component is in a valid state for data access and updates.
706template <typename T, bool DefaultValue>
708{
709 TIMEMORY_DEFAULT_OBJECT(get_is_on_stack)
710
711 template <typename Up>
712 TIMEMORY_INLINE auto operator()(const Up& obj) const
713 {
714 static_assert(!std::is_pointer<Up>::value,
715 "SFINAE tests will always fail with pointer types");
716 return sfinae(obj, 0);
717 }
718
719private:
720 template <typename Up>
721 static auto sfinae(const Up& obj, int) -> decltype(obj.get_is_on_stack())
722 {
723 return obj.get_is_on_stack();
724 }
725
726 template <typename Up>
727 static auto sfinae(const Up&, ...) -> bool
728 {
729 return DefaultValue;
730 }
731};
732//
733//--------------------------------------------------------------------------------------//
734//
735/// \struct tim::operation::get_depth
736/// \tparam T Component type
737/// \tparam DefaultDepth value to return if get_depth() function not available
738///
739/// \brief This operation attempts to call a member function which provides a depth value.
740template <typename T, int64_t DefaultDepth = 0>
742{
743 TIMEMORY_DEFAULT_OBJECT(get_depth)
744
745 template <typename Up, enable_if_t<!std::is_pointer<decay_t<Up>>::value, int> = 0>
746 TIMEMORY_INLINE auto operator()(Up& obj) const
747 {
748 static_assert(!std::is_pointer<Up>::value,
749 "SFINAE tests will always fail with pointer types");
750 return sfinae(obj, 0, 0);
751 }
752
753 template <typename Up, enable_if_t<std::is_pointer<decay_t<Up>>::value, int> = 0>
754 TIMEMORY_INLINE auto operator()(Up obj) const
755 {
756 if(!obj)
757 return DefaultDepth;
758
759 return sfinae(*obj, 0, 0);
760 }
761
762private:
763 template <typename Up>
764 auto sfinae(Up& obj, int, int) const -> decltype(obj.get_depth())
765 {
766 return obj.get_depth();
767 }
768
769 template <typename Up>
770 auto sfinae(Up& obj, int, long) const -> decltype(obj.depth())
771 {
772 return obj.depth();
773 }
774
775 template <typename Up>
776 auto sfinae(Up&&, long, long) const
777 {
778 return DefaultDepth;
779 }
780};
781//
782//--------------------------------------------------------------------------------------//
783//
784/// \struct tim::operation::get_storage
785/// \tparam T Component type
786///
787/// \brief This operation attempts to call a member function which provides a pointer to
788/// the data storage structure for a component which should be updated for
789/// aggregation/logging.
790template <typename T>
792{
793 using type = T;
794
795 TIMEMORY_DEFAULT_OBJECT(get_storage)
796
797 TIMEMORY_INLINE auto operator()(type& obj) const
798 {
799 return static_cast<storage<type>*>(obj.get_storage());
800 }
801};
802//
803//--------------------------------------------------------------------------------------//
804//
805/// \struct tim::operation::get_iterator
806/// \tparam T Component type
807///
808/// \brief This operation attempts to call a member function which provides a pointer to
809/// a component which exists in storage.
810template <typename T>
812{
813 TIMEMORY_DEFAULT_OBJECT(get_iterator)
814
815 template <typename Up>
816 TIMEMORY_INLINE auto operator()(Up& obj) const
817 {
818 static_assert(!std::is_pointer<Up>::value,
819 "SFINAE tests will always fail with pointer types");
820 return sfinae(obj, 0);
821 }
822
823private:
824 template <typename Up>
825 static auto sfinae(Up& obj, int) -> decltype(obj.get_iterator())
826 {
827 return obj.get_iterator();
828 }
829
830 template <typename Up>
831 static auto sfinae(Up&&, ...) -> std::nullptr_t
832 {
833 return nullptr;
834 }
835};
836//
837//--------------------------------------------------------------------------------------//
838//
839template <typename T>
840struct start;
841//
842//--------------------------------------------------------------------------------------//
843//
844template <typename T>
845struct priority_start;
846//
847//--------------------------------------------------------------------------------------//
848//
849template <typename T>
850struct standard_start;
851//
852//--------------------------------------------------------------------------------------//
853//
854template <typename T>
855struct delayed_start;
856//
857//--------------------------------------------------------------------------------------//
858//
859template <typename T>
860struct stop;
861//
862//--------------------------------------------------------------------------------------//
863//
864template <typename T>
865struct priority_stop;
866//
867//--------------------------------------------------------------------------------------//
868//
869template <typename T>
870struct standard_stop;
871//
872//--------------------------------------------------------------------------------------//
873//
874template <typename T>
875struct delayed_stop;
876//
877//--------------------------------------------------------------------------------------//
878//
879template <typename T>
880struct mark;
881//
882//--------------------------------------------------------------------------------------//
883//
884template <typename T>
885struct mark_begin;
886//
887//--------------------------------------------------------------------------------------//
888//
889template <typename T>
890struct mark_end;
891//
892//--------------------------------------------------------------------------------------//
893//
894template <typename T>
895struct store;
896//
897//--------------------------------------------------------------------------------------//
898//
899template <typename T>
900struct audit;
901//
902//--------------------------------------------------------------------------------------//
903//
904template <typename T>
905struct plus;
906//
907//--------------------------------------------------------------------------------------//
908//
909template <typename T>
910struct minus;
911//
912//--------------------------------------------------------------------------------------//
913//
914template <typename T>
915struct multiply;
916//
917//--------------------------------------------------------------------------------------//
918//
919template <typename T>
920struct divide;
921//
922//--------------------------------------------------------------------------------------//
923//
924template <typename T>
925struct get;
926//
927//--------------------------------------------------------------------------------------//
928//
929template <typename T>
930struct get_data;
931//
932//--------------------------------------------------------------------------------------//
933//
934template <typename T>
935struct get_labeled_data;
936//
937//--------------------------------------------------------------------------------------//
938//
939template <typename T>
940struct base_printer;
941//
942//--------------------------------------------------------------------------------------//
943//
944template <typename T>
945struct print;
946//
947//--------------------------------------------------------------------------------------//
948//
949template <typename T>
950struct print_header;
951//
952//--------------------------------------------------------------------------------------//
953//
954template <typename T>
955struct print_statistics;
956//
957//--------------------------------------------------------------------------------------//
958//
959template <typename T>
960struct print_storage;
961//
962//--------------------------------------------------------------------------------------//
963//
964template <typename T>
965struct add_secondary;
966//
967//--------------------------------------------------------------------------------------//
968//
969template <typename T>
970struct add_statistics;
971//
972//--------------------------------------------------------------------------------------//
973//
974template <typename T>
975struct serialization;
976//
977//--------------------------------------------------------------------------------------//
978//
979template <typename T>
980struct extra_serialization;
981//
982//--------------------------------------------------------------------------------------//
983//
984template <typename T, bool Enabled = trait::echo_enabled<T>::value>
986//
987//--------------------------------------------------------------------------------------//
988//
989template <typename T>
990struct copy;
991//
992//--------------------------------------------------------------------------------------//
993//
994template <typename T>
995struct assemble;
996//
997//--------------------------------------------------------------------------------------//
998//
999template <typename T>
1000struct derive;
1001//
1002//--------------------------------------------------------------------------------------//
1003//
1004template <typename T>
1005struct generic_deleter;
1006//
1007//--------------------------------------------------------------------------------------//
1008//
1009template <typename T>
1010struct generic_counter;
1011//
1012//--------------------------------------------------------------------------------------//
1013//
1014template <typename T, typename Op, typename Tag = TIMEMORY_API>
1015struct generic_operator;
1016//
1017//--------------------------------------------------------------------------------------//
1018//
1019template <typename T>
1020struct cache;
1021//
1022//--------------------------------------------------------------------------------------//
1023//
1024template <typename T>
1025struct fini;
1026//
1027//--------------------------------------------------------------------------------------//
1028//
1029template <typename T>
1030struct cleanup;
1031//
1032//--------------------------------------------------------------------------------------//
1033//
1034template <typename Tag = TIMEMORY_API>
1035struct decode;
1036//
1037//--------------------------------------------------------------------------------------//
1038//
1039template <typename T>
1040struct dummy
1041{
1042 static_assert(std::is_default_constructible<T>::value,
1043 "Type is not default constructible and therefore a dummy object (for "
1044 "placeholders and meta-programming) cannot be automatically generated. "
1045 "Please specialize tim::operation::dummy<T> to provide operator()() "
1046 "which returns a dummy object.");
1047
1048 TIMEMORY_DEFAULT_OBJECT(dummy)
1049
1050 TIMEMORY_INLINE T operator()() const
1051 {
1052 T _v{};
1053 operation::set_is_invalid<T>{}(_v, true);
1054 return _v;
1055 }
1056};
1057//
1058//--------------------------------------------------------------------------------------//
1059//
1060template <typename T>
1061struct python_class_name;
1062//
1063//--------------------------------------------------------------------------------------//
1064//
1065namespace finalize
1066{
1067//
1068//--------------------------------------------------------------------------------------//
1069//
1070template <typename Type, bool has_data>
1071struct get;
1072//
1073//--------------------------------------------------------------------------------------//
1074//
1075template <typename Type, bool has_data>
1076struct mpi_get;
1077//
1078//--------------------------------------------------------------------------------------//
1079//
1080template <typename Type, bool has_data>
1081struct upc_get;
1082//
1083//--------------------------------------------------------------------------------------//
1084//
1085template <typename Type, bool has_data>
1086struct dmp_get;
1087//
1088//--------------------------------------------------------------------------------------//
1089//
1090template <typename Type, bool has_data>
1091struct print;
1092//
1093//--------------------------------------------------------------------------------------//
1094//
1095template <typename Type, bool has_data>
1096struct merge;
1097//
1098//--------------------------------------------------------------------------------------//
1099//
1100template <typename Type>
1101struct merge<Type, true>
1102{
1103 static constexpr bool has_data = true;
1104 using storage_type = impl::storage<Type, has_data>;
1105 using singleton_t = typename storage_type::singleton_type;
1106 using graph_t = typename storage_type::graph_type;
1107 using result_type = typename storage_type::result_array_t;
1108
1109 template <typename Tp>
1110 using vector_t = std::vector<Tp>;
1111
1112 TIMEMORY_DEFAULT_OBJECT(merge)
1113
1114 TIMEMORY_COLD merge(storage_type& lhs, storage_type& rhs);
1115 TIMEMORY_COLD merge(result_type& lhs, result_type& rhs);
1116
1117 // unary
1118 template <typename Tp>
1119 TIMEMORY_COLD basic_tree<Tp> operator()(const basic_tree<Tp>& _bt);
1120
1121 template <typename Tp>
1123 const vector_t<basic_tree<Tp>>& _bt);
1124
1125 template <typename Tp>
1127 const vector_t<vector_t<basic_tree<Tp>>>& _bt, size_t _root = 0);
1128
1129 // binary
1130 template <typename Tp>
1131 TIMEMORY_COLD basic_tree<Tp> operator()(const basic_tree<Tp>&, const basic_tree<Tp>&);
1132
1133 template <typename Tp>
1135 const vector_t<basic_tree<Tp>>&);
1136};
1137//
1138//--------------------------------------------------------------------------------------//
1139//
1140template <typename Type>
1141struct merge<Type, false>
1142{
1143 static constexpr bool has_data = false;
1144 using storage_type = impl::storage<Type, has_data>;
1145 using singleton_t = typename storage_type::singleton_type;
1146 using graph_t = typename storage_type::graph_type;
1147 using result_type = typename storage_type::result_array_t;
1148
1149 merge(storage_type& lhs, storage_type& rhs);
1151};
1152//
1153//--------------------------------------------------------------------------------------//
1154//
1155template <typename Type>
1156struct flamegraph;
1157//
1158//--------------------------------------------------------------------------------------//
1159//
1160template <typename Type>
1161struct ctest_notes;
1162//
1163//--------------------------------------------------------------------------------------//
1164//
1165namespace base
1166{
1167//
1168//--------------------------------------------------------------------------------------//
1169//
1170struct print
1171{
1173 using stream_type = std::shared_ptr<utility::stream>;
1174 using settings_t = std::shared_ptr<settings>;
1175
1176 explicit TIMEMORY_COLD print(bool _forced_json = false,
1178 : m_settings(std::move(_settings))
1179 , json_forced(_forced_json)
1180 {
1181 if(m_settings)
1182 {
1183 debug = m_settings->get_debug();
1184 verbose = m_settings->get_verbose();
1185 max_call_stack = m_settings->get_max_depth();
1186 }
1187 }
1188
1189 TIMEMORY_COLD print(std::string _label, bool _forced_json,
1191 : m_settings(std::move(_settings))
1192 , json_forced(_forced_json)
1193 , label(std::move(_label))
1194 {
1195 if(m_settings)
1196 {
1197 debug = m_settings->get_debug();
1198 verbose = m_settings->get_verbose();
1199 max_call_stack = m_settings->get_max_depth();
1200 }
1201 }
1202
1203 TIMEMORY_COLD virtual ~print() = default;
1204
1205 TIMEMORY_COLD virtual void setup() = 0;
1206 TIMEMORY_COLD virtual void execute() = 0;
1207 TIMEMORY_COLD virtual void read_json() = 0;
1208 TIMEMORY_COLD virtual void print_dart() = 0;
1209 TIMEMORY_COLD virtual void update_data() = 0;
1210 TIMEMORY_COLD virtual void print_custom() = 0;
1211
1212 TIMEMORY_COLD virtual void write(std::ostream& os, stream_type stream);
1213 TIMEMORY_COLD virtual void print_cout(stream_type stream);
1214 TIMEMORY_COLD virtual void print_text(const std::string& fname, stream_type stream);
1215 TIMEMORY_COLD virtual void print_plot(const std::string& fname, std::string suffix);
1216
1217 TIMEMORY_COLD auto get_label() const { return label; }
1218 TIMEMORY_COLD auto get_text_output_name() const { return text_outfname; }
1219 TIMEMORY_COLD auto get_tree_output_name() const { return tree_outfname; }
1220 TIMEMORY_COLD auto get_json_output_name() const { return json_outfname; }
1221 TIMEMORY_COLD auto get_json_input_name() const { return json_inpfname; }
1222 TIMEMORY_COLD auto get_text_diff_name() const { return text_diffname; }
1223 TIMEMORY_COLD auto get_json_diff_name() const { return json_diffname; }
1224
1225 TIMEMORY_COLD void set_debug(bool v) { debug = v; }
1226 TIMEMORY_COLD void set_update(bool v) { update = v; }
1227 TIMEMORY_COLD void set_verbose(int32_t v) { verbose = v; }
1228 TIMEMORY_COLD void set_max_call_stack(int64_t v) { max_call_stack = v; }
1229
1230 TIMEMORY_COLD int64_t get_max_depth() const
1231 {
1232 return (max_depth > 0)
1233 ? max_depth
1234 : std::min<int64_t>(max_call_stack, m_settings->get_max_depth());
1235 }
1236
1237 TIMEMORY_COLD bool dart_output()
1238 {
1239 if(!m_settings)
1240 {
1241 PRINT_HERE("%s", "Null pointer to settings! Disabling");
1242 return false;
1243 }
1244 return m_settings->get_dart_output();
1245 }
1246 TIMEMORY_COLD bool file_output()
1247 {
1248 if(!m_settings)
1249 {
1250 PRINT_HERE("%s", "Null pointer to settings! Disabling");
1251 return false;
1252 }
1253 return m_settings->get_file_output();
1254 }
1255 TIMEMORY_COLD bool cout_output()
1256 {
1257 if(!m_settings)
1258 {
1259 PRINT_HERE("%s", "Null pointer to settings! Disabling");
1260 return false;
1261 }
1262 return m_settings->get_cout_output();
1263 }
1264 TIMEMORY_COLD bool tree_output()
1265 {
1266 if(!m_settings)
1267 {
1268 PRINT_HERE("%s", "Null pointer to settings! Disabling");
1269 return false;
1270 }
1271 return (m_settings->get_tree_output() || json_forced) &&
1272 m_settings->get_file_output();
1273 }
1274 TIMEMORY_COLD bool json_output()
1275 {
1276 if(!m_settings)
1277 {
1278 PRINT_HERE("%s", "Null pointer to settings! Disabling");
1279 return false;
1280 }
1281 return (m_settings->get_json_output() || json_forced) &&
1282 m_settings->get_file_output();
1283 }
1284 TIMEMORY_COLD bool text_output()
1285 {
1286 if(!m_settings)
1287 {
1288 PRINT_HERE("%s", "Null pointer to settings! Disabling");
1289 return false;
1290 }
1291 return m_settings->get_text_output() && m_settings->get_file_output();
1292 }
1293 TIMEMORY_COLD bool plot_output()
1294 {
1295 if(!m_settings)
1296 {
1297 PRINT_HERE("%s", "Null pointer to settings! Disabling");
1298 return false;
1299 }
1300 return m_settings->get_plot_output() && m_settings->get_json_output() &&
1301 m_settings->get_file_output();
1302 }
1303 TIMEMORY_COLD bool flame_output()
1304 {
1305 if(!m_settings)
1306 {
1307 PRINT_HERE("%s", "Null pointer to settings! Disabling");
1308 return false;
1309 }
1310 return m_settings->get_flamegraph_output() && m_settings->get_file_output();
1311 }
1312
1313protected:
1314 // do not lint misc-non-private-member-variables-in-classes
1316 bool debug = false; // NOLINT
1317 bool update = true; // NOLINT
1318 bool json_forced = false; // NOLINT
1319 bool node_init = dmp::is_initialized(); // NOLINT
1320 int32_t node_rank = dmp::rank(); // NOLINT
1321 int32_t node_size = dmp::size(); // NOLINT
1322 int32_t verbose = 0; // NOLINT
1323 int64_t max_depth = 0; // NOLINT
1325 std::string label = ""; // NOLINT
1326 std::string description = ""; // NOLINT
1335};
1336//
1337//--------------------------------------------------------------------------------------//
1338//
1339} // namespace base
1340//
1341//--------------------------------------------------------------------------------------//
1342//
1343template <typename Tp>
1344struct print<Tp, true> : public base::print
1345{
1346 static constexpr bool has_data = true;
1349 using type = Tp;
1350 using storage_type = impl::storage<Tp, has_data>;
1351 using result_type = typename storage_type::dmp_result_t;
1352 using result_node = typename storage_type::result_node;
1353 using graph_type = typename storage_type::graph_t;
1354 using graph_node = typename storage_type::graph_node;
1355 using hierarchy_type = std::vector<uint64_t>;
1356 using callback_type = std::function<void(this_type*)>;
1357 using stream_type = std::shared_ptr<utility::stream>;
1359 using basic_tree_vector_type = std::vector<basic_tree_type>;
1360 using result_tree = std::map<std::string, std::vector<basic_tree_vector_type>>;
1361
1363 {
1364 static callback_type _instance = [](this_type*) {};
1365 return _instance;
1366 }
1367
1368 explicit TIMEMORY_COLD print(
1369 storage_type* _data, const settings_t& _settings = settings::shared_instance());
1370
1371 print(const std::string& _label, storage_type* _data,
1373 : base_type(_label, trait::requires_json<Tp>::value, _settings)
1374 , data(_data)
1375 {}
1376
1377 ~print() override = default;
1378
1379 TIMEMORY_COLD void execute() override
1380 {
1381 if(!data)
1382 return;
1383
1384 if(update)
1385 {
1386 update_data();
1387 }
1388 else
1389 {
1390 setup();
1391 }
1392
1393 if(node_init && node_rank > 0)
1394 return;
1395
1396 if(file_output())
1397 {
1398 if(json_output())
1399 print_json(json_outfname, node_results);
1400 if(tree_output())
1401 print_tree(tree_outfname, node_tree);
1402 if(text_output())
1403 print_text(text_outfname, data_stream);
1404 if(plot_output())
1405 print_plot(json_outfname, "");
1406 }
1407
1408 if(cout_output())
1409 {
1410 print_cout(data_stream);
1411 }
1412 else
1413 {
1414 printf("\n");
1415 }
1416
1417 if(dart_output())
1418 print_dart();
1419
1420 if(!node_input.empty() && !node_delta.empty() && settings::diff_output())
1421 {
1422 if(file_output())
1423 {
1424 if(json_output())
1425 print_json(json_diffname, node_delta);
1426 if(text_output())
1427 print_text(text_diffname, diff_stream);
1428 if(plot_output())
1429 {
1430 std::stringstream ss;
1431 ss << "Difference vs. " << json_inpfname;
1432 print_plot(json_diffname, ss.str());
1433 }
1434 }
1435
1436 if(cout_output())
1437 {
1438 print_cout(diff_stream);
1439 }
1440 else
1441 {
1442 printf("\n");
1443 }
1444 }
1445
1446 print_custom();
1447 }
1448
1449 TIMEMORY_COLD void update_data() override;
1450 TIMEMORY_COLD void setup() override;
1451 TIMEMORY_COLD void read_json() override;
1452
1453 TIMEMORY_COLD void print_dart() override;
1454 TIMEMORY_COLD void print_custom() override
1455 {
1456 try
1457 {
1458 callback(this);
1459 } catch(std::exception& e)
1460 {
1461 fprintf(stderr, "Exception: %s\n", e.what());
1462 }
1463 }
1464 TIMEMORY_COLD virtual void print_tree(const std::string& fname, result_tree& rt);
1465
1466 TIMEMORY_COLD void write_stream(stream_type& stream, result_type& results);
1467 TIMEMORY_COLD void print_json(const std::string& fname, result_type& results);
1468 TIMEMORY_COLD const auto& get_data() const { return data; }
1469 TIMEMORY_COLD const auto& get_node_results() const { return node_results; }
1470 TIMEMORY_COLD const auto& get_node_input() const { return node_input; }
1471 TIMEMORY_COLD const auto& get_node_delta() const { return node_delta; }
1472
1473 TIMEMORY_COLD std::vector<result_node*> get_flattened(result_type& results)
1474 {
1475 std::vector<result_node*> flat;
1476 for(auto& ritr : results)
1477 {
1478 for(auto& itr : ritr)
1479 {
1480 flat.push_back(&itr);
1481 }
1482 }
1483 return flat;
1484 }
1485
1486protected:
1487 // do not lint misc-non-private-member-variables-in-classes
1488 storage_type* data = nullptr; // NOLINT
1489 callback_type callback = get_default_callback(); // NOLINT
1490 result_type node_results = {}; // NOLINT
1491 result_type node_input = {}; // NOLINT
1492 result_type node_delta = {}; // NOLINT
1493 result_tree node_tree = {}; // NOLINT
1494};
1495//
1496//--------------------------------------------------------------------------------------//
1497//
1498template <typename Tp>
1500{
1501 template <typename... Args>
1502 print(Args&&...)
1503 {}
1504};
1505//
1506//--------------------------------------------------------------------------------------//
1507//
1508} // namespace finalize
1509//
1510//--------------------------------------------------------------------------------------//
1511//
1512template <typename T>
1514//
1515//--------------------------------------------------------------------------------------//
1516//
1517} // namespace operation
1518} // namespace tim
STL namespace.
::tim::statistics< Tp > max(::tim::statistics< Tp > lhs, const Tp &rhs)
Definition: statistics.hpp:320
return false
Definition: definition.hpp:326
void mark_begin(TupleT< Tp... > &obj, Args &&... args)
Definition: functional.cpp:492
void audit(TupleT< Tp... > &obj, Args &&... args)
Definition: functional.cpp:939
void store(TupleT< Tp... > &obj, Args &&... args)
Definition: functional.cpp:564
void record(TupleT< Tp... > &obj, Args &&... args)
Definition: functional.cpp:634
void stop(TupleT< Tp... > &obj, Args &&... args)
Definition: functional.cpp:386
void mark_end(TupleT< Tp... > &obj, Args &&... args)
Definition: functional.cpp:528
void mark(TupleT< Tp... > &obj, Args &&... args)
Definition: functional.cpp:457
void print(std::ostream &os, Args &&... args)
Definition: functional.cpp:159
void start(TupleT< Tp... > &obj, Args &&... args)
Definition: functional.cpp:316
Tp & plus(Tp &, const Up &)
Definition: plus.hpp:106
auto divide(Tp &_lhs, Up _rhs, type_list<>,...) -> decltype(_lhs/=_rhs, void())
Definition: divide.hpp:43
Tp & minus(Tp &, const Up &)
Definition: minus.hpp:98
Tp & multiply(Tp &, const Up &)
Definition: multiply.hpp:140
typename has_data< U >::type has_data_t
Definition: types.hpp:245
typename is_enabled< U >::type is_enabled_t
Definition: types.hpp:160
decltype(internal::resolve_record_type< U >(0)) resolve_record_type()
Definition: types.hpp:187
std::integral_constant< int, ModeV > mode_constant
Definition: types.hpp:240
This operation class echoes DartMeasurements for a CDash dashboard.
Definition: types.hpp:985
data::stream stream
Definition: stream.hpp:982
Definition: kokkosp.cpp:39
diff_output
Definition: settings.cpp:1630
add_secondary
Definition: settings.cpp:1677
tree_output
Definition: settings.cpp:1626
text_output
Definition: settings.cpp:1624
json_output
Definition: settings.cpp:1625
char argparse::argument_parser tim::settings * _settings
Definition: config.cpp:255
file_output
Definition: settings.cpp:1623
tim::mpl::apply< std::string > string
Definition: macros.hpp:53
dart_output
Definition: settings.cpp:1627
const std::string std::ostream * os
void finalize()
Definition: types.hpp:119
auto get(const auto_bundle< Tag, Types... > &_obj)
cout_output
Definition: settings.cpp:1622
ctest_notes
Definition: settings.cpp:1633
Tuple< std::remove_pointer_t< Tp >... > type
Definition: types.hpp:74
typename remove_pointers< Tp >::type remove_pointers_t
Definition: types.hpp:78
plot_output
Definition: settings.cpp:1629
Include the macros for operations.
Declare the storage types.
Basic hierarchical tree implementation. Expects population from tim::graph.
Definition: basic_tree.hpp:44
concept that specifies that a type is not a useful type
Definition: concepts.hpp:159
This data type is used when rendering the hierarchical representation (i.e. requires recursion) repre...
Definition: node.hpp:323
typename mpl::function_traits< decltype(&resolve_record_type< T >)>::result_type type
Definition: types.hpp:198
static constexpr bool value
Definition: types.hpp:199
This class executes a cleanup routine at the end of the application.
Definition: cleanup.hpp:47
The purpose of this operation class is operating on two components to compose a result,...
Definition: compose.hpp:53
The purpose of this operation class is construct an object with specific args.
Definition: construct.hpp:52
This operation class is used for copying the object generically.
Definition: copy.hpp:55
This class post-processes strings for a given API.
Definition: decode.hpp:49
static constexpr bool value
Definition: types.hpp:222
static constexpr bool value
Definition: types.hpp:153
std::shared_ptr< settings > settings_t
Definition: types.hpp:1174
print(std::string _label, bool _forced_json, settings_t _settings=settings::shared_instance())
Definition: types.hpp:1189
virtual void print_cout(stream_type stream)
std::shared_ptr< utility::stream > stream_type
Definition: types.hpp:1173
virtual void print_plot(const std::string &fname, std::string suffix)
virtual void write(std::ostream &os, stream_type stream)
print(bool _forced_json=false, settings_t _settings=settings::shared_instance())
Definition: types.hpp:1176
virtual void print_text(const std::string &fname, stream_type stream)
merge(result_type &, const result_type &)
Definition: types.hpp:1150
typename storage_type::graph_type graph_t
Definition: types.hpp:1146
typename storage_type::result_array_t result_type
Definition: types.hpp:1147
impl::storage< Type, has_data > storage_type
Definition: types.hpp:1144
typename storage_type::singleton_type singleton_t
Definition: types.hpp:1145
typename storage_type::graph_type graph_t
Definition: types.hpp:1106
vector_t< basic_tree< Tp > > operator()(const vector_t< basic_tree< Tp > > &, const vector_t< basic_tree< Tp > > &)
vector_t< basic_tree< Tp > > operator()(const vector_t< vector_t< basic_tree< Tp > > > &_bt, size_t _root=0)
typename storage_type::result_array_t result_type
Definition: types.hpp:1107
vector_t< basic_tree< Tp > > operator()(const vector_t< basic_tree< Tp > > &_bt)
impl::storage< Type, has_data > storage_type
Definition: types.hpp:1104
typename storage_type::singleton_type singleton_t
Definition: types.hpp:1105
std::vector< uint64_t > hierarchy_type
Definition: types.hpp:1355
std::vector< basic_tree_type > basic_tree_vector_type
Definition: types.hpp:1359
impl::storage< Tp, has_data > storage_type
Definition: types.hpp:1350
print(const std::string &_label, storage_type *_data, const settings_t &_settings=settings::shared_instance())
Definition: types.hpp:1371
typename storage_type::dmp_result_t result_type
Definition: types.hpp:1351
std::function< void(this_type *)> callback_type
Definition: types.hpp:1356
std::vector< result_node * > get_flattened(result_type &results)
Definition: types.hpp:1473
typename storage_type::graph_node graph_node
Definition: types.hpp:1354
std::map< std::string, std::vector< basic_tree_vector_type > > result_tree
Definition: types.hpp:1360
typename storage_type::graph_t graph_type
Definition: types.hpp:1353
typename storage_type::result_node result_node
Definition: types.hpp:1352
static callback_type & get_default_callback()
Definition: types.hpp:1362
This operation class is used for invoking the static initializer and thread-local initializer of a co...
Definition: fini.hpp:53
This operation class is similar to pointer_operator but can handle non-pointer types.
Definition: generic.hpp:55
This operation attempts to call a member function which provides a depth value.
Definition: types.hpp:742
auto operator()(Up obj) const
Definition: types.hpp:754
auto operator()(Up &obj) const
Definition: types.hpp:746
This operation attempts to call a member function which provides whether or not the component pushed ...
Definition: types.hpp:638
auto operator()(const Up &obj) const
Definition: types.hpp:642
This operation attempts to call a member function which provides whether or not the component is in a...
Definition: types.hpp:673
auto operator()(const Up &obj) const
Definition: types.hpp:677
This operation attempts to call a member function which provides whether or not the component is in a...
Definition: types.hpp:708
auto operator()(const Up &obj) const
Definition: types.hpp:712
This operation attempts to call a member function which provides a pointer to a component which exist...
Definition: types.hpp:812
auto operator()(Up &obj) const
Definition: types.hpp:816
This operation attempts to call a member function which provides a pointer to the data storage struct...
Definition: types.hpp:792
This operation class is used for invoking the static initializer and thread-local initializer of a co...
Definition: init.hpp:51
auto operator()(Up &obj, Args &&... args) const
Definition: types.hpp:330
typename Up::value_type Vp
Definition: types.hpp:143
static constexpr bool value
Definition: types.hpp:144
This operation attempts to call a member function which provides whether or not the component current...
Definition: types.hpp:597
auto operator()(const Up &obj) const
Definition: types.hpp:601
This operation class is used for a single measurement for a component.
Definition: measure.hpp:52
This operation class is used for sampling.
Definition: sample.hpp:52
This operation attempts to call a member function which the component provides to internally store wh...
Definition: types.hpp:534
This operation attempts to call a member function which sets whether or not the component is in a val...
Definition: types.hpp:555
This operation attempts to call a member function which the component provides to internally store wh...
Definition: types.hpp:545
This operation attempts to call a member function which sets whether or not the component is currentl...
Definition: types.hpp:565
This operation attempts to call a member function which sets a pointer to a reference value in persis...
Definition: types.hpp:575
Call the set_prefix member function. These instantiations are always inlined because of the use of st...
Definition: set.hpp:59
This operation attempts to call a member function which the component provides to internally store wh...
Definition: types.hpp:469
auto operator()(Up &obj) const
Definition: types.hpp:473
This operation attempts to call a member function which the component provides to internally store wh...
Definition: types.hpp:502
auto operator()(Up &obj) const
Definition: types.hpp:506
void operator()(Up &obj, Vp &&arg) const
Definition: types.hpp:431
void operator()(Up &obj, Vp &&arg) const
Definition: types.hpp:367
static constexpr bool value
Definition: types.hpp:211
static pointer_t shared_instance()
trait that signifies that an implementation for the component is available. When this is set to false...
Definition: types.hpp:355
trait that signifies the component will calculate min/max/stddev
This trait is used to determine whether the (expensive) instantiation of the storage class happens.
#define PRINT_HERE(...)
Definition: macros.hpp:152
#define TSTAG(X)
\macro TSTAG
Definition: types.hpp:45
type_list
Definition: types.hpp:211