Skip to content

Commit 0df1baa

Browse files
committed
Separate antichess tablebase encoding constants official-stockfish#511
No functional change
1 parent 3a35731 commit 0df1baa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/syzygy/tbprobe.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ int Binomial[6][SQUARE_NB]; // [k][n] k elements from a set of n elements
462462
int LeadPawnIdx[5][SQUARE_NB]; // [leadPawnsCnt][SQUARE_NB]
463463
int LeadPawnsSize[5][4]; // [leadPawnsCnt][FILE_A..FILE_D]
464464

465+
#if defined(ATOMIC) || defined(ANTI)
465466
const int Triangle[SQUARE_NB] = {
466467
6, 0, 1, 2, 2, 1, 0, 6,
467468
0, 7, 3, 4, 4, 3, 7, 0,
@@ -571,6 +572,7 @@ const Bitboard Test45 = 0x1030700000000ULL; // A5-C5-A7 triangle
571572
const int InvTriangle[] = { 1, 2, 3, 10, 11, 19, 0, 9, 18, 27 };
572573
int MultIdx[5][10];
573574
int MultFactor[5];
575+
#endif
574576

575577
enum { BigEndian, LittleEndian };
576578

@@ -2085,6 +2087,7 @@ void Tablebases::init(const std::string& paths, Variant variant) {
20852087
Binomial[k][n] = (k > 0 ? Binomial[k - 1][n - 1] : 0)
20862088
+ (k < n ? Binomial[k ][n - 1] : 0);
20872089

2090+
#if defined(ATOMIC) || defined(ANTI)
20882091
// For antichess (with less than two unique pieces).
20892092
for (int i = 0; i < 5; i++) {
20902093
int s = 0;
@@ -2094,6 +2097,7 @@ void Tablebases::init(const std::string& paths, Variant variant) {
20942097
}
20952098
MultFactor[i] = s;
20962099
}
2100+
#endif
20972101

20982102
// MapPawns[s] encodes squares a2-h7 to 0..47. This is the number of possible
20992103
// available squares when the leading one is in 's'. Moreover the pawn with

0 commit comments

Comments
 (0)