GADGET-4
timer.h
Go to the documentation of this file.
1/*******************************************************************************
2 * \copyright This file is part of the GADGET4 N-body/SPH code developed
3 * \copyright by Volker Springel. Copyright (C) 2014-2020 by Volker Springel
4 * \copyright (vspringel@mpa-garching.mpg.de) and all contributing authors.
5 *******************************************************************************/
6
16#if defined(TIMER_ENUM) || defined(TIMER_STRUCT)
17
29#if defined(TIMER_ENUM)
30
31#define TIMER_CREATE(name, desc, parent, symba, symbb) name,
32
33#else
34
35#define TIMER_CREATE(name, desc, par, symba, symbb) \
36 Timer_data[name].parent = par; \
37 strcpy(Timer_data[name].shortname, #name); \
38 strcpy(Timer_data[name].longname, (desc)); \
39 Timer_data[name].symb = (symba); \
40 Timer_data[name].symbImbal = (symbb);
41#endif
42
43/*add your counter here, they must appear in the right order*/
44
45TIMER_CREATE(CPU_ALL, "total", CPU_ROOT, 0, 0)
46TIMER_CREATE(CPU_TREE, "treegrav", CPU_ALL, 0, 0)
47TIMER_CREATE(CPU_TREEBUILD, "treebuild", CPU_TREE, 0, 0)
48TIMER_CREATE(CPU_TREEBUILD_INSERT, "insert", CPU_TREEBUILD, ':', 'r')
49TIMER_CREATE(CPU_TREEBUILD_BRANCHES, "branches", CPU_TREEBUILD, 'D', 'd')
50TIMER_CREATE(CPU_TREEBUILD_TOPLEVEL, "toplevel", CPU_TREEBUILD, 'E', 'e')
51TIMER_CREATE(CPU_TREEFORCE, "treeforce", CPU_TREE, 0, 0)
52TIMER_CREATE(CPU_TREEWALK, "treewalk", CPU_TREEFORCE, '*', 't')
53TIMER_CREATE(CPU_TREEIMBALANCE, "treeimbalance", CPU_TREEFORCE, 'x', 'X')
54TIMER_CREATE(CPU_TREEFETCH, "treefetch", CPU_TREEFORCE, '&', 'e')
55TIMER_CREATE(CPU_TREESTACK, "treestack", CPU_TREEFORCE, '#', 'a')
56#ifdef ALLOW_DIRECT_SUMMATION
57TIMER_CREATE(CPU_TREEDIRECT, "treedirect", CPU_TREE, 'r', '2')
58#endif
59#ifdef PMGRID
60TIMER_CREATE(CPU_PM_GRAVITY, "pm_grav", CPU_ALL, '|', 'n')
61#endif
62TIMER_CREATE(CPU_NGBTREEUPDATEVEL, "ngbtreevelupdate", CPU_ALL, 'B', 'b')
63TIMER_CREATE(CPU_NGBTREEUPDATEMAXHSML, "ngbtreehsmlupdate", CPU_ALL, 'h', 'H')
64TIMER_CREATE(CPU_SPH, "sph", CPU_ALL, 0, 0)
65TIMER_CREATE(CPU_DENSITY, "density", CPU_SPH, 'd', 'D')
66TIMER_CREATE(CPU_DENSWALK, "densitywalk", CPU_DENSITY, 'e', 'E')
67TIMER_CREATE(CPU_DENSFETCH, "densityfetch", CPU_DENSITY, 'f', 'F')
68TIMER_CREATE(CPU_DENSIMBALANCE, "densimbalance", CPU_DENSITY, 'c', 'C')
69TIMER_CREATE(CPU_HYDRO, "hydro", CPU_SPH, 'J', 'j')
70TIMER_CREATE(CPU_HYDROWALK, "hydrowalk", CPU_HYDRO, '9', 'H')
71TIMER_CREATE(CPU_HYDROFETCH, "hydrofetch", CPU_HYDRO, '0', 'K')
72TIMER_CREATE(CPU_HYDROIMBALANCE, "hydroimbalance", CPU_HYDRO, '[', 'y')
73TIMER_CREATE(CPU_DOMAIN, "domain", CPU_ALL, '+', 'l')
74TIMER_CREATE(CPU_PEANO, "peano", CPU_ALL, '"', 'o')
75TIMER_CREATE(CPU_DRIFTS, "drift/kicks", CPU_ALL, '?', 'A')
76TIMER_CREATE(CPU_TIMELINE, "timeline", CPU_ALL, ')', 'I')
77TIMER_CREATE(CPU_TREE_TIMESTEPS, "treetimesteps", CPU_ALL, '0', 'W')
78TIMER_CREATE(CPU_SNAPSHOT, "i/o", CPU_ALL, '3', 'B')
79TIMER_CREATE(CPU_LOGS, "logs", CPU_ALL, 'K', 'k')
80#if defined(COOLING) || defined(STARFORMATION)
81TIMER_CREATE(CPU_COOLING_SFR, "sfrcool", CPU_ALL, '1', 'T')
82#endif
83#ifdef FOF
84TIMER_CREATE(CPU_FOF, "fof", CPU_ALL, '5', 'D')
85TIMER_CREATE(CPU_FOFWALK, "fofwalk", CPU_FOF, '6', 'G')
86TIMER_CREATE(CPU_FOFIMBAL, "fofimbal", CPU_FOF, '7', 'H')
87#endif
88#ifdef SUBFIND
89TIMER_CREATE(CPU_SUBFIND, "subfind", CPU_ALL, '6', 'E')
90#endif
91#ifdef NGENIC
92TIMER_CREATE(CPU_NGENIC, "ngenic", CPU_ALL, 'n', 'N')
93#endif
94TIMER_CREATE(CPU_RESTART, "restart", CPU_ALL, 'C', 'c')
95#ifdef FORCETEST
96TIMER_CREATE(CPU_FORCETEST, "forcetest", CPU_ALL, 't', 'T')
97#endif
98TIMER_CREATE(CPU_MISC, "misc", CPU_ALL, '7', 'F')
99TIMER_CREATE(CPU_LAST, "LAST", CPU_NONE, ' ', ' ')
101#undef TIMER_CREATE
102
103#endif
Definition: domain.h:31
Definition: logs.h:28
Definition: sph.h:21
#define X