| 98 | |
| 99 | template <typename IndexType> |
| 100 | void ResolveManySetArgs(benchmark::internal::Benchmark* bench) { |
| 101 | constexpr int32_t kNonAligned = 3; |
| 102 | const int64_t kNumIndicesFew = (kChunkedArrayLength >> 7) - kNonAligned; |
| 103 | const int64_t kNumIndicesMany = (kChunkedArrayLength >> 1) - kNonAligned; |
| 104 | |
| 105 | bench->ArgNames({"chunked_array_length", "num_chunks", "num_indices"}); |
| 106 | |
| 107 | switch (sizeof(IndexType)) { |
| 108 | case 1: |
| 109 | // Unexpected. See comments below. |
| 110 | case 2: |
| 111 | case 4: |
| 112 | case 8: |
| 113 | bench->Args({kChunkedArrayLength, /*num_chunks*/ 10000, kNumIndicesFew}); |
| 114 | bench->Args({kChunkedArrayLength, /*num_chunks*/ 100, kNumIndicesFew}); |
| 115 | bench->Args({kChunkedArrayLength, /*num_chunks*/ 10000, kNumIndicesMany}); |
| 116 | bench->Args({kChunkedArrayLength, /*num_chunks*/ 100, kNumIndicesMany}); |
| 117 | break; |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | template <typename IndexType> |
| 122 | void ResolveManyBench(benchmark::State& state, bool sorted) { |
nothing calls this directly
no outgoing calls
no test coverage detected