]> git.sesse.net Git - stockfish/blobdiff - src/bitboard.h
Remove the now redundant TT prefetch call from Position::do_move.
[stockfish] / src / bitboard.h
index 3ff0408a61b16faab014965ed063af2c85124a0c..6a1755b662891b26051dad911b1c42bcf2c7de86 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef BITBOARD_H_INCLUDED
 #define BITBOARD_H_INCLUDED
 
+#include <string>
+
 #include "types.h"
 
 namespace Bitboards {
@@ -241,6 +243,9 @@ FORCE_INLINE unsigned magic_index(Square s, Bitboard occ) {
   Bitboard* const Magics = Pt == ROOK ? RMagics : BMagics;
   unsigned* const Shifts = Pt == ROOK ? RShifts : BShifts;
 
+  if (HasPext)
+      return unsigned(_pext_u64(occ, Masks[s]));
+
   if (Is64Bit)
       return unsigned(((occ & Masks[s]) * Magics[s]) >> Shifts[s]);