File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -746,6 +746,10 @@ void cmaple::Tree::doPlacementTemplate(const int num_threads, std::ostream& out_
746746
747747 // sequentially seek placement (again from the found placement if found or from the root) and place the sample
748748 const size_t current_chunk_size = parallel_search ? chunk_size : 1 ;
749+ // update the threshold to stop the search earlier if starting from placements found from the parallel search
750+ const int bk_failure_limit_sample = params->failure_limit_sample ;
751+ if (parallel_search)
752+ params->failure_limit_sample = 2 ;
749753 for (size_t j = 0 ; j < current_chunk_size; ++j)
750754 {
751755 // increase i and move the sequence pointer
@@ -847,6 +851,10 @@ void cmaple::Tree::doPlacementTemplate(const int num_threads, std::ostream& out_
847851 }
848852 }
849853 }
854+
855+ // restore the threshold for pleacement search, if it has been changed
856+ if (parallel_search)
857+ params->failure_limit_sample = bk_failure_limit_sample;
850858 }
851859
852860 // flag denotes whether there is any new nodes added
You can’t perform that action at this time.
0 commit comments