mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 07:36:23 +08:00
Move prefetch() out of TT
This code is platform specific and has nothing to do with TT class, so move to misc.cpp This patch is a prerequisite to use extend prefetch use also to other hash tables apart from Transposition Table. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -772,7 +772,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
|
||||
}
|
||||
|
||||
// Prefetch TT access as soon as we know key is updated
|
||||
TT.prefetch(key);
|
||||
prefetch((char*)TT.first_entry(key));
|
||||
|
||||
// Move the piece
|
||||
Bitboard move_bb = make_move_bb(from, to);
|
||||
@@ -1250,7 +1250,7 @@ void Position::do_null_move(StateInfo& backupSt) {
|
||||
st->key ^= zobEp[st->epSquare];
|
||||
|
||||
st->key ^= zobSideToMove;
|
||||
TT.prefetch(st->key);
|
||||
prefetch((char*)TT.first_entry(st->key));
|
||||
|
||||
sideToMove = opposite_color(sideToMove);
|
||||
st->epSquare = SQ_NONE;
|
||||
|
||||
Reference in New Issue
Block a user