SeqAn3 3.3.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// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2022, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2022, Knut Reinert & MPI für molekulare Genetik
4// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6// -----------------------------------------------------------------------------------------------------
7
14#pragma once
15
16#include <optional>
17
19
20namespace seqan3::detail
21{
30template <typename wrapped_config_id_t>
32{
33public:
37 parallel_mode() = default;
38 parallel_mode(parallel_mode const &) = default;
40 parallel_mode & operator=(parallel_mode const &) = default;
42 ~parallel_mode() = default;
43
47 explicit parallel_mode(uint32_t thread_count_) noexcept : thread_count{thread_count_}
48 {}
50
53
57 static constexpr typename wrapped_config_id_t::value_type id{wrapped_config_id_t::value};
58};
59} // namespace seqan3::detail
A global configuration type used to enable parallel execution of algorithms.
Definition: configuration_element_parallel_mode.hpp:32
~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:47
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:52
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:29
Provides seqan3::pipeable_config_element.
Adds pipe interface to configuration elements.
Definition: pipeable_config_element.hpp:32