From 2a9ef435eb302f71c78ab487e9e2c8b1d3f8d96b Mon Sep 17 00:00:00 2001 From: Auriane R Date: Mon, 29 Aug 2022 14:58:24 +0200 Subject: [PATCH] Move manage_config in detail namespace --- .../command_line_handling.hpp | 2 +- .../src/command_line_handling.cpp | 20 +++++++++---------- .../util/include/pika/util/manage_config.hpp | 4 ++-- libs/pika/util/src/manage_config.cpp | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libs/pika/command_line_handling/include/pika/command_line_handling/command_line_handling.hpp b/libs/pika/command_line_handling/include/pika/command_line_handling/command_line_handling.hpp index 252e34e985..40f1f446f7 100644 --- a/libs/pika/command_line_handling/include/pika/command_line_handling/command_line_handling.hpp +++ b/libs/pika/command_line_handling/include/pika/command_line_handling/command_line_handling.hpp @@ -73,7 +73,7 @@ namespace pika::detail { void check_pu_offset() const; void check_pu_step() const; - bool handle_arguments(util::manage_config& cfgmap, + bool handle_arguments(detail::manage_config& cfgmap, pika::program_options::variables_map& vm, std::vector& ini_config); diff --git a/libs/pika/command_line_handling/src/command_line_handling.cpp b/libs/pika/command_line_handling/src/command_line_handling.cpp index c9bbdeb09d..3b4d130a9a 100644 --- a/libs/pika/command_line_handling/src/command_line_handling.cpp +++ b/libs/pika/command_line_handling/src/command_line_handling.cpp @@ -111,7 +111,7 @@ namespace pika::detail { return "file(" + dest + ")"; } - std::string handle_queuing(util::manage_config& cfgmap, + std::string handle_queuing(detail::manage_config& cfgmap, pika::program_options::variables_map& vm, std::string const& default_) { // command line options is used preferred @@ -122,7 +122,7 @@ namespace pika::detail { return cfgmap.get_value("pika.scheduler", default_); } - std::string handle_affinity(util::manage_config& cfgmap, + std::string handle_affinity(detail::manage_config& cfgmap, pika::program_options::variables_map& vm, std::string const& default_) { // command line options is used preferred @@ -133,7 +133,7 @@ namespace pika::detail { return cfgmap.get_value("pika.affinity", default_); } - std::string handle_affinity_bind(util::manage_config& cfgmap, + std::string handle_affinity_bind(detail::manage_config& cfgmap, pika::program_options::variables_map& vm, std::string const& default_) { // command line options is used preferred @@ -157,7 +157,7 @@ namespace pika::detail { return cfgmap.get_value("pika.bind", default_); } - std::size_t handle_pu_step(util::manage_config& cfgmap, + std::size_t handle_pu_step(detail::manage_config& cfgmap, pika::program_options::variables_map& vm, std::size_t default_) { // command line options is used preferred @@ -168,7 +168,7 @@ namespace pika::detail { return cfgmap.get_value("pika.pu_step", default_); } - std::size_t handle_pu_offset(util::manage_config& cfgmap, + std::size_t handle_pu_offset(detail::manage_config& cfgmap, pika::program_options::variables_map& vm, std::size_t default_) { // command line options is used preferred @@ -179,7 +179,7 @@ namespace pika::detail { return cfgmap.get_value("pika.pu_offset", default_); } - std::size_t handle_numa_sensitive(util::manage_config& cfgmap, + std::size_t handle_numa_sensitive(detail::manage_config& cfgmap, pika::program_options::variables_map& vm, std::size_t default_) { if (vm.count("pika:numa-sensitive") != 0) @@ -243,7 +243,7 @@ namespace pika::detail { } /////////////////////////////////////////////////////////////////////// - std::size_t handle_num_threads(util::manage_config& cfgmap, + std::size_t handle_num_threads(detail::manage_config& cfgmap, pika::util::runtime_configuration const& rtcfg, pika::program_options::variables_map& vm, bool use_process_mask) { @@ -344,7 +344,7 @@ namespace pika::detail { return threads; } - std::size_t handle_num_cores(util::manage_config& cfgmap, + std::size_t handle_num_cores(detail::manage_config& cfgmap, pika::program_options::variables_map& vm, std::size_t num_threads, bool use_process_mask) { @@ -437,7 +437,7 @@ namespace pika::detail { } /////////////////////////////////////////////////////////////////////////// - bool command_line_handling::handle_arguments(util::manage_config& cfgmap, + bool command_line_handling::handle_arguments(detail::manage_config& cfgmap, pika::program_options::variables_map& vm, std::vector& ini_config) { @@ -830,7 +830,7 @@ namespace pika::detail { // separate command line arguments from configuration settings std::vector args = preprocess_config_settings(argc, argv); - util::manage_config cfgmap(ini_config_); + detail::manage_config cfgmap(ini_config_); // insert the pre-configured ini settings before loading modules for (std::string const& e : ini_config_) diff --git a/libs/pika/util/include/pika/util/manage_config.hpp b/libs/pika/util/include/pika/util/manage_config.hpp index 12c90f73a8..4ab9fd98ad 100644 --- a/libs/pika/util/include/pika/util/manage_config.hpp +++ b/libs/pika/util/include/pika/util/manage_config.hpp @@ -15,7 +15,7 @@ #include -namespace pika { namespace util { +namespace pika::detail { struct PIKA_EXPORT manage_config { using map_type = std::map; @@ -35,6 +35,6 @@ namespace pika { namespace util { map_type config_; }; -}} // namespace pika::util +} // namespace pika::detail #include diff --git a/libs/pika/util/src/manage_config.cpp b/libs/pika/util/src/manage_config.cpp index 9d18b35a51..2345069df3 100644 --- a/libs/pika/util/src/manage_config.cpp +++ b/libs/pika/util/src/manage_config.cpp @@ -10,7 +10,7 @@ #include #include -namespace pika { namespace util { +namespace pika::detail { /////////////////////////////////////////////////////////////////////////// inline std::string trim_whitespace(std::string const& s) { @@ -43,4 +43,4 @@ namespace pika { namespace util { config_.insert(map_type::value_type(key, value)); } } -}} // namespace pika::util +} // namespace pika::detail