switch from fill to increment

This commit is contained in:
hans.dembinski@gmail.com
2017-02-11 18:41:44 +00:00
parent 719e6036b7
commit fcf9366d89
13 changed files with 213 additions and 213 deletions

View File

@@ -46,7 +46,7 @@ double compare_1d(unsigned n, int distrib)
auto h = Histogram(regular_axis(100, 0, 1));
auto t = clock();
for (unsigned i = 0; i < n; ++i)
h.fill(r[i]);
h.increment(r[i]);
t = clock() - t;
best = std::min(best, double(t) / CLOCKS_PER_SEC);
}
@@ -66,7 +66,7 @@ double compare_3d(unsigned n, int distrib)
regular_axis(100, 0, 1));
auto t = clock();
for (unsigned i = 0; i < n; ++i)
h.fill(r[3 * i], r[3 * i + 1], r[3 * i + 2]);
h.increment(r[3 * i], r[3 * i + 1], r[3 * i + 2]);
t = clock() - t;
best = std::min(best, double(t) / CLOCKS_PER_SEC);
}
@@ -94,7 +94,7 @@ double compare_6d(unsigned n, int distrib)
for (unsigned i = 0; i < n; ++i) {
for (unsigned k = 0; k < 6; ++k)
x[k] = r[6 * i + k];
h.fill(x[0], x[1], x[2], x[3], x[4], x[5]);
h.increment(x[0], x[1], x[2], x[3], x[4], x[5]);
}
t = clock() - t;
best = std::min(best, double(t) / CLOCKS_PER_SEC);