Skip to content

Commit

Permalink
Merge pull request #125 from nsmlzl/pr_correct_thread_cnt
Browse files Browse the repository at this point in the history
Set number of threads for ips4o::parallel::sort
  • Loading branch information
ekg authored Oct 10, 2024
2 parents 75e807c + 56e43ac commit 0eb6468
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transclosure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 0eb6468

Please sign in to comment.