MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / resolution

Function resolution

extern/Catch2/catch.hpp:7101–7113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7099 namespace Detail {
7100 template <typename Clock>
7101 std::vector<double> resolution(int k) {
7102 std::vector<TimePoint<Clock>> times;
7103 times.reserve(k + 1);
7104 std::generate_n(std::back_inserter(times), k + 1, now<Clock>{});
7105
7106 std::vector<double> deltas;
7107 deltas.reserve(k);
7108 std::transform(std::next(times.begin()), times.end(), times.begin(),
7109 std::back_inserter(deltas),
7110 [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); });
7111
7112 return deltas;
7113 }
7114
7115 const auto warmup_iterations = 10000;
7116 const auto warmup_time = std::chrono::milliseconds(100);

Callers

nothing calls this directly

Calls 5

transformFunction · 0.85
reserveMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected