mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Move node increment inside do_move function
Move node increment inside do_move function so that we can centralize the increment into a single point. closes https://github.com/official-stockfish/Stockfish/pull/5989 No functional change
This commit is contained in:
committed by
Disservin
parent
2b4926e091
commit
698c069bba
+1
-3
@@ -556,6 +556,7 @@ void Search::Worker::do_move(Position& pos, const Move move, StateInfo& st) {
|
||||
|
||||
void Search::Worker::do_move(Position& pos, const Move move, StateInfo& st, const bool givesCheck) {
|
||||
DirtyPiece dp = pos.do_move(move, st, givesCheck, &tt);
|
||||
nodes.fetch_add(1, std::memory_order_relaxed);
|
||||
accumulatorStack.push(dp);
|
||||
}
|
||||
|
||||
@@ -940,7 +941,6 @@ Value Search::Worker::search(
|
||||
movedPiece = pos.moved_piece(move);
|
||||
|
||||
do_move(pos, move, st);
|
||||
thisThread->nodes.fetch_add(1, std::memory_order_relaxed);
|
||||
|
||||
ss->currentMove = move;
|
||||
ss->isTTMove = (move == ttData.move);
|
||||
@@ -1193,7 +1193,6 @@ moves_loop: // When in check, search starts here
|
||||
|
||||
// Step 16. Make the move
|
||||
do_move(pos, move, st, givesCheck);
|
||||
thisThread->nodes.fetch_add(1, std::memory_order_relaxed);
|
||||
|
||||
// Add extension to new depth
|
||||
newDepth += extension;
|
||||
@@ -1711,7 +1710,6 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta)
|
||||
Piece movedPiece = pos.moved_piece(move);
|
||||
|
||||
do_move(pos, move, st, givesCheck);
|
||||
thisThread->nodes.fetch_add(1, std::memory_order_relaxed);
|
||||
|
||||
// Update the current move
|
||||
ss->currentMove = move;
|
||||
|
||||
Reference in New Issue
Block a user