.. index:: pair: class; gpr::ScopedPhaseTimer .. _doxid-classgpr_1_1_scoped_phase_timer: class gpr::ScopedPhaseTimer =========================== .. toctree:: :hidden: Adds the enclosing scope's wall time to one accumulator. Setup, cache, descriptor, posterior, subset, eigen, kernel, factor, gradient, curvature, energy, and schedule form one partition. A scope subtracts any of those siblings that grew inside it, so the sums do not cover the same seconds twice. The snapshot array is private to the calling thread. OpenMP workers do not construct this timer; they join before the calling thread reads the static accumulators. .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class ScopedPhaseTimer { public: // construction :target:`ScopedPhaseTimer`(double& accumulator, const char* label = nullptr); :target:`ScopedPhaseTimer`(const ScopedPhaseTimer&); :target:`~ScopedPhaseTimer`(); // methods :ref:`ScopedPhaseTimer`& :target:`operator=`(const :ref:`ScopedPhaseTimer`&); };