//! Cross-cutting utilities used by binaries and various library modules: the
//! [`profile`] RAII helper for optional `pprof` flamegraph recording from the
//! CLI binaries, plus small numeric helpers like `gcd`.
pub
/// How many worker threads to use when the caller has no explicit request: the
/// machine's available parallelism, or `4` if the OS cannot report it (a rare
/// fallback -- assume a few cores rather than serialize). The single "count the
/// cores" helper behind the CLI bins and the classify parallel sweeps; each
/// caller layers its own request/cap policy on top (e.g. "0 means all", or
/// "cap the requested count at this").
/// Greatest common divisor of two integers (Euclid, iterative). Result is
/// non-negative; `gcd(0, 0) == 0`. The single copy behind the sites that each
/// used to roll their own (ring symmetry order, prune-moduli coprimality).
pub