delpi  0.0.1
DElta-complete LP solver
Loading...
Searching...
No Matches
LpStats.h
1
7#pragma once
8
9#include <cstddef>
10#include <iosfwd>
11
12#include "delpi/util/Stats.h"
13
14namespace delpi {
15
17struct LpStats {
18 explicit LpStats(const bool enabled, const std::string& class_name = "LpSolver")
19 : solver_stats{enabled, class_name, "Total time spent in Optimise", "Total # of iterations"},
20 parser_stats{enabled, class_name, "Time spent in the parser"},
21 refinements{0},
22 precision{0} {}
25 std::size_t refinements;
26 std::size_t precision;
28};
29
30std::ostream& operator<<(std::ostream& os, const LpStats& stats);
31
32} // namespace delpi
33
34#ifdef DELPI_INCLUDE_FMT
35
36#include "delpi/util/logging.h"
37
38OSTREAM_FORMATTER(delpi::LpStats);
39
40#endif
Dataclass collecting statistics about some operation or process.
Definition Stats.h:71
Dataclass collecting statistics about some operation or process.
Definition Stats.h:22
Global namespace for the delpi library.
Collection of statistics for the LP solver.
Definition LpStats.h:17
IterationStats solver_stats
Time spent in the solver and number of iterations.
Definition LpStats.h:23
std::size_t precision
Number of bits of precision used in the last iteration.
Definition LpStats.h:26
std::size_t refinements
Number of iterative refinements. Only meaningful for iterative refinement solvers.
Definition LpStats.h:25
Stats parser_stats
Time spent in the parser.
Definition LpStats.h:24