Skip to content

Commit

Permalink
Merge pull request #10 from eseiler/fix/less_filehandles
Browse files Browse the repository at this point in the history
[FIX] Reduce number of concurrently open files
  • Loading branch information
eseiler authored Oct 12, 2020
2 parents c01c996 + 49c23f2 commit 6f2a0cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 1.0.1

## Bug fixes

* Reduced the number of open file handles ([\#10](https://github.com/seqan/raptor/pull/10))
9 changes: 4 additions & 5 deletions src/raptor_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ struct ibf_builder
{
using sequence_file_t = seqan3::sequence_file_input<dna4_traits, seqan3::fields<seqan3::field::seq>>;

std::vector<sequence_file_t> technical_bins;
technical_bins.reserve(arguments->bins);

for (size_t i = 0; i < arguments->bins; ++i)
technical_bins.emplace_back(arguments->bin_path[i]);
auto technical_bins = std::views::iota(0u, arguments->bins)
| std::views::transform( [&] (auto const i) {
return sequence_file_t{arguments->bin_path[i]};
});

seqan3::ibf_config cfg{seqan3::bin_count{arguments->bins},
seqan3::bin_size{arguments->bits / arguments->parts},
Expand Down

0 comments on commit 6f2a0cc

Please sign in to comment.