From 91554ceb72cac6e16d5837792fdad8218435fb10 Mon Sep 17 00:00:00 2001 From: rn5f107s2 Date: Mon, 17 Jul 2023 22:01:08 +0200 Subject: [PATCH] Removes a few Bitboards and functions that are not used --- src/bitboard.h | 30 ------------------------------ src/position.h | 1 - 2 files changed, 31 deletions(-) diff --git a/src/bitboard.h b/src/bitboard.h index d21d390b1fb..68f9735f4d8 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -32,7 +32,6 @@ std::string pretty(Bitboard b); } // namespace Stockfish::Bitboards -constexpr Bitboard AllSquares = ~Bitboard(0); constexpr Bitboard DarkSquares = 0xAA55AA55AA55AA55ULL; constexpr Bitboard FileABB = 0x0101010101010101ULL; @@ -53,17 +52,6 @@ constexpr Bitboard Rank6BB = Rank1BB << (8 * 5); constexpr Bitboard Rank7BB = Rank1BB << (8 * 6); constexpr Bitboard Rank8BB = Rank1BB << (8 * 7); -constexpr Bitboard QueenSide = FileABB | FileBBB | FileCBB | FileDBB; -constexpr Bitboard CenterFiles = FileCBB | FileDBB | FileEBB | FileFBB; -constexpr Bitboard KingSide = FileEBB | FileFBB | FileGBB | FileHBB; -constexpr Bitboard Center = (FileDBB | FileEBB) & (Rank4BB | Rank5BB); - -constexpr Bitboard KingFlank[FILE_NB] = { - QueenSide ^ FileDBB, QueenSide, QueenSide, - CenterFiles, CenterFiles, - KingSide, KingSide, KingSide ^ FileEBB -}; - extern uint8_t PopCnt16[1 << 16]; extern uint8_t SquareDistance[SQUARE_NB][SQUARE_NB]; @@ -178,16 +166,6 @@ inline Bitboard pawn_attacks_bb(Color c, Square s) { } -/// pawn_double_attacks_bb() returns the squares doubly attacked by pawns of the -/// given color from the squares in the given bitboard. - -template -constexpr Bitboard pawn_double_attacks_bb(Bitboard b) { - return C == WHITE ? shift(b) & shift(b) - : shift(b) & shift(b); -} - - /// adjacent_files_bb() returns a bitboard representing all the squares on the /// adjacent files of a given square. @@ -430,14 +408,6 @@ inline Square pop_lsb(Bitboard& b) { return s; } - -/// frontmost_sq() returns the most advanced square for the given color, -/// requires a non-zero bitboard. -inline Square frontmost_sq(Color c, Bitboard b) { - assert(b); - return c == WHITE ? msb(b) : lsb(b); -} - } // namespace Stockfish #endif // #ifndef BITBOARD_H_INCLUDED diff --git a/src/position.h b/src/position.h index e3917ede040..ce56086f292 100644 --- a/src/position.h +++ b/src/position.h @@ -149,7 +149,6 @@ class Position { Key key() const; Key key_after(Move m) const; Key material_key() const; - Key pawn_key() const; // Other properties of the position Color side_to_move() const;