mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Remove DistanceRing #2107
Remove the DistanceRing array. This reduces the memory footprint by about 4kb. http://tests.stockfishchess.org/tests/view/5cba35350ebc5925cf020d7f LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 101421 W: 22491 L: 22528 D: 56402 No functional change.
This commit is contained in:
committed by
Marco Costalba
parent
bdeb01dec0
commit
a858b5a84e
@@ -28,7 +28,6 @@ uint8_t PopCnt16[1 << 16];
|
||||
uint8_t SquareDistance[SQUARE_NB][SQUARE_NB];
|
||||
|
||||
Bitboard LineBB[SQUARE_NB][SQUARE_NB];
|
||||
Bitboard DistanceRingBB[SQUARE_NB][8];
|
||||
Bitboard PseudoAttacks[PIECE_TYPE_NB][SQUARE_NB];
|
||||
Bitboard PawnAttacks[COLOR_NB][SQUARE_NB];
|
||||
Bitboard SquareBB[SQUARE_NB];
|
||||
@@ -83,10 +82,7 @@ void Bitboards::init() {
|
||||
|
||||
for (Square s1 = SQ_A1; s1 <= SQ_H8; ++s1)
|
||||
for (Square s2 = SQ_A1; s2 <= SQ_H8; ++s2)
|
||||
{
|
||||
SquareDistance[s1][s2] = std::max(distance<File>(s1, s2), distance<Rank>(s1, s2));
|
||||
DistanceRingBB[s1][SquareDistance[s1][s2]] |= s2;
|
||||
}
|
||||
|
||||
int steps[][5] = { {}, { 7, 9 }, { 6, 10, 15, 17 }, {}, {}, {}, { 1, 7, 8, 9 } };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user