1
1
/* **************************************************************************
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
+ ****************************************************************************/
11
11
12
12
#include " xsimd_benchmark.hpp"
13
13
#include < map>
14
14
15
15
void benchmark_operation ()
16
16
{
17
- // std::size_t size = 9984;
17
+ // std::size_t size = 9984;
18
18
std::size_t size = 20000 ;
19
19
xsimd::run_benchmark_2op (xsimd::add_fn (), std::cout, size, 1000 );
20
20
xsimd::run_benchmark_2op (xsimd::sub_fn (), std::cout, size, 1000 );
@@ -111,16 +111,16 @@ void benchmark_basic_math()
111
111
112
112
int main (int argc, char * argv[])
113
113
{
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 } },
122
122
#ifdef XSIMD_POLY_BENCHMARKS
123
- {" utils" , {" polynomial evaluation" , benchmark_poly_evaluation} },
123
+ { " utils" , { " polynomial evaluation" , benchmark_poly_evaluation } },
124
124
#endif
125
125
};
126
126
@@ -129,7 +129,7 @@ int main(int argc, char* argv[])
129
129
if (std::string (argv[1 ]) == " --help" || std::string (argv[1 ]) == " -h" )
130
130
{
131
131
std::cout << " Available options:" << std::endl;
132
- for (auto const & kv : fn_map)
132
+ for (auto const & kv : fn_map)
133
133
{
134
134
std::cout << kv.first << " : run benchmark on " << kv.second .first << " functions" << std::endl;
135
135
}
@@ -144,7 +144,7 @@ int main(int argc, char* argv[])
144
144
}
145
145
else
146
146
{
147
- for (auto const & kv : fn_map)
147
+ for (auto const & kv : fn_map)
148
148
{
149
149
kv.second .second ();
150
150
}
0 commit comments