]> git.sesse.net Git - stockfish/commitdiff
Revert "Make rootDepth local to search. (#2077)"
authorMarco Costalba <mcostalba@gmail.com>
Wed, 15 May 2019 08:50:27 +0000 (10:50 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 15 May 2019 08:52:15 +0000 (10:52 +0200)
This reverts commit 44c320a572188b5875291103edb344c584b91d19.

Fix a compile error.

Bench: 3824325

src/search.cpp
src/thread.cpp
src/thread.h

index b31157e4406c3755f6789da25df8fd13c556e215..0e9674a05cc6bad59c7f4089edf8ac3f73301dab 100644 (file)
@@ -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();
index d360ad318325921e8e76f83f153caf3190c559fc..2f1237a3b0c6b5b02b27636d9c3d78d02f31c84d 100644 (file)
@@ -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);
   }
index 0866d55daa50110359dc74066719f0f4ce513d93..114769d2fa19a355ec0de44c7f75801534b59316 100644 (file)
@@ -66,7 +66,7 @@ public:
 
   Position rootPos;
   Search::RootMoves rootMoves;
-  Depth completedDepth;
+  Depth rootDepth, completedDepth;
   CounterMoveHistory counterMoves;
   ButterflyHistory mainHistory;
   CapturePieceToHistory captureHistory;