MCPcopy Create free account
hub / github.com/boostorg/histogram / compare_2d

Function compare_2d

test/speed_cpp.cpp:69–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68template <typename Tag, typename Storage>
69double compare_2d(unsigned n, int distrib) {
70 auto r = random_array(n, distrib);
71
72 auto best = std::numeric_limits<double>::max();
73 for (unsigned k = 0; k < 20; ++k) {
74 auto h =
75 make_s(Tag(), Storage(), axis::regular<>(100, 0, 1), axis::regular<>(100, 0, 1));
76 auto t = clock();
77 for (unsigned i = 0; i < n / 2; ++i) h(r[2 * i], r[2 * i + 1]);
78 t = clock() - t;
79 best = std::min(best, double(t) / CLOCKS_PER_SEC);
80 }
81
82 return best;
83}
84
85template <typename Tag, typename Storage>
86double compare_3d(unsigned n, int distrib) {

Callers

nothing calls this directly

Calls 2

make_sFunction · 0.85
random_arrayFunction · 0.70

Tested by

no test coverage detected