| 340 | } |
| 341 | |
| 342 | static void BitmapUInt64Reader(benchmark::State& state) { |
| 343 | const int64_t nbytes = state.range(0); |
| 344 | std::shared_ptr<Buffer> buffer = CreateRandomBuffer(nbytes); |
| 345 | |
| 346 | const int64_t num_bits = nbytes * 8; |
| 347 | const uint8_t* bitmap = buffer->data(); |
| 348 | |
| 349 | for (auto _ : state) { |
| 350 | { |
| 351 | internal::BitmapUInt64Reader reader(bitmap, 0, num_bits); |
| 352 | uint64_t total = 0; |
| 353 | for (int64_t i = 0; i < num_bits; i += 64) { |
| 354 | total += reader.NextWord(); |
| 355 | } |
| 356 | benchmark::DoNotOptimize(total); |
| 357 | } |
| 358 | } |
| 359 | state.SetBytesProcessed(state.iterations() * nbytes); |
| 360 | } |
| 361 | |
| 362 | static void BitRunReader(benchmark::State& state) { |
| 363 | BenchmarkBitRunReader<internal::BitRunReader>(state, state.range(0)); |
nothing calls this directly
no test coverage detected