From: Joost VandeVondele Date: Wed, 15 May 2019 08:35:58 +0000 (+0200) Subject: Make rootDepth local to search. (#2077) X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=44c320a572188b5875291103edb344c584b91d19 Make rootDepth local to search. (#2077) passed STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 61869 W: 13668 L: 13626 D: 34575 http://tests.stockfishchess.org/tests/view/5ca660eb0ebc5925cf004f0c No functional change. --- diff --git a/src/search.cpp b/src/search.cpp index 0e9674a0..b31157e4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -283,7 +283,7 @@ void Thread::search() { Move pv[MAX_PLY+1]; Value bestValue, alpha, beta, delta; Move lastBestMove = MOVE_NONE; - Depth lastBestMoveDepth = DEPTH_ZERO; + Depth lastBestMoveDepth = DEPTH_ZERO, rootDepth = DEPTH_ZERO; MainThread* mainThread = (this == Threads.main() ? Threads.main() : nullptr); double timeReduction = 1, totBestMoveChanges = 0; Color us = rootPos.side_to_move(); diff --git a/src/thread.cpp b/src/thread.cpp index 2f1237a3..d360ad31 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -192,7 +192,7 @@ void ThreadPool::start_thinking(Position& pos, StateListPtr& states, for (Thread* th : *this) { th->nodes = th->tbHits = th->nmpMinPly = 0; - th->rootDepth = th->completedDepth = DEPTH_ZERO; + th->completedDepth = DEPTH_ZERO; th->rootMoves = rootMoves; th->rootPos.set(pos.fen(), pos.is_chess960(), &setupStates->back(), th); } diff --git a/src/thread.h b/src/thread.h index 7a27aab1..fb11344c 100644 --- a/src/thread.h +++ b/src/thread.h @@ -67,7 +67,7 @@ public: Position rootPos; Search::RootMoves rootMoves; - Depth rootDepth, completedDepth; + Depth completedDepth; CounterMoveHistory counterMoves; ButterflyHistory mainHistory; CapturePieceToHistory captureHistory;