mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
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 <mcostalba@gmail.com>
This commit is contained in:
@@ -1871,7 +1871,7 @@ void Thread::idle_loop(SplitPoint* sp_master) {
|
|||||||
// where we are available as a possible slave.
|
// where we are available as a possible slave.
|
||||||
if ( this->is_available_to(th)
|
if ( this->is_available_to(th)
|
||||||
&& spCnt > 0
|
&& spCnt > 0
|
||||||
&& !latest->cutoff
|
&& !th->cutoff_occurred()
|
||||||
&& latest->slavesMask == latest->allSlavesMask
|
&& latest->slavesMask == latest->allSlavesMask
|
||||||
&& more_than_one(latest->allSlavesMask))
|
&& more_than_one(latest->allSlavesMask))
|
||||||
{
|
{
|
||||||
@@ -1882,7 +1882,7 @@ void Thread::idle_loop(SplitPoint* sp_master) {
|
|||||||
// of a race storm here !
|
// of a race storm here !
|
||||||
if ( this->is_available_to(th)
|
if ( this->is_available_to(th)
|
||||||
&& spCnt == th->splitPointsCnt
|
&& spCnt == th->splitPointsCnt
|
||||||
&& !latest->cutoff
|
&& !th->cutoff_occurred()
|
||||||
&& latest->slavesMask == latest->allSlavesMask
|
&& latest->slavesMask == latest->allSlavesMask
|
||||||
&& more_than_one(latest->allSlavesMask))
|
&& more_than_one(latest->allSlavesMask))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user