class gpr::derivatives::CountedReal

A double whose arithmetic increments operationCounts(). It carries no derivative and rounds each operation as double does; Eigen does not vectorise it, so reductions can associate differently from a double evaluation of the same expression.

#include <gpr/derivatives/CountedReal.h>
 
class CountedReal {
public:
    // construction
 
    CountedReal();
    CountedReal(double value);
 
    // methods
 
    double value() const;
    CountedReal& operator+=(const CountedReal& other);
    CountedReal& operator-=(const CountedReal& other);
    CountedReal& operator*=(const CountedReal& other);
    CountedReal& operator/=(const CountedReal& other);
};