|
| | ConfigManager (const ConfigManager &)=delete |
| |
| ConfigManager & | operator= (const ConfigManager &)=delete |
| |
| | ConfigManager (ConfigManager &&)=delete |
| |
| ConfigManager & | operator= (ConfigManager &&)=delete |
| |
| uint32_t | getDeviceId () const |
| | Get the device ID. More...
|
| |
| uint32_t | getNumSub () const |
| | Get the number of Subs to build device Jobs from. More...
|
| |
| uint32_t | getTaskCount () const |
| | Get the task count. More...
|
| |
| uint32_t | getHostLogLevel () const |
| | Get the host runtime log level (0=NONE, 1=ERROR, 2=WARN, 3=INFO, 4=DEBUG, 5=TRACE). More...
|
| |
| uint32_t | getDeviceLogLevel () const |
| | Get the device runtime log level (0=NONE, 1=ERROR, 2=WARN, 3=INFO, 4=DEBUG, 5=TRACE). More...
|
| |
| bool | isHostLogEnabled () const |
| | Check if host logging is enabled. More...
|
| |
| bool | isDeviceLogEnabled () const |
| | Check if device logging is enabled. More...
|
| |
| std::optional< uint32_t > | getUint32 (const std::string &key) const |
| | Get a uint32 configuration value by key. More...
|
| |
| std::optional< uint64_t > | getUint64 (const std::string &key) const |
| | Get a uint64 configuration value by key. More...
|
| |
| std::optional< bool > | getBool (const std::string &key) const |
| | Get a boolean configuration value by key. More...
|
| |
Thread-safe singleton for centralized configuration management.
ConfigManager uses Meyer's singleton pattern for thread-safe initialization. All getters are protected by a mutex and return copies (not references) for thread safety.
Configuration sources (in priority order):
- Environment variables (highest priority)
- Default values (lowest priority)
See xvec_config.hpp for supported environment variables and validation rules. Values are read on the first instance() call and are not refreshed by later environment changes. Initialization sets the host logger level.
Creating a context with xvecCreateContext() or xvec::Context does not automatically apply these settings. Pass getDeviceId() when creating the context, and apply resource and device-log settings from the getters with xvecSetContextProperty().
Definition at line 86 of file xvec_config.hpp.