-
Notifications
You must be signed in to change notification settings - Fork 165
/
app_benchmark.h
120 lines (112 loc) · 6.79 KB
/
app_benchmark.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2007 - 2024.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef APP_BENCHMARK_2018_10_02_H
#define APP_BENCHMARK_2018_10_02_H
#define APP_BENCHMARK_TYPE_NONE 0
#define APP_BENCHMARK_TYPE_COMPLEX 1
#define APP_BENCHMARK_TYPE_CRC 2
#define APP_BENCHMARK_TYPE_FAST_MATH 3
#define APP_BENCHMARK_TYPE_FILTER 4
#define APP_BENCHMARK_TYPE_FIXED_POINT 5
#define APP_BENCHMARK_TYPE_FLOAT 6
#define APP_BENCHMARK_TYPE_WIDE_INTEGER 7
#define APP_BENCHMARK_TYPE_PI_SPIGOT 8
#define APP_BENCHMARK_TYPE_PI_SPIGOT_SINGLE 9
#define APP_BENCHMARK_TYPE_HASH 10
#define APP_BENCHMARK_TYPE_WIDE_DECIMAL 11
#define APP_BENCHMARK_TYPE_TRAPEZOID_INTEGRAL 12
#define APP_BENCHMARK_TYPE_PI_AGM 13
#define APP_BENCHMARK_TYPE_BOOST_MATH_CBRT_TGAMMA 14
#define APP_BENCHMARK_TYPE_CNL_SCALED_INTEGER 15
#define APP_BENCHMARK_TYPE_SOFT_DOUBLE_H2F1 16
#define APP_BENCHMARK_TYPE_BOOST_MULTIPRECISION_CBRT 17
#define APP_BENCHMARK_TYPE_BOOST_MATH_CYL_BESSEL_J 18
#define APP_BENCHMARK_TYPE_HASH_SHA256 19
#define APP_BENCHMARK_TYPE_ECC_GENERIC_ECC 20
#define APP_BENCHMARK_TYPE_NON_STD_DECIMAL 21
#define APP_BENCHMARK_TYPE_PI_AGM_100 22
#define APP_BENCHMARK_TYPE_BOOST_CRYPT_HASHER 23
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_NONE
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_COMPLEX
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_CRC
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_FAST_MATH
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_FILTER
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_FIXED_POINT
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_FLOAT
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_WIDE_INTEGER
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_PI_SPIGOT
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_PI_SPIGOT_SINGLE
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_HASH
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_WIDE_DECIMAL
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_TRAPEZOID_INTEGRAL
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_PI_AGM
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_BOOST_MATH_CBRT_TGAMMA
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_CNL_SCALED_INTEGER
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_SOFT_DOUBLE_H2F1
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_BOOST_MULTIPRECISION_CBRT
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_BOOST_MATH_CYL_BESSEL_J
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_HASH_SHA256
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_ECC_GENERIC_ECC
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_NON_STD_DECIMAL
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_PI_AGM_100
//#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_BOOST_CRYPT_HASHER
#if !defined(APP_BENCHMARK_TYPE)
#define APP_BENCHMARK_TYPE APP_BENCHMARK_TYPE_NONE
#endif
namespace app { namespace benchmark {
#if (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_NONE))
auto run_none() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_COMPLEX))
auto run_complex() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_CRC))
auto run_crc() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_FAST_MATH))
auto run_fast_math() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_FILTER))
auto run_filter() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_FIXED_POINT))
auto run_fixed_point() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_FLOAT))
auto run_float() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_WIDE_INTEGER))
auto run_wide_integer() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_PI_SPIGOT))
auto run_pi_spigot() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_PI_SPIGOT_SINGLE))
auto run_pi_spigot_single() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_HASH))
auto run_hash() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_WIDE_DECIMAL))
auto run_wide_decimal() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_TRAPEZOID_INTEGRAL))
auto run_trapezoid_integral() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && ((APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_PI_AGM) || (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_PI_AGM_100)))
auto run_pi_agm() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_BOOST_MATH_CBRT_TGAMMA))
auto run_boost_math_cbrt_tgamma() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_CNL_SCALED_INTEGER))
auto run_cnl_scaled_integer() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_SOFT_DOUBLE_H2F1))
auto run_soft_double_h2f1() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_BOOST_MULTIPRECISION_CBRT))
auto run_boost_multiprecision_cbrt() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_BOOST_MATH_CYL_BESSEL_J))
auto run_boost_math_cbrt_cyl_bessel_j() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_HASH_SHA256))
auto run_hash_sha256() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_ECC_GENERIC_ECC))
auto run_ecc_generic_ecc() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_NON_STD_DECIMAL))
auto run_non_std_decimal() -> bool;
#elif (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_BOOST_CRYPT_HASHER))
auto run_boost_crypt_hasher() -> bool;
#else
#error APP_BENCHMARK_TYPE is undefined.
#endif
} // namespace benchmark
} // namespace app
#endif // APP_BENCHMARK_2018_10_02_H