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

Function compare_6d

test/speed_cpp.cpp:103–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102template <typename Tag, typename Storage>
103double compare_6d(unsigned n, int distrib) {
104 auto r = random_array(n, distrib);
105
106 auto best = std::numeric_limits<double>::max();
107 for (unsigned k = 0; k < 20; ++k) {
108 auto h =
109 make_s(Tag(), Storage(), axis::regular<>(10, 0, 1), axis::regular<>(10, 0, 1),
110 axis::regular<>(10, 0, 1), axis::regular<>(10, 0, 1),
111 axis::regular<>(10, 0, 1), axis::regular<>(10, 0, 1));
112
113 auto t = clock();
114 for (unsigned i = 0; i < n / 6; ++i) {
115 h(r[6 * i], r[6 * i + 1], r[6 * i + 2], r[6 * i + 3], r[6 * i + 4], r[6 * i + 5]);
116 }
117 t = clock() - t;
118 best = std::min(best, double(t) / CLOCKS_PER_SEC);
119 }
120
121 return best;
122}
123
124int main() {
125 const unsigned nfill = 6000000;

Callers

nothing calls this directly

Calls 2

make_sFunction · 0.85
random_arrayFunction · 0.70

Tested by

no test coverage detected