Loading...
Searching...
No Matches
gpr::ScopedVarianceTimer Class Reference

#include <gpr/ml/PhaseTimers.h>

Public Member Functions

 ScopedVarianceTimer () noexcept
 ~ScopedVarianceTimer ()
 ScopedVarianceTimer (const ScopedVarianceTimer &)=delete
ScopedVarianceTimer & operator= (const ScopedVarianceTimer &)=delete

Detailed Description

Times the outermost posterior-variance evaluation on the stack: the dispatch, the marginal, the gate and the active posterior nest, and only the outermost frame accumulates.

Definition at line 735 of file PhaseTimers.h.

Constructor & Destructor Documentation

◆ ScopedVarianceTimer() [1/2]

gpr::ScopedVarianceTimer::ScopedVarianceTimer ( )
inlinenoexcept

Definition at line 737 of file PhaseTimers.h.

738 : outermost_(depth_++ == 0), start_(std::chrono::steady_clock::now())
739 {
740 if (outermost_) ++PhaseTimers::variance_count;
741 }
static int variance_count

◆ ~ScopedVarianceTimer()

gpr::ScopedVarianceTimer::~ScopedVarianceTimer ( )
inline

Definition at line 742 of file PhaseTimers.h.

743 {
744 --depth_;
745 if (outermost_)
747 std::chrono::duration<double>(std::chrono::steady_clock::now() -
748 start_)
749 .count();
750 }
static double variance_seconds

◆ ScopedVarianceTimer() [2/2]

gpr::ScopedVarianceTimer::ScopedVarianceTimer ( const ScopedVarianceTimer & )
delete

Member Function Documentation

◆ operator=()

ScopedVarianceTimer & gpr::ScopedVarianceTimer::operator= ( const ScopedVarianceTimer & )
delete

The documentation for this class was generated from the following file: