#include <alpaqa/problem/problem-with-counters.hpp>
Problem wrapper that keeps track of the number of evaluations and the run time of each function.
You probably want to use problem_with_counters or problem_with_counters_ref instead of instantiating this class directly.
std::shared_pointers
, which means that different copies of a ProblemWithCounters instance all share the same counters. To opt out of this behavior, you can use the decouple_evaluations function. Definition at line 25 of file problem-with-counters.hpp.
Public Types | |
using | Box = typename TypeErasedProblem< config_t >::Box |
using | Sparsity = sparsity::Sparsity< config_t > |
Public Attributes | |
std::shared_ptr< EvalCounter > | evaluations = std::make_shared<EvalCounter>() |
Problem | problem |
Static Private Member Functions | |
template<class TimeT , class FunT > | |
static decltype(auto) | timed (TimeT &time, FunT &&f) |
using Box = typename TypeErasedProblem<config_t>::Box |
Definition at line 27 of file problem-with-counters.hpp.
using Sparsity = sparsity::Sparsity<config_t> |
Definition at line 28 of file problem-with-counters.hpp.
|
default |
|
inlineexplicit |
Definition at line 91 of file problem-with-counters.hpp.
|
inlineexplicit |
Definition at line 95 of file problem-with-counters.hpp.
|
inline |
Definition at line 34 of file problem-with-counters.hpp.
Definition at line 39 of file problem-with-counters.hpp.
Definition at line 40 of file problem-with-counters.hpp.
Definition at line 41 of file problem-with-counters.hpp.
|
inline |
Definition at line 42 of file problem-with-counters.hpp.
|
inline |
Definition at line 43 of file problem-with-counters.hpp.
Definition at line 44 of file problem-with-counters.hpp.
|
inline |
Definition at line 45 of file problem-with-counters.hpp.
|
inline |
Definition at line 46 of file problem-with-counters.hpp.
Definition at line 47 of file problem-with-counters.hpp.
Definition at line 48 of file problem-with-counters.hpp.
Definition at line 49 of file problem-with-counters.hpp.
|
inline |
Definition at line 50 of file problem-with-counters.hpp.
|
inline |
Definition at line 51 of file problem-with-counters.hpp.
Definition at line 52 of file problem-with-counters.hpp.
|
inline |
Definition at line 53 of file problem-with-counters.hpp.
|
inline |
Definition at line 54 of file problem-with-counters.hpp.
Definition at line 55 of file problem-with-counters.hpp.
Definition at line 56 of file problem-with-counters.hpp.
Definition at line 57 of file problem-with-counters.hpp.
Definition at line 59 of file problem-with-counters.hpp.
Definition at line 60 of file problem-with-counters.hpp.
Definition at line 61 of file problem-with-counters.hpp.
Definition at line 62 of file problem-with-counters.hpp.
Definition at line 63 of file problem-with-counters.hpp.
Definition at line 64 of file problem-with-counters.hpp.
Definition at line 65 of file problem-with-counters.hpp.
Definition at line 66 of file problem-with-counters.hpp.
Definition at line 67 of file problem-with-counters.hpp.
Definition at line 68 of file problem-with-counters.hpp.
Definition at line 69 of file problem-with-counters.hpp.
Definition at line 70 of file problem-with-counters.hpp.
Definition at line 71 of file problem-with-counters.hpp.
Definition at line 72 of file problem-with-counters.hpp.
Definition at line 73 of file problem-with-counters.hpp.
Definition at line 74 of file problem-with-counters.hpp.
Definition at line 75 of file problem-with-counters.hpp.
Definition at line 76 of file problem-with-counters.hpp.
Definition at line 77 of file problem-with-counters.hpp.
Definition at line 78 of file problem-with-counters.hpp.
Definition at line 81 of file problem-with-counters.hpp.
Definition at line 82 of file problem-with-counters.hpp.
Reset all evaluation counters and timers to zero.
Affects all instances that share the same evaluations. If you only want to reset the counters of this instance, use decouple_evaluations first.
Definition at line 102 of file problem-with-counters.hpp.
Give this instance its own evaluation counters and timers, decoupling it from any other instances they might have previously been shared with.
The evaluation counters and timers are preserved (a copy is made).
Definition at line 106 of file problem-with-counters.hpp.
|
inlinestaticprivate |
Definition at line 110 of file problem-with-counters.hpp.
std::shared_ptr<EvalCounter> evaluations = std::make_shared<EvalCounter>() |
Definition at line 84 of file problem-with-counters.hpp.
Problem problem |
Definition at line 85 of file problem-with-counters.hpp.