struct gpr::SexpatLocalOracleScope

RAII guard: flips sexpat_local_oracle_active to true on construction and restores the previous value on destruction. Used by GaussianProcessRegression::fitSVGDFromScratch ‘s grad_oracle lambda so the per-particle gradient compute picks up the OpenMP parallelism gated by use_openmp_local_oracle.

#include <SexpatCF.h>
 
struct SexpatLocalOracleScope {
    // fields
 
    bool prev_;
 
    // construction
 
    SexpatLocalOracleScope();
    SexpatLocalOracleScope(const SexpatLocalOracleScope&);
    ~SexpatLocalOracleScope();
 
    // methods
 
    SexpatLocalOracleScope& operator=(const SexpatLocalOracleScope&);
};