| 19 | |
| 20 | template <typename TValue> |
| 21 | static void arithmetic(benchmark::State& state, TValue (*func)(TValue, TValue)) |
| 22 | { |
| 23 | for (auto _ : state) |
| 24 | { |
| 25 | TValue x{ static_cast<TValue>(static_cast<int16_t>(s_x)) }, y{ static_cast<TValue>(static_cast<int16_t>(s_y)) }; |
| 26 | benchmark::DoNotOptimize(func(x, y)); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | #define FUNC(TYPE, OP) \ |
| 31 | [](TYPE x, TYPE y) -> TYPE { return x OP y; } |
nothing calls this directly
no test coverage detected