Documentation 6b54b78464
Loading...
Searching...
No Matches
tracy_structure.hpp
Go to the documentation of this file.
1/*!
2 * \file tracy_structure.hpp
3 * \brief Tracy profiler interface header.
4 * Provides compatibility macros if the code is built without
5 * tracy support. Profiling macros are defined here so that
6 * they can be completely "disabled" when compiling without tracy.
7 * \note Do not include tracy headers explicitly anywhere, use this header instead.
8 * \note To enable tracy, define the TRACY_ENABLE macro during compilation.
9 * \version 8.5.0 "Harrier"
10 *
11 * SU2 Project Website: https://su2code.github.io
12 *
13 * The SU2 Project is maintained by the SU2 Foundation
14 * (http://su2foundation.org)
15 *
16 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
17 *
18 * SU2 is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU Lesser General Public
20 * License as published by the Free Software Foundation; either
21 * version 2.1 of the License, or (at your option) any later version.
22 *
23 * SU2 is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 * Lesser General Public License for more details.
27 *
28 * You should have received a copy of the GNU Lesser General Public
29 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
30 */
31
32#pragma once
33
34#ifdef TRACY_ENABLE
35#include "tracy/Tracy.hpp"
36#define SU2_ZONE_SCOPED ZoneScoped;
37#define SU2_ZONE_SCOPED_N(name) ZoneScopedN(name);
38#else
39#define SU2_ZONE_SCOPED
40#define SU2_ZONE_SCOPED_N(name)
41#endif
42
43#define BEGIN_SU2_ZONE_N(name) \
44 { \
45 SU2_ZONE_SCOPED_N(name)
46#define END_SU2_ZONE }