From 56e43ac10b8e1d3cbcf712e7ff7a3507e1500d3d Mon Sep 17 00:00:00 2001 From: Niklas Schmelzle Date: Thu, 10 Oct 2024 18:08:58 -0400 Subject: [PATCH] limit number of used threads --- src/transclosure.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/transclosure.cpp b/src/transclosure.cpp index ee955b9..f6b3558 100644 --- a/src/transclosure.cpp +++ b/src/transclosure.cpp @@ -534,7 +534,7 @@ size_t compute_transitive_closures( #ifdef DEBUG_TRANSCLOSURE if (show_progress) std::cerr << "[seqwish::transclosure] " << std::fixed << std::showpoint << std::setprecision(3) << seconds_since(start_time) << " " << std::setprecision(2) << (double)bases_seen / (double)seqidx.seq_length() * 100 << "% " << chunk_start << "-" << chunk_end << " dset_compression" << std::endl; #endif - ips4o::parallel::sort(dsets.begin(), dsets.end()); + ips4o::parallel::sort(dsets.begin(), dsets.end(), std::less<>(), num_threads); uint64_t c = 0; assert(dsets.size()); @@ -564,7 +564,7 @@ size_t compute_transitive_closures( uint64_t& minpos = dsets_by_min_pos[d.first].first; minpos = std::min(minpos, d.second); } - ips4o::parallel::sort(dsets_by_min_pos.begin(), dsets_by_min_pos.end()); + ips4o::parallel::sort(dsets_by_min_pos.begin(), dsets_by_min_pos.end(), std::less<>(), num_threads); /* for (auto& d : dsets_by_min_pos) { std::cerr << "sdset_min_pos\t" << d.second << "\t" << d.first << std::endl; @@ -583,7 +583,7 @@ size_t compute_transitive_closures( for (auto& d : dsets) { d.first = dset_names[d.first]; } - ips4o::parallel::sort(dsets.begin(), dsets.end()); + ips4o::parallel::sort(dsets.begin(), dsets.end(), std::less<>(), num_threads); /* for (auto& d : dsets) { std::cerr << "sdset_rename\t" << d.first << "\t" << pos_to_string(d.second) << std::endl;