mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
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.
This commit is contained in:
committed by
Marco Costalba
parent
4fcd78bd06
commit
44c320a572
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
Position rootPos;
|
||||
Search::RootMoves rootMoves;
|
||||
Depth rootDepth, completedDepth;
|
||||
Depth completedDepth;
|
||||
CounterMoveHistory counterMoves;
|
||||
ButterflyHistory mainHistory;
|
||||
CapturePieceToHistory captureHistory;
|
||||
|
||||
Reference in New Issue
Block a user