Make rootDepth local to search. (#2077)
authorJoost VandeVondele <Joost.VandeVondele@gmail.com>
Wed, 15 May 2019 08:35:58 +0000 (10:35 +0200)
committerMarco Costalba <mcostalba@users.noreply.github.com>
Wed, 15 May 2019 08:35:58 +0000 (10:35 +0200)
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.

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

index 0e9674a05cc6bad59c7f4089edf8ac3f73301dab..b31157e4406c3755f6789da25df8fd13c556e215 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;
+  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();
index 2f1237a3b0c6b5b02b27636d9c3d78d02f31c84d..d360ad318325921e8e76f83f153caf3190c559fc 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->rootDepth = th->completedDepth = DEPTH_ZERO;
+      th->completedDepth = DEPTH_ZERO;
       th->rootMoves = rootMoves;
       th->rootPos.set(pos.fen(), pos.is_chess960(), &setupStates->back(), th);
   }
index 7a27aab1f91cad3b1ef8bc8d2495a86481b8c476..fb11344c26e5111c37d65398e903840ce21a24c6 100644 (file)
@@ -67,7 +67,7 @@ public:
 
   Position rootPos;
   Search::RootMoves rootMoves;
-  Depth rootDepth, completedDepth;
+  Depth completedDepth;
   CounterMoveHistory counterMoves;
   ButterflyHistory mainHistory;
   CapturePieceToHistory captureHistory;