MCPcopy Create free account
hub / github.com/Profactor/cv-plot / resolution

Function resolution

CvPlot/ext/catch2/inc/catch.hpp:7033–7045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7031 namespace Detail {
7032 template <typename Clock>
7033 std::vector<double> resolution(int k) {
7034 std::vector<TimePoint<Clock>> times;
7035 times.reserve(k + 1);
7036 std::generate_n(std::back_inserter(times), k + 1, now<Clock>{});
7037
7038 std::vector<double> deltas;
7039 deltas.reserve(k);
7040 std::transform(std::next(times.begin()), times.end(), times.begin(),
7041 std::back_inserter(deltas),
7042 [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); });
7043
7044 return deltas;
7045 }
7046
7047 const auto warmup_iterations = 10000;
7048 const auto warmup_time = std::chrono::milliseconds(100);

Callers

nothing calls this directly

Calls 3

countMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected