SeqAn3 3.1.0
The Modern C++ library for sequence analysis.
configuration_element_parallel_mode.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2021, 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>
31class parallel_mode : private pipeable_config_element
32{
33public:
37 parallel_mode() = default;
38 parallel_mode(parallel_mode const &) = default;
39 parallel_mode(parallel_mode &&) = default;
40 parallel_mode & operator=(parallel_mode const &) = default;
41 parallel_mode & operator=(parallel_mode &&) = default;
42 ~parallel_mode() = default;
43
47 explicit parallel_mode(uint32_t thread_count_) noexcept : thread_count{thread_count_}
48 {}
50
52 std::optional<uint32_t> thread_count{std::nullopt};
53
57 static constexpr typename wrapped_config_id_t::value_type id{wrapped_config_id_t::value};
58};
59} // namespace seqan3::detail
Provides seqan3::pipeable_config_element.