-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcompute_kmers.cpp
More file actions
34 lines (28 loc) · 1.24 KB
/
compute_kmers.cpp
File metadata and controls
34 lines (28 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// SPDX-FileCopyrightText: 2006-2024, Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2024, Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
/*!\file
* \brief Implements seqan::hibf::compute_kmers.
* \author Enrico Seiler <enrico.seiler AT fu-berlin.de>
*/
#include <cstdint> // for uint64_t
#include <functional> // for function
#include <hibf/build/build_data.hpp> // for build_data
#include <hibf/build/compute_kmers.hpp> // for compute_kmers
#include <hibf/config.hpp> // for insert_iterator, config
#include <hibf/contrib/robin_hood.hpp> // for unordered_flat_set
#include <hibf/layout/layout.hpp> // for layout
#include <hibf/misc/timer.hpp> // for serial_timer, concurrent_timer
namespace seqan::hibf::build
{
void compute_kmers(robin_hood::unordered_flat_set<uint64_t> & kmers,
build_data const & data,
layout::layout::user_bin const & record)
{
serial_timer local_user_bin_io_timer{};
local_user_bin_io_timer.start();
data.config.input_fn(record.idx, insert_iterator{kmers});
local_user_bin_io_timer.stop();
data.user_bin_io_timer += local_user_bin_io_timer;
}
} // namespace seqan::hibf::build