mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Don't uselessy share rootDepth
It is not needed becuase the only case is a real special one (bench on depth with many threads) and can be easily rewritten to avoid sharing rootDepth. Verified with ThreadSanitizer. No functional change. Closes #1159
This commit is contained in:
parent
01b6cdb76b
commit
802fca6fdd
2 changed files with 3 additions and 3 deletions
|
@ -360,9 +360,9 @@ void Thread::search() {
|
|||
multiPV = std::min(multiPV, rootMoves.size());
|
||||
|
||||
// Iterative deepening loop until requested to stop or the target depth is reached
|
||||
while ( (rootDepth = rootDepth + ONE_PLY) < DEPTH_MAX
|
||||
while ( (rootDepth += ONE_PLY) < DEPTH_MAX
|
||||
&& !Signals.stop
|
||||
&& (!Limits.depth || Threads.main()->rootDepth / ONE_PLY <= Limits.depth))
|
||||
&& !(Limits.depth && mainThread && rootDepth / ONE_PLY > Limits.depth))
|
||||
{
|
||||
// Distribute search depths across the threads
|
||||
if (idx)
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
|
||||
Position rootPos;
|
||||
Search::RootMoves rootMoves;
|
||||
std::atomic<Depth> rootDepth;
|
||||
Depth rootDepth;
|
||||
Depth completedDepth;
|
||||
CounterMoveStat counterMoves;
|
||||
ButterflyHistory history;
|
||||
|
|
Loading…
Add table
Reference in a new issue