| 629 | |
| 630 | template <typename ArrowType> |
| 631 | void 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 | |
| 646 | template <typename ArrowType> |
| 647 | void ModeKernelNarrow(benchmark::State& state) { |