]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/multiprecision/performance/sf_performance_poly.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / multiprecision / performance / sf_performance_poly.cpp
CommitLineData
7c673cae
FG
1///////////////////////////////////////////////////////////////
2// Copyright 2011 John Maddock. Distributed under the Boost
3// Software License, Version 1.0. (See accompanying file
92f5a8d4 4// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
7c673cae
FG
5
6#include "sf_performance.hpp"
7
8void poly_tests()
9{
10 //
11 // 50 digits first:
12 //
13 std::cout << "Testing Polynomial Evaluation at 50 digits....." << std::endl;
14#if defined(TEST_MPFR) || defined(TEST_MPFR_CLASS)
15 mpfr_set_default_prec(50 * 1000L / 301L);
16#endif
17#ifdef TEST_MPREAL
18 mpfr::mpreal::set_default_prec(50 * 1000L / 301L);
19#endif
20#ifdef TEST_MPFR
21 time_proc("mpfr_float_50", test_polynomial<mpfr_float_50>);
22 time_proc("mpfr_float_50 (no expression templates", test_polynomial<number<mpfr_float_backend<50>, et_off> >);
23 time_proc("static_mpfr_float_50", test_polynomial<static_mpfr_float_50>);
24#endif
25#ifdef TEST_MPF
26 time_proc("mpf_float_50", test_polynomial<mpf_float_50>);
27 time_proc("mpf_float_50 (no expression templates", test_polynomial<number<gmp_float<50>, et_off> >);
28#endif
29#ifdef TEST_CPP_DEC_FLOAT
30 time_proc("cpp_dec_float_50", test_polynomial<cpp_dec_float_50>);
31#endif
32#ifdef TEST_CPP_BIN_FLOAT
33 time_proc("cpp_bin_float_50", test_polynomial<cpp_bin_float_50>);
34#endif
35#ifdef TEST_MPFR_CLASS
36 time_proc("mpfr_class", test_polynomial<mpfr_class>);
37#endif
38#ifdef TEST_MPREAL
39 time_proc("mpfr::mpreal", test_polynomial<mpfr::mpreal>);
40#endif
41 //
42 // Then 100 digits:
43 //
44 std::cout << "Testing Polynomial Evaluation at 100 digits....." << std::endl;
45#ifdef TEST_MPFR_CLASS
46 mpfr_set_default_prec(100 * 1000L / 301L);
47#endif
48#ifdef TEST_MPREAL
49 mpfr::mpreal::set_default_prec(100 * 1000L / 301L);
50#endif
51#ifdef TEST_MPFR
52 time_proc("mpfr_float_100", test_polynomial<mpfr_float_100>);
53 time_proc("mpfr_float_100 (no expression templates", test_polynomial<number<mpfr_float_backend<100>, et_off> >);
54 time_proc("static_mpfr_float_100", test_polynomial<static_mpfr_float_100>);
55#endif
56#ifdef TEST_MPF
57 time_proc("mpf_float_100", test_polynomial<mpf_float_100>);
58 time_proc("mpf_float_100 (no expression templates", test_polynomial<number<gmp_float<100>, et_off> >);
59#endif
60#ifdef TEST_CPP_DEC_FLOAT
61 time_proc("cpp_dec_float_100", test_polynomial<cpp_dec_float_100>);
62#endif
63#ifdef TEST_CPP_BIN_FLOAT
64 time_proc("cpp_bin_float_100", test_polynomial<cpp_bin_float_100>);
65#endif
66#ifdef TEST_MPFR_CLASS
67 time_proc("mpfr_class", test_polynomial<mpfr_class>);
68#endif
69#ifdef TEST_MPREAL
70 time_proc("mpfr::mpreal", test_polynomial<mpfr::mpreal>);
71#endif
72}