38 const char* v = captured.
get();
39 if (v ==
nullptr || *v ==
'\0')
return fallback;
41 const long parsed = std::strtol(v, &end, 10);
42 if (end == v || *end !=
'\0')
return fallback;
43 if (parsed <= 0 || parsed > 2147483647L)
return fallback;
44 return static_cast<int32_t
>(parsed);
A raw captured environment value, shaped like the std::getenv call it replaces.
const char * get() const noexcept
The value, or nullptr when unset: the drop-in for std::getenv("...").
constexpr int32_t ormqr_block_size_default_for_n(int32_t n)
Compiled ORMQR_BLOCK_SIZE_* bucket for n (no override).
int32_t sb2st_back_tile_for_n(int32_t n)
sb2st wave back-transform tile for order n, or 0 for "keep the call site's heuristic"; override BATCH...
int32_t sytrd_block_size_for_n(int32_t n)
sytrd panel width for order n; override BATCHLAS_TUNE_SYTRD_BLOCK_SIZE.
constexpr bool sytrd_fuse_panel_update_for_n(int32_t n)
Whether sytrd fuses the panel update at order n.
int32_t tuning_env_override(const EnvValue &captured, int32_t fallback)
The captured override if it is a clean positive 32-bit integer, else fallback.
int32_t stedc_threads_per_root_for_n(int32_t n)
stedc secular-solve threads per root for order n; override BATCHLAS_TUNE_STEDC_THREADS_PER_ROOT.
int32_t stedc_recursion_threshold_for_n(int32_t n)
stedc leaf size for order n; override BATCHLAS_TUNE_STEDC_RECURSION_THRESHOLD.
int32_t latrd_lower_panel_wg_hint_for_n(int32_t n)
latrd lower-panel work-group size hint for order n, 0 for none; override BATCHLAS_TUNE_LATRD_WG_HINT.
int32_t sy2sb_ormqr_nb_for_n(int32_t n)
sy2sb back-transform WY width for order n, or 0 for the shape gate; override BATCHLAS_TUNE_SY2SB_ORMQ...
int32_t stedc_merge_variant_for_n(int32_t n)
stedc merge variant for order n, as a StedcMergeVariant value (1 Fused, 2 FusedCta); override BATCHLA...
int32_t stedc_wg_multiplier_for_n(int32_t n)
stedc merge work-group multiplier for order n; override BATCHLAS_TUNE_STEDC_WG_MULTIPLIER.
int32_t sb2st_back_subs_for_n(int32_t n)
sb2st wave back-transform sub-group count for order n, or 0 for the heuristic; override BATCHLAS_TUNE...
int32_t ormqr_block_size_for_n(int32_t n)
ormqr WY block width for order n; override BATCHLAS_TUNE_ORMQR_BLOCK_SIZE.
int32_t gebrd_block_size_for_n(int32_t n)
gebrd panel width for order n; override BATCHLAS_TUNE_GEBRD_BLOCK_SIZE.
int32_t latrd_lower_panel_wg_hint()
latrd_lower_panel_wg_hint_for_n() at n = 256, for the legacy path.
const Settings & settings()
The process-wide settings.
constexpr int32_t SYTRD_BLOCK_SIZE_LARGE
constexpr int32_t ORMQR_BLOCK_SIZE_MEDIUM
constexpr int32_t ORMQR_BLOCK_SIZE_LARGE
constexpr int32_t STEDC_MERGE_VARIANT_MEDIUM
constexpr int32_t sytrd_block_size_default_for_n(int32_t n)
constexpr int32_t SB2ST_BACK_TILE_SMALL
constexpr int32_t SB2ST_BACK_TILE_XLARGE
constexpr int32_t LATRD_LOWER_PANEL_WG_HINT_LARGE
constexpr int32_t STEDC_THREADS_PER_ROOT_TINY
constexpr int32_t SB2ST_BACK_TILE_MEDIUM
constexpr int32_t STEDC_MERGE_VARIANT_TINY
constexpr int32_t STEDC_RECURSION_THRESHOLD_LARGE
constexpr int32_t stedc_wg_multiplier_default_for_n(int32_t n)
constexpr int32_t stedc_threads_per_root_default_for_n(int32_t n)
constexpr int32_t STEDC_RECURSION_THRESHOLD_MEDIUM
constexpr int32_t STEDC_WG_MULTIPLIER_XLARGE
constexpr int32_t SY2SB_ORMQR_NB_XLARGE
constexpr int32_t ORMQR_BLOCK_SIZE_SMALL
constexpr int32_t STEDC_THREADS_PER_ROOT_MEDIUM
constexpr int32_t sy2sb_ormqr_nb_default_for_n(int32_t n)
constexpr int32_t STEDC_MERGE_VARIANT_SMALL
constexpr int32_t STEDC_THREADS_PER_ROOT_XLARGE
constexpr int32_t SYTRD_BLOCK_SIZE_MEDIUM
constexpr int32_t GEBRD_BLOCK_SIZE_LARGE
constexpr int32_t SY2SB_ORMQR_NB_LARGE
constexpr int32_t SB2ST_BACK_SUBS_TINY
constexpr int32_t SYTRD_BLOCK_SIZE_XLARGE
constexpr int32_t SYTRD_FUSE_PANEL_UPDATE_LARGE
constexpr int32_t STEDC_WG_MULTIPLIER_TINY
constexpr int32_t SYTRD_BLOCK_SIZE_TINY
constexpr int32_t ORMQR_BLOCK_SIZE_XLARGE
constexpr int32_t SYTRD_BLOCK_SIZE_SMALL
constexpr int32_t STEDC_RECURSION_THRESHOLD_SMALL
constexpr int32_t sb2st_back_tile_default_for_n(int32_t n)
constexpr int32_t stedc_recursion_threshold_default_for_n(int32_t n)
constexpr int32_t gebrd_block_size_default_for_n(int32_t n)
constexpr int32_t SYTRD_FUSE_PANEL_UPDATE_TINY
constexpr int32_t SYTRD_FUSE_PANEL_UPDATE_SMALL
constexpr int32_t SB2ST_BACK_SUBS_XLARGE
constexpr int32_t SB2ST_BACK_SUBS_MEDIUM
constexpr int32_t SYTRD_FUSE_PANEL_UPDATE_XLARGE
constexpr int32_t STEDC_WG_MULTIPLIER_MEDIUM
constexpr int32_t GEBRD_BLOCK_SIZE_MEDIUM
constexpr int32_t STEDC_RECURSION_THRESHOLD_XLARGE
constexpr int32_t GEBRD_BLOCK_SIZE_TINY
constexpr int32_t SB2ST_BACK_TILE_LARGE
constexpr int32_t LATRD_LOWER_PANEL_WG_HINT_SMALL
constexpr int32_t STEDC_THREADS_PER_ROOT_LARGE
constexpr int32_t SB2ST_BACK_SUBS_LARGE
constexpr int32_t sb2st_back_subs_default_for_n(int32_t n)
constexpr int32_t SY2SB_ORMQR_NB_SMALL
constexpr int32_t LATRD_LOWER_PANEL_WG_HINT_MEDIUM
constexpr int32_t STEDC_MERGE_VARIANT_XLARGE
constexpr int32_t SYTRD_FUSE_PANEL_UPDATE_MEDIUM
constexpr int32_t stedc_merge_variant_default_for_n(int32_t n)
constexpr int32_t STEDC_WG_MULTIPLIER_LARGE
constexpr int32_t STEDC_WG_MULTIPLIER_SMALL
constexpr int32_t STEDC_RECURSION_THRESHOLD_TINY
constexpr int32_t ORMQR_BLOCK_SIZE_TINY
constexpr int32_t SY2SB_ORMQR_NB_MEDIUM
constexpr int32_t SB2ST_BACK_TILE_TINY
constexpr int32_t SB2ST_BACK_SUBS_SMALL
constexpr int32_t GEBRD_BLOCK_SIZE_XLARGE
constexpr int32_t LATRD_LOWER_PANEL_WG_HINT_TINY
constexpr int32_t STEDC_THREADS_PER_ROOT_SMALL
constexpr int32_t SY2SB_ORMQR_NB_TINY
constexpr int32_t STEDC_MERGE_VARIANT_LARGE
constexpr int32_t LATRD_LOWER_PANEL_WG_HINT_XLARGE
constexpr int32_t GEBRD_BLOCK_SIZE_SMALL
constexpr int32_t latrd_lower_panel_wg_hint_default_for_n(int32_t n)
Every BATCHLAS_* environment variable the library reads, captured once into batchlas::Settings,...