| 505 | // |
| 506 | |
| 507 | void ArrayRankSetArgs(benchmark::internal::Benchmark* bench) { |
| 508 | // 3 benchmark arguments: size, inverse null proportion, rank tiebreaker |
| 509 | bench->Unit(benchmark::kNanosecond); |
| 510 | bench->ArgNames({"", "", "tiebreaker"}); |
| 511 | |
| 512 | // Use only a subset of kInverseNullProportions as the cartesian product of |
| 513 | // arguments is large already. |
| 514 | const std::vector<ArgsType> inverse_null_proportions{10, 1, 0}; |
| 515 | // Don't bother with Max as it should have the same perf as Min |
| 516 | const std::vector<RankOptions::Tiebreaker> tie_breakers{ |
| 517 | RankOptions::Min, RankOptions::First, RankOptions::Dense}; |
| 518 | |
| 519 | for (const auto inverse_null_proportion : kInverseNullProportions) { |
| 520 | for (const auto tie_breaker : tie_breakers) { |
| 521 | bench->Args({static_cast<ArgsType>(kL1Size), inverse_null_proportion, |
| 522 | static_cast<ArgsType>(tie_breaker)}); |
| 523 | } |
| 524 | } |
| 525 | for (const auto tie_breaker : tie_breakers) { |
| 526 | bench->Args({1 << 20, 100, static_cast<ArgsType>(tie_breaker)}); |
| 527 | } |
| 528 | for (const auto tie_breaker : tie_breakers) { |
| 529 | bench->Args({1 << 23, 100, static_cast<ArgsType>(tie_breaker)}); |
| 530 | } |
| 531 | } |
| 532 | |
| 533 | BENCHMARK(ArrayRankInt64Narrow)->Apply(ArrayRankSetArgs); |
| 534 | BENCHMARK(ArrayRankInt64Wide)->Apply(ArrayRankSetArgs); |
nothing calls this directly
no outgoing calls
no test coverage detected