MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / resolution

Function resolution

Source/ThirdParty/catch2/catch.hpp:7094–7106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

back_inserterFunction · 0.85
transformFunction · 0.50
nextFunction · 0.50
reserveMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected