|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86203 - in sandbox/multiprecision.cpp_bin_float/libs/multiprecision: performance test/math test/math/instances
From: john_at_[hidden]
Date: 2013-10-08 13:14:01
Author: johnmaddock
Date: 2013-10-08 13:14:01 EDT (Tue, 08 Oct 2013)
New Revision: 86203
URL: http://svn.boost.org/trac/boost/changeset/86203
Log:
Added Math tests and performance tests.
Added:
sandbox/multiprecision.cpp_bin_float/libs/multiprecision/test/math/
- copied from r86126, trunk/libs/multiprecision/test/math/
Text files modified:
sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance.hpp | 9 +++++++--
sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_bessel2.cpp | 3 +++
sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_bessel6.cpp | 3 +++
sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_nct3.cpp | 3 +++
sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_nct6.cpp | 3 +++
sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_poly.cpp | 6 ++++++
sandbox/multiprecision.cpp_bin_float/libs/multiprecision/test/math/instances/instances.cpp | 2 +-
sandbox/multiprecision.cpp_bin_float/libs/multiprecision/test/math/setup.hpp | 24 +++++++++++++++++++++---
8 files changed, 47 insertions(+), 6 deletions(-)
Modified: sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance.hpp
==============================================================================
--- sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance.hpp Tue Oct 8 13:09:38 2013 (r86202)
+++ sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance.hpp 2013-10-08 13:14:01 EDT (Tue, 08 Oct 2013) (r86203)
@@ -7,11 +7,12 @@
#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false
#if !defined(TEST_MPFR) && !defined(TEST_MPREAL) && !defined(TEST_MPF) && !defined(TEST_MPREAL) \
- && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR_CLASS) && !defined(TEST_FLOAT)
+ && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR_CLASS) && !defined(TEST_FLOAT) && !defined(TEST_CPP_BIN_FLOAT)
# define TEST_MPFR
# define TEST_MPF
# define TEST_CPP_DEC_FLOAT
-# define TEST_MPFR_CLASS
+# define TEST_CPP_BIN_FLOAT
+//# define TEST_MPFR_CLASS
//# define TEST_MPREAL
# define TEST_FLOAT
#endif
@@ -34,6 +35,10 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_CPP_BIN_FLOAT
+#include <boost/multiprecision/cpp_bin_float.hpp>
+#include <boost/multiprecision/mpfr.hpp>
+#endif
#include <boost/math/special_functions/bessel.hpp>
#include <boost/math/tools/rational.hpp>
#include <boost/math/distributions/non_central_t.hpp>
Modified: sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_bessel2.cpp
==============================================================================
--- sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_bessel2.cpp Tue Oct 8 13:09:38 2013 (r86202)
+++ sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_bessel2.cpp 2013-10-08 13:14:01 EDT (Tue, 08 Oct 2013) (r86203)
@@ -14,4 +14,7 @@
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_50", test_bessel<cpp_dec_float_50>, 3);
#endif
+#ifdef TEST_CPP_BIN_FLOAT
+ time_proc("cpp_bin_float_50", test_bessel<number<cpp_bin_float<std::numeric_limits<mpfr_float_50>::digits> > >, 3);
+#endif
}
Modified: sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_bessel6.cpp
==============================================================================
--- sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_bessel6.cpp Tue Oct 8 13:09:38 2013 (r86202)
+++ sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_bessel6.cpp 2013-10-08 13:14:01 EDT (Tue, 08 Oct 2013) (r86203)
@@ -10,6 +10,9 @@
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_100", test_bessel<cpp_dec_float_100>);
#endif
+#ifdef TEST_CPP_BIN_FLOAT
+ time_proc("cpp_bin_float_100", test_bessel<number<cpp_bin_float<std::numeric_limits<mpfr_float_100>::digits> > >);
+#endif
#ifdef TEST_MPFR_CLASS
time_proc("mpfr_class", test_bessel<mpfr_class>);
#endif
Modified: sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_nct3.cpp
==============================================================================
--- sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_nct3.cpp Tue Oct 8 13:09:38 2013 (r86202)
+++ sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_nct3.cpp 2013-10-08 13:14:01 EDT (Tue, 08 Oct 2013) (r86203)
@@ -13,6 +13,9 @@
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_50", test_nct<cpp_dec_float_50>);
#endif
+#ifdef TEST_CPP_BIN_FLOAT
+ time_proc("cpp_bin_float_50", test_nct<number<cpp_bin_float<std::numeric_limits<mpfr_float_50>::digits> > >, 3);
+#endif
#ifdef TEST_MPFR_CLASS
time_proc("mpfr_class", test_nct<mpfr_class>);
#endif
Modified: sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_nct6.cpp
==============================================================================
--- sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_nct6.cpp Tue Oct 8 13:09:38 2013 (r86202)
+++ sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_nct6.cpp 2013-10-08 13:14:01 EDT (Tue, 08 Oct 2013) (r86203)
@@ -13,6 +13,9 @@
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_100", test_nct<cpp_dec_float_100>);
#endif
+#ifdef TEST_CPP_BIN_FLOAT
+ time_proc("cpp_bin_float_100", test_nct<number<cpp_bin_float<std::numeric_limits<mpfr_float_100>::digits> > >);
+#endif
#ifdef TEST_MPFR_CLASS
time_proc("mpfr_class", test_nct<mpfr_class>);
#endif
Modified: sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_poly.cpp
==============================================================================
--- sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_poly.cpp Tue Oct 8 13:09:38 2013 (r86202)
+++ sandbox/multiprecision.cpp_bin_float/libs/multiprecision/performance/sf_performance_poly.cpp 2013-10-08 13:14:01 EDT (Tue, 08 Oct 2013) (r86203)
@@ -29,6 +29,9 @@
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_50", test_polynomial<cpp_dec_float_50>);
#endif
+#ifdef TEST_CPP_BIN_FLOAT
+ time_proc("cpp_bin_float_50", test_polynomial<number<cpp_bin_float<std::numeric_limits<mpfr_float_50>::digits> > >);
+#endif
#ifdef TEST_MPFR_CLASS
time_proc("mpfr_class", test_polynomial<mpfr_class>);
#endif
@@ -57,6 +60,9 @@
#ifdef TEST_CPP_DEC_FLOAT
time_proc("cpp_dec_float_100", test_polynomial<cpp_dec_float_100>);
#endif
+#ifdef TEST_CPP_BIN_FLOAT
+ time_proc("cpp_bin_float_100", test_polynomial<number<cpp_bin_float<std::numeric_limits<mpfr_float_100>::digits> > >);
+#endif
#ifdef TEST_MPFR_CLASS
time_proc("mpfr_class", test_polynomial<mpfr_class>);
#endif
Modified: sandbox/multiprecision.cpp_bin_float/libs/multiprecision/test/math/instances/instances.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/instances/instances.cpp Tue Oct 1 14:12:50 2013 (r86126)
+++ sandbox/multiprecision.cpp_bin_float/libs/multiprecision/test/math/instances/instances.cpp 2013-10-08 13:14:01 EDT (Tue, 08 Oct 2013) (r86203)
@@ -10,5 +10,5 @@
//#define BOOST_MATH_TEST_TYPE double
//#define TEST_GROUP_1
-#include "../../../../math/test/test_instances/test_instances.hpp"
+#include "libs/math/test/test_instances/test_instances.hpp"
Modified: sandbox/multiprecision.cpp_bin_float/libs/multiprecision/test/math/setup.hpp
==============================================================================
--- trunk/libs/multiprecision/test/math/setup.hpp Tue Oct 1 14:12:50 2013 (r86126)
+++ sandbox/multiprecision.cpp_bin_float/libs/multiprecision/test/math/setup.hpp 2013-10-08 13:14:01 EDT (Tue, 08 Oct 2013) (r86203)
@@ -13,11 +13,12 @@
#define BOOST_MATH_SMALL_CONSTANT(x) x
#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) \
- && !defined(TEST_MPFR_50) && !defined(TEST_FLOAT128)
+ && !defined(TEST_MPFR_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT)
# define TEST_MPF_50
# define TEST_MPFR_50
# define TEST_CPP_DEC_FLOAT
# define TEST_FLOAT128
+# define TEST_CPP_BIN_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -91,6 +92,21 @@
#endif
+#ifdef TEST_CPP_BIN_FLOAT
+#include <boost/multiprecision/cpp_bin_float.hpp>
+
+#define CPP_BIN_FLOAT_TESTS /*test(number<cpp_bin_float<53> >(), "number<cpp_bin_float<53> >");*/\
+ test(number<cpp_bin_float<113> >(), "number<cpp_bin_float<113> >");
+
+//typedef boost::multiprecision::number<boost::multiprecision::cpp_bin_float<53> > test_type_1;
+typedef boost::multiprecision::number<boost::multiprecision::cpp_bin_float<113> > test_type_1;
+
+#else
+
+#define CPP_BIN_FLOAT_TESTS
+
+#endif
+
#ifdef TEST_FLOAT128
#include <boost/multiprecision/float128.hpp>
@@ -115,13 +131,15 @@
MPF_TESTS\
MPFR_TESTS\
CPP_DEC_FLOAT_TESTS\
- FLOAT128_TESTS
+ FLOAT128_TESTS\
+ CPP_BIN_FLOAT_TESTS
#define ALL_SMALL_TESTS\
MPF_SMALL_TESTS\
MPFR_TESTS\
CPP_DEC_FLOAT_TESTS\
- FLOAT128_TESTS
+ FLOAT128_TESTS\
+ CPP_BIN_FLOAT_TESTS
#endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk