Benchmark calling RleBatchDecoder ::GetValues().
| 130 | |
| 131 | /// Benchmark calling RleBatchDecoder<uint8_t>::GetValues(). |
| 132 | void RleBenchmark(int batch_size, void* data) { |
| 133 | for (int i = 0; i < batch_size; ++i) { |
| 134 | BenchmarkParams* p = reinterpret_cast<BenchmarkParams*>(data); |
| 135 | RleBatchDecoder<uint8_t> decoder(p->input_buffer.data(), p->input_size, p->bit_width); |
| 136 | int result = decoder.GetValues(NUM_OUT_VALUES, out_buffer); |
| 137 | if (result != NUM_OUT_VALUES) { |
| 138 | LOG(ERROR) << Substitute( |
| 139 | "Error in GetValues(). bit_width: $0 max_run_length: $1 " |
| 140 | "expected number of values: $2 decoded number of values: $3", |
| 141 | p->bit_width, p->max_run_length, NUM_OUT_VALUES, result); |
| 142 | exit(1); |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | /// Benchmark calling the old version of RleBatchDecoder<uint8_t>::GetValues() that used |
| 148 | /// memset() for setting repeated values. |
nothing calls this directly
no test coverage detected