Static information on the status of parallel execution.
More...
#include <parallel.hh>
|
static void | init (const DataIO::Config &cfg) |
| Initialize parallel features based on configuration setting. More...
|
|
static void | set (const Setting value) |
| Choose a setting for parallel execution at runtime. More...
|
|
static bool | is_enabled () |
| Query if parallel execution is currently enabled. More...
|
|
static bool | is_applied () |
| Actually check if parallel features are applied at runtime. More...
|
|
|
static std::shared_ptr< spdlog::logger > | get_logger () |
| Fetch the core logger. More...
|
|
|
static bool | _enabled = false |
| Runtime setting for parallel execution. More...
|
|
Static information on the status of parallel execution.
- Note
- Using this class requires the Utopia core logger to be set up, which can conveniently done by calling Utopia::setup_loggers().
◆ Setting
Possible settings for parallel execution.
Enumerator |
---|
enabled | Enable parallel execution.
|
disabled | Disable parallel execution.
|
◆ get_logger()
static std::shared_ptr<spdlog::logger> Utopia::ParallelExecution::get_logger |
( |
| ) |
|
|
inlinestaticprivate |
Fetch the core logger.
- Returns
- Valid shared pointer to the logger
- Exceptions
-
runtime_error | If logger does not exist |
◆ init()
static void Utopia::ParallelExecution::init |
( |
const DataIO::Config & |
cfg | ) |
|
|
inlinestatic |
Initialize parallel features based on configuration setting.
- Parameters
-
cfg | Parameter space config node |
- Note
- If the required parameter is not found, parallel features are disabled by default.
◆ is_applied()
static bool Utopia::ParallelExecution::is_applied |
( |
| ) |
|
|
inlinestatic |
Actually check if parallel features are applied at runtime.
- Note
- This method is implemented for testing purposes only and should not be used to change model or algorithm behavior!
◆ is_enabled()
static bool Utopia::ParallelExecution::is_enabled |
( |
| ) |
|
|
inlinestatic |
Query if parallel execution is currently enabled.
- Note
- This value does not imply if parallel execution actually applies. If prerequisites are not met, parallel algorithms will default to sequential execution.
◆ set()
static void Utopia::ParallelExecution::set |
( |
const Setting |
value | ) |
|
|
inlinestatic |
Choose a setting for parallel execution at runtime.
This setting may be changed at any time during runtime. However, algorithms currently running will continue with the policy they have been started with.
◆ _enabled
bool Utopia::ParallelExecution::_enabled = false |
|
inlinestaticprivate |
Runtime setting for parallel execution.
The documentation for this class was generated from the following file: