MCPcopy Create free account
hub / github.com/MikeLankamp/fpm / arithmetic

Function arithmetic

benchmarks/arithmetic.cpp:21–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20template <typename TValue>
21static 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; }

Callers

nothing calls this directly

Calls 1

DoNotOptimizeFunction · 0.85

Tested by

no test coverage detected