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

Function compare_3d

test/speed_cpp.cpp:86–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85template <typename Tag, typename Storage>
86double compare_3d(unsigned n, int distrib) {
87 auto r = random_array(n, distrib);
88
89 auto best = std::numeric_limits<double>::max();
90 for (unsigned k = 0; k < 20; ++k) {
91 auto h = make_s(Tag(), Storage(), axis::regular<>(100, 0, 1),
92 axis::regular<>(100, 0, 1), axis::regular<>(100, 0, 1));
93 auto t = clock();
94 for (unsigned i = 0; i < n / 3; ++i) h(r[3 * i], r[3 * i + 1], r[3 * i + 2]);
95 t = clock() - t;
96 best = std::min(best, double(t) / CLOCKS_PER_SEC);
97 }
98
99 return best;
100}
101
102template <typename Tag, typename Storage>
103double compare_6d(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