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

Function compare_1d

test/speed_cpp.cpp:53–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52template <typename Tag, typename Storage>
53double compare_1d(unsigned n, int distrib) {
54 auto r = random_array(n, distrib);
55
56 auto best = std::numeric_limits<double>::max();
57 for (unsigned k = 0; k < 20; ++k) {
58 auto h = make_s(Tag(), Storage(), axis::regular<>(100, 0, 1));
59 auto t = clock();
60 for (unsigned i = 0; i < n; ++i) h(r[i]);
61 t = clock() - t;
62 best = std::min(best, double(t) / CLOCKS_PER_SEC);
63 }
64
65 return best;
66}
67
68template <typename Tag, typename Storage>
69double compare_2d(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