Sha256: ae8b3cbfea69ea9898598ceb7f013928b8a0191a3a8b860467923f154d75e620
Contents?: true
Size: 634 Bytes
Versions: 1
Compression:
Stored size: 634 Bytes
Contents
#ifndef BENCHMARK_REGISTER_H #define BENCHMARK_REGISTER_H #include <vector> #include "check.h" template <typename T> void AddRange(std::vector<T>* dst, T lo, T hi, int mult) { CHECK_GE(lo, 0); CHECK_GE(hi, lo); CHECK_GE(mult, 2); // Add "lo" dst->push_back(lo); static const T kmax = std::numeric_limits<T>::max(); // Now space out the benchmarks in multiples of "mult" for (T i = 1; i < kmax / mult; i *= mult) { if (i >= hi) break; if (i > lo) { dst->push_back(i); } } // Add "hi" (if different from "lo") if (hi != lo) { dst->push_back(hi); } } #endif // BENCHMARK_REGISTER_H
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simdjson-0.3.0 | vendor/simdjson/dependencies/json/benchmarks/thirdparty/benchmark/src/benchmark_register.h |