From: Marco Costalba Date: Mon, 16 Apr 2012 12:19:22 +0000 (+0200) Subject: Improved cutoff check when reparenting X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=5392007a249644475da6cbb92de87502d982fc0d;ds=sidebyside Improved cutoff check when reparenting Check for a cutoff occurred also high in the tree and not only at current split point. This avoids some more wasted reparenting. No functional chnage. Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index 08a157c2..61ac9a6a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1871,7 +1871,7 @@ void Thread::idle_loop(SplitPoint* sp_master) { // where we are available as a possible slave. if ( this->is_available_to(th) && spCnt > 0 - && !latest->cutoff + && !th->cutoff_occurred() && latest->slavesMask == latest->allSlavesMask && more_than_one(latest->allSlavesMask)) { @@ -1882,7 +1882,7 @@ void Thread::idle_loop(SplitPoint* sp_master) { // of a race storm here ! if ( this->is_available_to(th) && spCnt == th->splitPointsCnt - && !latest->cutoff + && !th->cutoff_occurred() && latest->slavesMask == latest->allSlavesMask && more_than_one(latest->allSlavesMask)) {