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.
extern.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/components/user_bundle/extern.hpp
27 * \brief Include the extern declarations for user_bundle components
28 */
29
30#pragma once
31
47
48#if defined(TIMEMORY_USER_BUNDLE_SOURCE)
51#endif
52
53#if defined(TIMEMORY_USER_BUNDLE_SOURCE)
54//
55//--------------------------------------------------------------------------------------//
56//
57# if !defined(TIMEMORY_EXTERN_USER_BUNDLE_OPERATIONS)
58# define TIMEMORY_EXTERN_USER_BUNDLE_OPERATIONS(NAME, VAL) \
59 TIMEMORY_INSTANTIATE_EXTERN_OPERATIONS(NAME, VAL)
60# endif
61//
62# if !defined(TIMEMORY_EXTERN_USER_BUNDLE_STORAGE)
63# define TIMEMORY_EXTERN_USER_BUNDLE_STORAGE(...) \
64 TIMEMORY_INSTANTIATE_EXTERN_STORAGE(__VA_ARGS__)
65# endif
66//
67# if !defined(TIMEMORY_EXTERN_USER_BUNDLE_TEMPLATE)
68# define TIMEMORY_EXTERN_USER_BUNDLE_TEMPLATE(...) template __VA_ARGS__;
69# endif
70//
71//--------------------------------------------------------------------------------------//
72//
73#elif defined(TIMEMORY_USE_USER_BUNDLE_EXTERN)
74//
75//--------------------------------------------------------------------------------------//
76//
77# if !defined(TIMEMORY_EXTERN_USER_BUNDLE_OPERATIONS)
78# define TIMEMORY_EXTERN_USER_BUNDLE_OPERATIONS(NAME, VAL) \
79 TIMEMORY_DECLARE_EXTERN_OPERATIONS(NAME, VAL)
80# endif
81//
82# if !defined(TIMEMORY_EXTERN_USER_BUNDLE_STORAGE)
83# define TIMEMORY_EXTERN_USER_BUNDLE_STORAGE(...) \
84 TIMEMORY_DECLARE_EXTERN_STORAGE(__VA_ARGS__)
85# endif
86//
87# if !defined(TIMEMORY_EXTERN_USER_BUNDLE_TEMPLATE)
88# define TIMEMORY_EXTERN_USER_BUNDLE_TEMPLATE(...) extern template __VA_ARGS__;
89# endif
90//
91//--------------------------------------------------------------------------------------//
92//
93#else
94//
95//--------------------------------------------------------------------------------------//
96//
97# if !defined(TIMEMORY_EXTERN_USER_BUNDLE_OPERATIONS)
98# define TIMEMORY_EXTERN_USER_BUNDLE_OPERATIONS(...)
99# endif
100//
101# if !defined(TIMEMORY_EXTERN_USER_BUNDLE_STORAGE)
102# define TIMEMORY_EXTERN_USER_BUNDLE_STORAGE(...)
103# endif
104//
105# if !defined(TIMEMORY_EXTERN_USER_BUNDLE_TEMPLATE)
106# define TIMEMORY_EXTERN_USER_BUNDLE_TEMPLATE(...)
107# endif
108#endif
109
110#if !defined(TIMEMORY_EXTERN_USER_BUNDLE)
111# define TIMEMORY_EXTERN_USER_BUNDLE(NAME) \
112 TIMEMORY_EXTERN_USER_BUNDLE_TEMPLATE( \
113 struct tim::component::base<TIMEMORY_ESC(tim::component::NAME), void>) \
114 TIMEMORY_EXTERN_USER_BUNDLE_OPERATIONS(TIMEMORY_ESC(component::NAME), false) \
115 TIMEMORY_EXTERN_USER_BUNDLE_STORAGE(TIMEMORY_ESC(component::NAME))
116#endif
117
118TIMEMORY_EXTERN_USER_BUNDLE(user_global_bundle)
119TIMEMORY_EXTERN_USER_BUNDLE(user_ompt_bundle)
120TIMEMORY_EXTERN_USER_BUNDLE(user_mpip_bundle)
121TIMEMORY_EXTERN_USER_BUNDLE(user_ncclp_bundle)
122TIMEMORY_EXTERN_USER_BUNDLE(user_trace_bundle)
123TIMEMORY_EXTERN_USER_BUNDLE(user_profiler_bundle)
124TIMEMORY_EXTERN_USER_BUNDLE(user_kokkosp_bundle)
125
126#if defined(TIMEMORY_USE_USER_BUNDLE_EXTERN)
127namespace tim
128{
129namespace component
130{
131extern template struct user_bundle<global_bundle_idx, project::timemory>;
132extern template struct user_bundle<ompt_bundle_idx, project::timemory>;
133extern template struct user_bundle<mpip_bundle_idx, project::timemory>;
134extern template struct user_bundle<ncclp_bundle_idx, project::timemory>;
135extern template struct user_bundle<trace_bundle_idx, project::timemory>;
136extern template struct user_bundle<profiler_bundle_idx, project::timemory>;
137extern template struct user_bundle<kokkosp_bundle_idx, project::kokkosp>;
138} // namespace component
139} // namespace tim
140#endif
Implementation of the user_bundle component(s)
Forward declaration of user_bundle components. User-bundles are similar to the classical profiling in...
Definition: kokkosp.cpp:39
The definitions for the types in operations.
The declaration for the types for storage without definitions.