class gpr::linalg::ScopedSerialEigenThreads

Serialize callers that temporarily force Eigen ‘s global thread budget to 1, restoring the previous budget when the outermost scope exits. Reentrant on the owning thread so nested scopes (e.g. AtomicInducingPosterior calling DenseLLTInverse) neither deadlock nor restore early.

Internal to libgpridge, not public API: only DenseLLTInverse.cpp and AtomicInducingPosterior.cpp use it, and no installed header declares or includes it, so this header is not installed. The class is hidden so the shared library’s exported symbol set does not grow, and so no other module can depend on its layout.

#include <gpr/linalg/SerialEigenThreads.h>
 
class ScopedSerialEigenThreads {
public:
    // construction
 
    ScopedSerialEigenThreads();
    ScopedSerialEigenThreads(const ScopedSerialEigenThreads&);
    ~ScopedSerialEigenThreads();
 
    // methods
 
    ScopedSerialEigenThreads& operator=(const ScopedSerialEigenThreads&);
};