Skip to content

Commit

Permalink
Fixed issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbuchfink committed Jun 20, 2023
1 parent 03e7f4a commit 194e174
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/align/align.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,11 @@ void align_queries(Consumer* output_file, Search::Config& cfg)
log_stream << "Warning: resident size (" << (res_size + last_size) << ") exceeds memory limit." << std::endl;

timer.go("Sorting trace points");
#ifdef NDEBUG
ips4o::parallel::sort(hit_buf->begin(), hit_buf->end(), std::less<Search::Hit>(), config.threads_);
#else
std::sort(hit_buf->begin(), hit_buf->end());
#endif
statistics.inc(Statistics::TIME_SORT_SEED_HITS, timer.microseconds());

#ifndef OLD
Expand Down
2 changes: 1 addition & 1 deletion src/run/double_indexed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ static void run_query_iteration(const unsigned query_iteration,
if (!config.swipe_all && !config.target_indexed) {
timer.go("Building query histograms");
EnumCfg enum_cfg{ nullptr, 0, 0, options.seed_encoding, options.query_skip.get(), false, false, options.seed_complexity_cut,
options.soft_masking, options.minimizer_window, query_seeds_hashed.get(), false };
options.soft_masking, options.minimizer_window, (bool)query_seeds_hashed, false };
options.query->hst() = SeedHistogram(*options.query, false, &no_filter, enum_cfg);
timer.finish();
}
Expand Down
2 changes: 2 additions & 0 deletions src/search/seed_complexity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ bool Search::seed_is_complex(const Letter* seq, const Shape& shape, const double
count.fill(0);
for (int i = 0; i < shape.weight_; ++i) {
const Letter l = letter_mask(seq[shape.positions_[i]]);
if (l >= TRUE_AA)
return false;
++count[Reduction::reduction(l)];
}
double entropy = lnfact[shape.weight_];
Expand Down
4 changes: 2 additions & 2 deletions src/search/stage0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void search_shape(unsigned sid, int query_block, unsigned query_iteration, char
TaskTimer timer("Building reference seed array", true);
SeedArray *ref_idx;
const EnumCfg enum_ref{ &ref_hst.partition(), sid, sid + 1, cfg.seed_encoding, nullptr, false, false, cfg.seed_complexity_cut,
query_seeds_bitset.get() || query_seeds_hashed.get() ? MaskingAlgo::NONE : cfg.soft_masking,
query_seeds_bitset.get() || (bool)query_seeds_hashed ? MaskingAlgo::NONE : cfg.soft_masking,
cfg.minimizer_window, false, false };
if (query_seeds_bitset.get())
ref_idx = new SeedArray(*cfg.target, ref_hst.get(sid), range, ref_buffer, query_seeds_bitset.get(), enum_ref);
Expand All @@ -124,7 +124,7 @@ void search_shape(unsigned sid, int query_block, unsigned query_iteration, char
timer.go("Building query seed array");
SeedArray* query_idx;
EnumCfg enum_query{ target_seeds ? nullptr : &query_hst.partition(), sid, sid + 1, cfg.seed_encoding, cfg.query_skip.get(),
false, true, cfg.seed_complexity_cut, cfg.soft_masking, cfg.minimizer_window, query_seeds_hashed.get(), query_seeds_hashed.get() };
false, true, cfg.seed_complexity_cut, cfg.soft_masking, cfg.minimizer_window, (bool)query_seeds_hashed, (bool)query_seeds_hashed };
if (target_seeds)
query_idx = new SeedArray(*cfg.query, range, target_seeds, enum_query);
else
Expand Down

0 comments on commit 194e174

Please sign in to comment.