From 5392007a249644475da6cbb92de87502d982fc0d Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Mon, 16 Apr 2012 14:19:22 +0200 Subject: [PATCH] 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 --- src/search.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) { -- 2.39.2