SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
configuration_element_parallel_mode.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
11#pragma once
12
13#include <optional>
14
16
17namespace seqan3::detail
18{
27template <typename wrapped_config_id_t>
29{
30public:
34 parallel_mode() = default;
35 parallel_mode(parallel_mode const &) = default;
37 parallel_mode & operator=(parallel_mode const &) = default;
39 ~parallel_mode() = default;
40
44 explicit parallel_mode(uint32_t thread_count_) noexcept : thread_count{thread_count_}
45 {}
47
50
54 static constexpr typename wrapped_config_id_t::value_type id{wrapped_config_id_t::value};
55};
56} // namespace seqan3::detail
A global configuration type used to enable parallel execution of algorithms.
Definition configuration_element_parallel_mode.hpp:29
~parallel_mode()=default
Defaulted.
parallel_mode(uint32_t thread_count_) noexcept
Sets the number of threads for the parallel configuration element.
Definition configuration_element_parallel_mode.hpp:44
parallel_mode(parallel_mode &&)=default
Defaulted.
std::optional< uint32_t > thread_count
The maximum number of threads the algorithm can use.
Definition configuration_element_parallel_mode.hpp:49
parallel_mode & operator=(parallel_mode &&)=default
Defaulted.
parallel_mode()=default
Defaulted.
parallel_mode(parallel_mode const &)=default
Defaulted.
parallel_mode & operator=(parallel_mode const &)=default
Defaulted.
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Provides seqan3::pipeable_config_element.
Adds pipe interface to configuration elements.
Definition pipeable_config_element.hpp:29
Hide me