From: Marco Costalba Date: Wed, 15 May 2019 08:50:27 +0000 (+0200) Subject: Revert "Make rootDepth local to search. (#2077)" X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=02708a4a1153d59c058f8056bc31713322130392 Revert "Make rootDepth local to search. (#2077)" This reverts commit 44c320a572188b5875291103edb344c584b91d19. Fix a compile error. Bench: 3824325 --- diff --git a/src/search.cpp b/src/search.cpp index b31157e4..0e9674a0 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, rootDepth = DEPTH_ZERO; + Depth lastBestMoveDepth = 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 d360ad31..2f1237a3 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->completedDepth = DEPTH_ZERO; + th->rootDepth = 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 0866d55d..114769d2 100644 --- a/src/thread.h +++ b/src/thread.h @@ -66,7 +66,7 @@ public: Position rootPos; Search::RootMoves rootMoves; - Depth completedDepth; + Depth rootDepth, completedDepth; CounterMoveHistory counterMoves; ButterflyHistory mainHistory; CapturePieceToHistory captureHistory;