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

Function ModeKernel

cpp/src/arrow/acero/aggregate_benchmark.cc:631–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629
630template <typename ArrowType>
631void ModeKernel(benchmark::State& state, int min, int max) {
632 using CType = typename TypeTraits<ArrowType>::CType;
633
634 RegressionArgs args(state);
635 const int64_t array_size = args.size / sizeof(CType);
636 auto rand = random::RandomArrayGenerator(1924);
637 auto array = rand.Numeric<ArrowType>(array_size, min, max, args.null_proportion);
638
639 for (auto _ : state) {
640 ABORT_NOT_OK(Mode(array).status());
641 }
642
643 state.SetItemsProcessed(state.iterations() * array_size);
644}
645
646template <typename ArrowType>
647void ModeKernelNarrow(benchmark::State& state) {

Callers

nothing calls this directly

Calls 2

ModeFunction · 0.50
statusMethod · 0.45

Tested by

no test coverage detected