Skip to content

Commit

Permalink
Improved cutoff check when reparenting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mcostalba committed Apr 16, 2012
1 parent f59323b commit 5392007
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/search.cpp
Expand Up @@ -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))
{
Expand All @@ -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))
{
Expand Down

0 comments on commit 5392007

Please sign in to comment.