11/* **************************************************************************
2- * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and *
3- * Martin Renou *
4- * Copyright (c) QuantStack *
5- * Copyright (c) Serge Guelton *
6- * *
7- * Distributed under the terms of the BSD 3-Clause License. *
8- * *
9- * The full license is in the file LICENSE, distributed with this software. *
10- ****************************************************************************/
2+ * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and *
3+ * Martin Renou *
4+ * Copyright (c) QuantStack *
5+ * Copyright (c) Serge Guelton *
6+ * *
7+ * Distributed under the terms of the BSD 3-Clause License. *
8+ * *
9+ * The full license is in the file LICENSE, distributed with this software. *
10+ ****************************************************************************/
1111
1212#include " xsimd_benchmark.hpp"
1313#include < map>
1414
1515void benchmark_operation ()
1616{
17- // std::size_t size = 9984;
17+ // std::size_t size = 9984;
1818 std::size_t size = 20000 ;
1919 xsimd::run_benchmark_2op (xsimd::add_fn (), std::cout, size, 1000 );
2020 xsimd::run_benchmark_2op (xsimd::sub_fn (), std::cout, size, 1000 );
@@ -111,16 +111,16 @@ void benchmark_basic_math()
111111
112112int main (int argc, char * argv[])
113113{
114- const std::map<std::string, std::pair<std::string, void (*)()>> fn_map = {
115- {" op" , {" arithmetic" , benchmark_operation} },
116- {" exp" , {" exponential and logarithm" , benchmark_exp_log} },
117- {" trigo" , {" trigonometric" , benchmark_trigo} },
118- {" hyperbolic" , {" hyperbolic" , benchmark_hyperbolic} },
119- {" power" , {" power" , benchmark_power} },
120- {" basic_math" , {" basic math" , benchmark_basic_math} },
121- {" rounding" , {" rounding" , benchmark_rounding} },
114+ const std::map<std::string, std::pair<std::string, void (*)()>> fn_map = {
115+ { " op" , { " arithmetic" , benchmark_operation } },
116+ { " exp" , { " exponential and logarithm" , benchmark_exp_log } },
117+ { " trigo" , { " trigonometric" , benchmark_trigo } },
118+ { " hyperbolic" , { " hyperbolic" , benchmark_hyperbolic } },
119+ { " power" , { " power" , benchmark_power } },
120+ { " basic_math" , { " basic math" , benchmark_basic_math } },
121+ { " rounding" , { " rounding" , benchmark_rounding } },
122122#ifdef XSIMD_POLY_BENCHMARKS
123- {" utils" , {" polynomial evaluation" , benchmark_poly_evaluation} },
123+ { " utils" , { " polynomial evaluation" , benchmark_poly_evaluation } },
124124#endif
125125 };
126126
@@ -129,7 +129,7 @@ int main(int argc, char* argv[])
129129 if (std::string (argv[1 ]) == " --help" || std::string (argv[1 ]) == " -h" )
130130 {
131131 std::cout << " Available options:" << std::endl;
132- for (auto const & kv : fn_map)
132+ for (auto const & kv : fn_map)
133133 {
134134 std::cout << kv.first << " : run benchmark on " << kv.second .first << " functions" << std::endl;
135135 }
@@ -144,7 +144,7 @@ int main(int argc, char* argv[])
144144 }
145145 else
146146 {
147- for (auto const & kv : fn_map)
147+ for (auto const & kv : fn_map)
148148 {
149149 kv.second .second ();
150150 }
0 commit comments