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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/*
DDS, a bridge double dummy solver.
Copyright (C) 2006-2014 by Bo Haglund /
2014-2018 by Bo Haglund & Soren Hein.
See LICENSE and README.
*/
/*
A number of debug flags cause output files to be generated.
One file per thread is generated.
Some example statistics on what to expect for a single
hand, single-threaded, with about 207,000 AB nodes and
about 63,000 trick nodes, called in solve mode such that
a total of 11 calls to the AB optimization are performed.
The clock "ticks" are for that debugging mode only, with
all the other ones turned off, unless otherwise noted.
The data is of course approximate. (Of course nothing
gets faster with debugging.)
Mode Clock "ticks" File size in KB
No debugging 66 --
DDS_TOP_LEVEL 63 8
DDS_AB_STATS 71 36
+ DDS_AB_DETAILS 75 64
DDS_AB_HITS 680 8624 (stored)
12004 (retrieved)
DDS_TT_STATS (*) 68 8
DDS_TIMING 125 8
+ DDS_TIMING_DETAILS 130 28
All together 720 --
(*) This depends on the stat functions called in TransTable.
Here only the summary functions are called by default.
For comparison, the old DDS functions, which only work
single-threaded, yields three files stat.txt, storett.txt
and rectt.txt.
145124 56 (stat)
6940 (store)
7732 (rectt)
So the speed-up is a factor of 200.
*/
// If you want ALL the output files, this is easier
// #define DDS_DEBUG_ALL
// Enables data about each call to the top-level AB routine.
// #define DDS_TOP_LEVEL
// Enables AB statistics, node counts etc.
// #define DDS_AB_STATS
// Gives more detail, in combination with DDS_AB_STATS.
// #define DDS_AB_DETAILS
// Gives information on nodes stored and retrieved from TT memory.
// #define DDS_AB_HITS
// Gives statistics on the usage of TT memory.
// #define DDS_TT_STATS
// Enables timing of the AB search and related functions.
// Makes an attempt to calculate exclusive times of functions.
// #define DDS_TIMING
// Enables statistics on move generation quality.
// #define DDS_MOVES
// Enables timing in the scheduler.
// #define DDS_SCHEDULER
// This debugging feature only works with Microsoft's compiler.
// In fact, it doesn't seem to do anything right now :-).
// #define DDS_MEMORY_LEAKS
extern long long counter;