| 440 | } |
| 441 | |
| 442 | static void CountSetBits(benchmark::State& state) { |
| 443 | int64_t nbytes = state.range(0); |
| 444 | std::shared_ptr<Buffer> buffer = CreateRandomBuffer(nbytes); |
| 445 | |
| 446 | for (auto _ : state) { |
| 447 | auto count = internal::CountSetBits(buffer->data(), /*bit_offset=*/0, nbytes * 8); |
| 448 | benchmark::DoNotOptimize(count); |
| 449 | } |
| 450 | state.SetBytesProcessed(state.iterations() * nbytes); |
| 451 | } |
| 452 | |
| 453 | template <int64_t OffsetSrc, int64_t OffsetDest = 0> |
| 454 | static void CopyBitmap(benchmark::State& state) { // NOLINT non-const reference |
nothing calls this directly
no test coverage detected