Runtime settings captured from the environment and the tuning constants.
Lower-level functions (algorithm-specific variants, workspace queries, validation and helpers): Configuration: lower-level API.
| const Settings & batchlas::settings | ( | ) |
The process-wide settings.
The environment is read once, under std::call_once, on the first call. Thread-safe, and safe to call from a static initialiser.
| void batchlas::configure | ( | const Settings & | s | ) |
Install s as the settings, for an embedding application that wants to stop inheriting ambient process state.
What is installed is the base, not a lock: a later detail::reload_settings() (every ScopedEnvVar triggers one) re-reads the environment on top of it, so a knob set here and not exported holds for the life of the process, and a knob something explicitly exports still wins. The unsafe group is not gated here.
| s | the complete settings to install |
| batchlas::api_misuse | (a std::runtime_error) if a Queue already exists; nothing is changed. |
| void batchlas::detail::reload_settings | ( | ) |
Re-read the environment on top of the last configure() (or the defaults).
ScopedEnvVar calls this from its constructor and destructor, which is how a test's pinned knob takes effect and then stops leaking into later tests.
Topics | |
| Configuration: lower-level API | |
| Per-size tuning lookups, environment parsers and internal hooks behind settings() and configure(). | |
Files | |
| file | include/batchlas/settings.hh |
| Every BATCHLAS_* environment variable the library reads, captured once into batchlas::Settings, plus the programmatic override configure(). | |
| file | include/batchlas/tuning_params.hh |
| Tuning constants, bucketed by problem order n, with runtime BATCHLAS_TUNE_* overrides. | |
| file | include/batchlas/util/env.hh |
| The shared environment-variable parsers and the ScopedEnvVar RAII setter. | |
Classes | |
| class | batchlas::EnvValue |
| A raw captured environment value, shaped like the std::getenv call it replaces. More... | |
| struct | batchlas::RoutingSettings |
| The route pins: BATCHLAS_<OP>_ROUTE, one raw string per op that selects a kernel. More... | |
| struct | batchlas::SelectionSettings |
| Which kernel or algorithm runs, for the knobs outside the route pins. More... | |
| struct | batchlas::GeometrySettings |
| Launch geometry, block widths, iteration counts and tuning thresholds. More... | |
| struct | batchlas::GeometrySettings::TuneSettings |
| The runtime overrides of include/batchlas/tuning_params.hh (BATCHLAS_TUNE_*). More... | |
| struct | batchlas::DiagnosticsSettings |
| Tracing, dumping, profiling and the opt-in checks. More... | |
| struct | batchlas::DiagnosticsSettings::DumpBandR1Settings |
| The BATCHLAS_DUMP_BANDR1_* band-reduction dump family. More... | |
| struct | batchlas::UnsafeSettings |
| The overrides that remove a guarantee: setting one can make a correct program crash, hang or silently compute wrong numbers. More... | |
| struct | batchlas::Settings |
| Everything BatchLAS reads from its environment, in one value. More... | |
| class | batchlas::ScopedEnvVar |
| Sets (or unsets) an environment variable for a scope and restores it on exit. More... | |