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