1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/*
DDS, a bridge double dummy solver.
Copyright (C) 2006-2014 by Bo Haglund /
2014-2018 by Bo Haglund & Soren Hein.
See LICENSE and README.
*/
/*
TimerList consists of a number of groups, one for each piece
of the code being timed (ab_search etc).
Each group corresponds to something that should be timed at
multiple AB depths, i.e. cards played. The first card of a
new game is number 48, and the last card is number 0.
The AB timer is special, as the AB functions are recursive
and so their timing includes not only the other functions they
contain, but also their own recursive calls at lower depths.
The AB timer group must be the first one.
The object calculates an approximation to exclusive function
times, so it is a "poor man's profiler".
For AB, first the times at depth-1 are subtracted out, and then
the times for all calls at the same depth are subtracted out.
This still leaves the overhead of the timing itself. As an
approximation, there is one timing overhead left for each
function, and it is on the order of the execution time of
Evaluate(), which is a very fast function.
TIMER_START and TIMER_END are macros for bracketing code
to be timed, so
TIMER_START(TIMER_NO_AB, depth);
ab_search(...);
TIMER_END(TIMER_NO_AB, depth);
This avoids the tedious #ifdef's at every place of a timer.
*/
;
/**
* @brief List of named timer groups for profiling bridge double dummy solver phases.
*
* The TimerList class manages multiple TimerGroup objects, each associated with
* a specific solver phase or operation. It provides interfaces for resetting,
* starting, ending, and reporting timing data for all phases. Used internally
* for comprehensive profiling and optimization.
*/
;