| 126 | |
| 127 | template <typename Vector> |
| 128 | void CopyShortVector(benchmark::State& state) { |
| 129 | constexpr int kSize = 3; |
| 130 | constexpr int kNumIters = 1000; |
| 131 | |
| 132 | const Vector vec(kSize); |
| 133 | |
| 134 | for (auto _ : state) { |
| 135 | int64_t dummy = 0; |
| 136 | for (int i = 0; i < kNumIters; ++i) { |
| 137 | dummy += ConsumeVector(vec); |
| 138 | } |
| 139 | benchmark::DoNotOptimize(dummy); |
| 140 | } |
| 141 | |
| 142 | state.SetItemsProcessed(state.iterations() * kNumIters); |
| 143 | } |
| 144 | |
| 145 | // With ARROW_NOINLINE, try to make sure the number of items is not constant-propagated |
| 146 | template <typename Vector> |
nothing calls this directly
no test coverage detected