| 67 | namespace { |
| 68 | |
| 69 | void AddRange(std::vector<int>* dst, int lo, int hi, int mult) { |
| 70 | CHECK_GE(lo, 0); |
| 71 | CHECK_GE(hi, lo); |
| 72 | |
| 73 | // Add "lo" |
| 74 | dst->push_back(lo); |
| 75 | |
| 76 | // Now space out the benchmarks in multiples of "mult" |
| 77 | for (int32 i = 1; i < kint32max / mult; i *= mult) { |
| 78 | if (i >= hi) break; |
| 79 | if (i > lo) { |
| 80 | dst->push_back(i); |
| 81 | } |
| 82 | } |
| 83 | // Add "hi" (if different from "lo") |
| 84 | if (hi != lo) { |
| 85 | dst->push_back(hi); |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | } // namespace |
| 90 |