SeqAn3
3.4.0
The Modern C++ library for sequence analysis.
Toggle main menu visibility
Loading...
Searching...
No Matches
execution_handler_sequential.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
2
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
3
// SPDX-License-Identifier: BSD-3-Clause
4
9
10
#pragma once
11
12
#include <concepts>
13
#include <ranges>
14
15
#include <
seqan3/core/platform.hpp
>
16
17
namespace
seqan3::detail
18
{
19
30
struct
execution_handler_sequential
31
{
32
public
:
42
template
<
typename
algorithm_t,
typename
algorithm_input_t,
typename
callback_t>
43
requires
std::invocable<algorithm_t, algorithm_input_t, callback_t>
44
void
execute(algorithm_t && algorithm, algorithm_input_t && input, callback_t && callback)
45
{
46
algorithm(
std::forward<algorithm_input_t>
(input),
std::forward<callback_t>
(callback));
47
}
48
63
template
<std::copy_constructible algorithm_t,
64
std::ranges::input_range algorithm_input_range_t,
65
std::copy_constructible callback_t>
66
requires
std::invocable<algorithm_t, std::ranges::range_reference_t<algorithm_input_range_t>, callback_t>
67
void
bulk_execute(algorithm_t && algorithm, algorithm_input_range_t && input_range, callback_t && callback)
68
{
69
for
(
auto
&& input : input_range)
70
execute(algorithm,
std::forward
<
decltype
(input)>(input), callback);
71
72
wait();
73
}
74
76
void
wait() noexcept
77
{
78
// noop
79
}
80
};
81
82
}
// namespace seqan3::detail
std::forward
T forward(T... args)
platform.hpp
Provides platform and dependency checks.
Hide me
Version:
seqan3
core
algorithm
detail
execution_handler_sequential.hpp
Generated on
for SeqAn3 by
1.17.0