runtime_configuration¶
The contents of this module can be included with the header
hpx/modules/runtime_configuration.hpp
. These headers may be used by user-code but are not
guaranteed stable (neither header location nor contents). You are using these at
your own risk. If you wish to use non-public functionality from a module we
strongly suggest only including the module header hpx/modules/runtime_configuration.hpp
, not
the particular header in which the functionality you would like to use is
defined. See Public API for a list of names that are part of the public
HPX API.
Header hpx/runtime_configuration/component_registry_base.hpp
¶
Defines
-
HPX_REGISTER_COMPONENT_REGISTRY
(RegistryType, componentname)¶ This macro is used to register the given component factory with Hpx.Plugin. This macro has to be used for each of the components.
-
HPX_REGISTER_COMPONENT_REGISTRY_DYNAMIC
(RegistryType, componentname)¶
-
HPX_REGISTER_REGISTRY_MODULE
()¶ This macro is used to define the required Hpx.Plugin entry points. This macro has to be used in exactly one compilation unit of a component module.
-
HPX_REGISTER_REGISTRY_MODULE_DYNAMIC
()¶
-
namespace
hpx
-
namespace
components
-
struct
component_registry_base
¶ - #include <component_registry_base.hpp>
The component_registry_base has to be used as a base class for all component registries.
Public Functions
-
virtual
~component_registry_base
()¶
-
virtual bool
get_component_info
(std::vector<std::string> &fillini, std::string const &filepath, bool is_static = false) = 0¶ Return the ini-information for all contained components.
- Return
Returns true if the parameter fillini has been successfully initialized with the registry data of all implemented in this module.
- Parameters
fillini
: [in, out] The module is expected to fill this vector with the ini-information (one line per vector element) for all components implemented in this module.
-
virtual void
register_component_type
() = 0¶ Return the unique identifier of the component type this factory is responsible for.
- Return
Returns the unique identifier of the component type this factory instance is responsible for. This function throws on any error.
- Parameters
locality
: [in] The id of the locality this factory is responsible for.agas_client
: [in] The AGAS client to use for component id registration (if needed).
-
virtual
-
struct
-
namespace
Header hpx/runtime_configuration/ini.hpp
¶
Defines
-
HPX_SECTION_VERSION
¶
-
namespace
hpx
-
namespace
util
-
class
section
¶ - #include <ini.hpp>
Subclassed by hpx::util::runtime_configuration
Public Types
-
typedef util::function_nonser<void(std::string const&, std::string const&)>
entry_changed_func
¶
-
typedef std::pair<std::string, entry_changed_func>
entry_type
¶
-
typedef std::map<std::string, entry_type>
entry_map
¶
Public Functions
-
section
()¶
-
~section
()¶
-
void
parse
(std::string const &sourcename, std::vector<std::string> const &lines, bool verify_existing = true, bool weed_out_comments = true, bool replace_existing = true)¶
-
void
parse
(std::string const &sourcename, std::string const &line, bool verify_existing = true, bool weed_out_comments = true, bool replace_existing = true)¶
-
section_map &
get_sections
()¶
-
section_map const &
get_sections
() const¶
-
void
add_entry
(std::string const &key, entry_type const &val)¶
-
void
add_notification_callback
(std::string const &key, entry_changed_func const &callback)¶
Protected Functions
Private Functions
-
void
add_section
(std::unique_lock<mutex_type> &l, std::string const &sec_name, section &sec, section *root = nullptr)¶
-
bool
has_section
(std::unique_lock<mutex_type> &l, std::string const &sec_name) const¶
-
section *
get_section
(std::unique_lock<mutex_type> &l, std::string const &sec_name)¶
-
section const *
get_section
(std::unique_lock<mutex_type> &l, std::string const &sec_name) const¶
-
section *
add_section_if_new
(std::unique_lock<mutex_type> &l, std::string const &sec_name)¶
-
void
add_entry
(std::unique_lock<mutex_type> &l, std::string const &fullkey, std::string const &key, std::string val)¶
-
void
add_entry
(std::unique_lock<mutex_type> &l, std::string const &fullkey, std::string const &key, entry_type const &val)¶
-
bool
has_entry
(std::unique_lock<mutex_type> &l, std::string const &key) const¶
-
std::string
get_entry
(std::unique_lock<mutex_type> &l, std::string const &key) const¶
-
std::string
get_entry
(std::unique_lock<mutex_type> &l, std::string const &key, std::string const &dflt) const¶
-
void
add_notification_callback
(std::unique_lock<mutex_type> &l, std::string const &key, entry_changed_func const &callback)¶
-
std::string
expand
(std::unique_lock<mutex_type> &l, std::string in) const¶
-
void
expand
(std::unique_lock<mutex_type> &l, std::string&, std::string::size_type) const¶
-
void
expand_bracket
(std::unique_lock<mutex_type> &l, std::string&, std::string::size_type) const¶
-
void
expand_brace
(std::unique_lock<mutex_type> &l, std::string&, std::string::size_type) const¶
-
std::string
expand_only
(std::unique_lock<mutex_type> &l, std::string in, std::string const &expand_this) const¶
-
void
expand_only
(std::unique_lock<mutex_type> &l, std::string&, std::string::size_type, std::string const &expand_this) const¶
Friends
-
friend
hpx::util::hpx::serialization::access
-
typedef util::function_nonser<void(std::string const&, std::string const&)>
-
class
-
namespace
Header hpx/runtime_configuration/init_ini_data.hpp
¶
-
namespace
hpx
-
namespace
util
Functions
-
std::vector<std::shared_ptr<components::component_registry_base>>
load_component_factory_static
(util::section &ini, std::string name, hpx::util::plugin::get_plugins_list_type get_factory, error_code &ec = throws)¶
-
std::vector<std::shared_ptr<components::component_registry_base>>
-
namespace
Header hpx/runtime_configuration/plugin_registry_base.hpp
¶
Defines
-
HPX_REGISTER_PLUGIN_BASE_REGISTRY
(PluginType, name)¶ This macro is used to register the given component factory with Hpx.Plugin. This macro has to be used for each of the components.
-
HPX_REGISTER_PLUGIN_REGISTRY_MODULE
()¶ This macro is used to define the required Hpx.Plugin entry points. This macro has to be used in exactly one compilation unit of a component module.
-
HPX_REGISTER_PLUGIN_REGISTRY_MODULE_DYNAMIC
()¶
-
namespace
hpx
-
namespace
plugins
¶ -
struct
plugin_registry_base
¶ - #include <plugin_registry_base.hpp>
The plugin_registry_base has to be used as a base class for all plugin registries.
Public Functions
-
virtual
~plugin_registry_base
()¶
-
virtual bool
get_plugin_info
(std::vector<std::string> &fillini) = 0¶ Return the configuration information for any plugin implemented by this module
- Return
Returns true if the parameter fillini has been successfully initialized with the registry data of all implemented in this module.
- Parameters
fillini
: [in, out] The module is expected to fill this vector with the ini-information (one line per vector element) for all plugins implemented in this module.
-
virtual void
init
(int*, char***, util::runtime_configuration&)¶
-
virtual
-
struct
-
namespace
Header hpx/runtime_configuration/runtime_configuration.hpp
¶
-
namespace
hpx
-
namespace
util
-
class
runtime_configuration
: public hpx::util::section¶ - #include <runtime_configuration.hpp>
Public Functions
-
runtime_configuration
(char const *argv0, runtime_mode mode)¶
-
void
load_components_static
(std::vector<components::static_factory_load_data_type> const &static_modules)¶
-
agas::service_mode
get_agas_service_mode
() const¶
-
bool
enable_networking
() const¶
-
bool
get_agas_caching_mode
() const¶
-
bool
get_agas_range_caching_mode
() const¶
-
bool
load_application_configuration
(char const *filename, error_code &ec = throws)¶
-
bool
get_itt_notify_mode
() const¶
-
bool
enable_lock_detection
() const¶
-
bool
enable_global_lock_detection
() const¶
-
bool
enable_minimal_deadlock_detection
() const¶
-
bool
enable_spinlock_deadlock_detection
() const¶
-
std::ptrdiff_t
get_stack_size
(threads::thread_stacksize stacksize) const¶
Public Members
-
runtime_mode
mode_
¶
Private Functions
-
std::ptrdiff_t
init_stack_size
(char const *entryname, char const *defaultvaluestr, std::ptrdiff_t defaultvalue) const¶
-
void
pre_initialize_ini
()¶
-
void
post_initialize_ini
(std::string &hpx_ini_file, std::vector<std::string> const &cmdline_ini_defs)¶
-
void
pre_initialize_logging_ini
()¶
-
void
reconfigure
()¶
Private Members
-
bool
need_to_call_pre_initialize
¶
-
-
class
-
namespace
Header hpx/runtime_configuration/runtime_configuration_fwd.hpp
¶
Header hpx/runtime_configuration/runtime_mode.hpp
¶
-
namespace
hpx
Enums
-
enum
runtime_mode
¶ A HPX runtime can be executed in two different modes: console mode and worker mode.
Values:
-
invalid
= -1¶
-
console
= 0¶ The runtime is the console locality.
-
worker
= 1¶ The runtime is a worker locality.
-
connect
= 2¶ The runtime is a worker locality connecting late
-
local
= 3¶ The runtime is fully local.
-
default_
= 4¶ The runtime mode will be determined based on the command line arguments
-
last
¶
-
Functions
-
char const *
get_runtime_mode_name
(runtime_mode state)¶ Get the readable string representing the name of the given runtime_mode constant.
-
runtime_mode
get_runtime_mode_from_name
(std::string const &mode)¶ Returns the internal representation (runtime_mode constant) from the readable string representing the name.
This represents the internal representation from the readable string representing the name.
- Parameters
mode
: this represents the runtime mode
-
enum
Header hpx/runtime_configuration/static_factory_data.hpp
¶
Defines
-
HPX_DECLARE_FACTORY_STATIC
(name, base)¶
-
HPX_DEFINE_FACTORY_STATIC
(module, name, base)¶
-
HPX_INIT_REGISTRY_MODULE_STATIC
(name, base)¶
-
HPX_INIT_REGISTRY_FACTORY_STATIC
(name, componentname, base)¶
-
HPX_INIT_REGISTRY_COMMANDLINE_STATIC
(name, base)¶
-
HPX_INIT_REGISTRY_STARTUP_SHUTDOWN_STATIC
(name, base)¶
-
namespace
hpx
-
namespace
components
Functions
-
void
init_registry_module
(static_factory_load_data_type const&)¶
-
void
init_registry_factory
(static_factory_load_data_type const&)¶
-
void
init_registry_commandline
(static_factory_load_data_type const&)¶
-
void
init_registry_startup_shutdown
(static_factory_load_data_type const&)¶
-
struct
static_factory_load_data_type
¶ - #include <static_factory_data.hpp>
-
void
-
namespace