| 24 | } |
| 25 | |
| 26 | static void FillConverted(benchmark::State& state) { |
| 27 | // Perform setup here |
| 28 | std::vector<TFloat16> data(VectorSize); |
| 29 | for (auto _ : state) { |
| 30 | // This code gets timed |
| 31 | std::fill(data.data(), data.data() + data.size(), TFloat16(0)); |
| 32 | Y_DO_NOT_OPTIMIZE_AWAY(data); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | static void FillMemset(benchmark::State& state) { |
| 37 | // Perform setup here |