mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Remove AdjacentFiles
This is a non-functional simplification that removes the AdjacentFiles array. This array is simple enough to calculate that the pre-calculated array provides no benefit. Reduces the memory footprint. STC LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 74839 W: 16390 L: 16373 D: 42076 http://tests.stockfishchess.org/tests/view/5c3d75920ebc596a450cfb67 No functionnal change
This commit is contained in:
committed by
Stéphane Nicolet
parent
3732c55c18
commit
3300517ecb
@@ -65,7 +65,6 @@ extern int SquareDistance[SQUARE_NB][SQUARE_NB];
|
||||
extern Bitboard SquareBB[SQUARE_NB];
|
||||
extern Bitboard FileBB[FILE_NB];
|
||||
extern Bitboard RankBB[RANK_NB];
|
||||
extern Bitboard AdjacentFilesBB[FILE_NB];
|
||||
extern Bitboard ForwardRanksBB[COLOR_NB][RANK_NB];
|
||||
extern Bitboard BetweenBB[SQUARE_NB][SQUARE_NB];
|
||||
extern Bitboard LineBB[SQUARE_NB][SQUARE_NB];
|
||||
@@ -195,7 +194,7 @@ constexpr Bitboard double_pawn_attacks_bb(Bitboard b) {
|
||||
/// adjacent files of the given one.
|
||||
|
||||
inline Bitboard adjacent_files_bb(File f) {
|
||||
return AdjacentFilesBB[f];
|
||||
return shift<EAST>(FileBB[f]) | shift<WEST>(FileBB[f]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user