Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52750 - in sandbox/numeric_adaptor: boost/numeric_adaptor libs/numeric_adaptor/test
From: bruno.lalande_at_[hidden]
Date: 2009-05-03 17:28:41


Author: bruno.lalande
Date: 2009-05-03 17:28:40 EDT (Sun, 03 May 2009)
New Revision: 52750
URL: http://svn.boost.org/trac/boost/changeset/52750

Log:
Explicitly reduced CLN policies to only cl_FF and cl_DF.
Text files modified:
   sandbox/numeric_adaptor/boost/numeric_adaptor/cln_policy.hpp | 10 ++++++++++
   sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_heron.cpp | 7 +++----
   2 files changed, 13 insertions(+), 4 deletions(-)

Modified: sandbox/numeric_adaptor/boost/numeric_adaptor/cln_policy.hpp
==============================================================================
--- sandbox/numeric_adaptor/boost/numeric_adaptor/cln_policy.hpp (original)
+++ sandbox/numeric_adaptor/boost/numeric_adaptor/cln_policy.hpp 2009-05-03 17:28:40 EDT (Sun, 03 May 2009)
@@ -16,6 +16,9 @@
 #include <cln/float.h>
 
 
+namespace impl {
+
+
 template <typename ClnType>
 struct cln_policy: ieee_policy<ClnType>
 {
@@ -32,4 +35,11 @@
 };
 
 
+} // namespace impl
+
+
+typedef impl::cln_policy<cln::cl_FF> cln_ff_policy;
+typedef impl::cln_policy<cln::cl_DF> cln_df_policy;
+
+
 #endif

Modified: sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_heron.cpp
==============================================================================
--- sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_heron.cpp (original)
+++ sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_heron.cpp 2009-05-03 17:28:40 EDT (Sun, 03 May 2009)
@@ -34,10 +34,9 @@
         BOOST_CHECK_CLOSE(heron<ieee_policy<float> >(), 0.0, epsilon);
         BOOST_CHECK_CLOSE(heron<ieee_policy<double> >(), 0.327490532778257, epsilon);
         BOOST_CHECK_CLOSE(heron<ieee_policy<long double> >(), 0.327490459921098, epsilon);
- //BOOST_CHECK_CLOSE(heron<cln_policy<cln::cl_SF> >(), 0.327490532778257, epsilon);
- BOOST_CHECK_CLOSE(heron<cln_policy<cln::cl_FF> >(), 0.0, epsilon);
- BOOST_CHECK_CLOSE(heron<cln_policy<cln::cl_DF> >(), 0.32749053277825713, epsilon);
- //BOOST_CHECK_CLOSE(heron<cln_policy<cln::cl_LF> >(), 0.0, epsilon);
+ BOOST_CHECK_CLOSE(heron<cln_ff_policy>(), 0.0, epsilon);
+ BOOST_CHECK_CLOSE(heron<cln_df_policy>(), 0.32749053277825713, epsilon);
+ //TODO cln_lf_policy
         BOOST_CHECK_CLOSE(heron<gmp_policy>(), 0.327490459942623, epsilon);
 
         return 0;


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