#include "ijk.h" #include #include const std::size_t B = 2, C = 3, N = 128; template static void test(benchmark::State &state) { T a[N][N], b[N][N], c[N][N]; for (size_t i = 0; i < N; ++i) for (size_t j = 0; j < N; ++j) { a[i][j] = 0; b[i][j] = B; c[i][j] = C; } for (auto _ : state) f(a, b, c); state.SetItemsProcessed(state.iterations()); } #define test_type(T) \ BENCHMARK(test>); \ BENCHMARK(test>); \ BENCHMARK(test>); \ BENCHMARK(test>); \ BENCHMARK(test>); \ BENCHMARK(test>) test_type(short); test_type(int); test_type(long); test_type(float); test_type(double); test_type(long double); BENCHMARK_MAIN();