Benchmark calling the old version of RleBatchDecoder ::GetValues() that used memset() for setting repeated values.
| 147 | /// Benchmark calling the old version of RleBatchDecoder<uint8_t>::GetValues() that used |
| 148 | /// memset() for setting repeated values. |
| 149 | void RleBenchmarkMemset(int batch_size, void* data) { |
| 150 | for (int i = 0; i < batch_size; ++i) { |
| 151 | BenchmarkParams* p = reinterpret_cast<BenchmarkParams*>(data); |
| 152 | RleBatchDecoder<uint8_t> decoder(p->input_buffer.data(), p->input_size, p->bit_width); |
| 153 | int result = GetValuesMemset(NUM_OUT_VALUES, out_buffer, &decoder); |
| 154 | if (result != NUM_OUT_VALUES) { |
| 155 | LOG(ERROR) << Substitute( |
| 156 | "Error in GetValuesMemset(). bit_width: $0 max_run_length: $1 " |
| 157 | "expected number of values: $2 decoded number of values: $3", |
| 158 | p->bit_width, p->max_run_length, NUM_OUT_VALUES, result); |
| 159 | exit(1); |
| 160 | } |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | struct RleBenchmarks { |
| 165 | BenchmarkParams params; |
nothing calls this directly
no test coverage detected