Loading...
Searching...
No Matches
execution_handler_sequential.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <concepts>
#include <ranges>
#include <seqan3/core/platform.hpp>
namespace seqan3::detail
{
struct execution_handler_sequential
{
public:
template <typename algorithm_t, typename algorithm_input_t, typename callback_t>
requires std::invocable<algorithm_t, algorithm_input_t, callback_t>
void execute(algorithm_t && algorithm, algorithm_input_t && input, callback_t && callback)
{
algorithm(std::forward<algorithm_input_t>(input), std::forward<callback_t>(callback));
}
template <std::copy_constructible algorithm_t,
std::ranges::input_range algorithm_input_range_t,
std::copy_constructible callback_t>
requires std::invocable<algorithm_t, std::ranges::range_reference_t<algorithm_input_range_t>, callback_t>
void bulk_execute(algorithm_t && algorithm, algorithm_input_range_t && input_range, callback_t && callback)
{
for (auto && input : input_range)
execute(algorithm, std::forward<decltype(input)>(input), callback);
wait();
}
void wait() noexcept
{
// noop
}
};
} // namespace seqan3::detail
std::forward
T forward(T... args)
platform.hpp
Provides platform and dependency checks.
Hide me