]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/multiprecision/performance/sf_performance_basic.cpp
1 ///////////////////////////////////////////////////////////////
2 // Copyright 2011 John Maddock. Distributed under the Boost
3 // Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
6 #include "sf_performance.hpp"
11 std::cout
<< "Allocation Counts for Horner Evaluation:\n";
13 basic_allocation_test("mpfr_float_50", mpfr_float_50(2));
14 basic_allocation_test("mpfr_float_50 - no expression templates", number
<mpfr_float_backend
<50>, et_off
>(2));
16 #ifdef TEST_MPFR_CLASS
17 basic_allocation_test("mpfr_class", mpfr_class(2));
20 basic_allocation_test("mpfr::mpreal", mpfr::mpreal(2));
23 std::cout
<< "Allocation Counts for boost::math::tools::evaluate_polynomial:\n";
25 poly_allocation_test("mpfr_float_50", mpfr_float_50(2));
26 poly_allocation_test("mpfr_float_50 - no expression templates", number
<mpfr_float_backend
<50>, et_off
>(2));
28 #ifdef TEST_MPFR_CLASS
29 poly_allocation_test("mpfr_class", mpfr_class(2));
32 poly_allocation_test("mpfr::mpreal", mpfr::mpreal(2));
36 // Comparison for builtin floats:
39 time_proc("Bessel Functions - double", test_bessel
<double>);
40 time_proc("Bessel Functions - real_concept", test_bessel
<boost::math::concepts::real_concept
>);
41 time_proc("Bessel Functions - arithmetic_backend<double>", test_bessel
<number
<arithmetic_backend
<double>, et_on
> >);
42 time_proc("Bessel Functions - arithmetic_backend<double> - no expression templates", test_bessel
<number
<arithmetic_backend
<double>, et_off
> >);
44 time_proc("Non-central T - double", test_nct
<double>);
45 time_proc("Non-central T - real_concept", test_nct
<boost::math::concepts::real_concept
>);
46 time_proc("Non-central T - arithmetic_backend<double>", test_nct
<number
<arithmetic_backend
<double>, et_on
> >);
47 time_proc("Non-central T - arithmetic_backend<double> - no expression templates", test_nct
<number
<arithmetic_backend
<double>, et_off
> >);