X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmovepick.h;h=dc171c9ff5ba45143e66d5207f4fd9286e3b0a8b;hb=38aa70adcfa767387da91c8df1180fb11ad89ac7;hp=f210f5387fcb222bb8a0728e4a9e413a2a7b583b;hpb=347d613b0e2c47f90cbf1c5a5affe97303f1ac3d;p=stockfish diff --git a/src/movepick.h b/src/movepick.h index f210f538..dc171c9f 100644 --- a/src/movepick.h +++ b/src/movepick.h @@ -32,7 +32,10 @@ namespace Stockfish { -constexpr int PAWN_HISTORY_SIZE = 512; +constexpr int PAWN_HISTORY_SIZE = 512; // has to be a power of 2 + +static_assert((PAWN_HISTORY_SIZE & (PAWN_HISTORY_SIZE - 1)) == 0, + "PAWN_HISTORY_SIZE has to be a power of 2"); inline int pawn_structure(const Position& pos) { return pos.pawn_key() & (PAWN_HISTORY_SIZE - 1); }