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

Function compare_3d

test/speed_root.cpp:60–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void compare_3d(unsigned n, int distrib) {
61 auto r = random_array(n, distrib);
62
63 double best_root = std::numeric_limits<double>::max();
64 for (unsigned k = 0; k < 20; ++k) {
65 TH3I hroot("", "", 100, 0, 1, 100, 0, 1, 100, 0, 1);
66 auto t = clock();
67 for (unsigned i = 0; i < n / 3; ++i)
68 hroot.Fill(r[3 * i], r[3 * i + 1], r[3 * i + 2]);
69 t = clock() - t;
70 best_root = std::min(best_root, double(t) / CLOCKS_PER_SEC);
71 }
72 printf("root %.3f\n", best_root);
73}
74
75void compare_6d(unsigned n, int distrib) {
76 auto r = random_array(n, distrib);

Callers 1

mainFunction · 0.70

Calls 1

random_arrayFunction · 0.70

Tested by

no test coverage detected