MCPcopy Create free account
hub / github.com/apache/arrow / CountSetBits

Function CountSetBits

cpp/src/arrow/util/bit_util_benchmark.cc:442–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442static 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
453template <int64_t OffsetSrc, int64_t OffsetDest = 0>
454static void CopyBitmap(benchmark::State& state) { // NOLINT non-const reference

Callers

nothing calls this directly

Calls 2

CreateRandomBufferFunction · 0.70
dataMethod · 0.45

Tested by

no test coverage detected