12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #ifndef BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP
- #define BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP
- #include <boost/config.hpp>
- #include <boost/numeric/interval/rounding.hpp>
- #include <boost/numeric/interval/rounded_arith.hpp>
- #define BOOST_NUMERIC_INTERVAL_NO_HARDWARE
- #if defined(__x86_64__) && !defined(BOOST_NO_FENV_H)
- # include <boost/numeric/interval/detail/c99_rounding_control.hpp>
- #elif defined(__i386__) || defined(_M_IX86) || defined(__BORLANDC__) && !defined(__clang__) || defined(_M_X64)
- # include <boost/numeric/interval/detail/x86_rounding_control.hpp>
- #elif defined(__i386) && defined(__SUNPRO_CC)
- # include <boost/numeric/interval/detail/x86_rounding_control.hpp>
- #elif defined(powerpc) || defined(__powerpc__) || defined(__ppc__)
- # include <boost/numeric/interval/detail/ppc_rounding_control.hpp>
- #elif defined(sparc) || defined(__sparc__)
- # include <boost/numeric/interval/detail/sparc_rounding_control.hpp>
- #elif defined(alpha) || defined(__alpha__)
- # include <boost/numeric/interval/detail/alpha_rounding_control.hpp>
- #elif defined(ia64) || defined(__ia64) || defined(__ia64__)
- # include <boost/numeric/interval/detail/ia64_rounding_control.hpp>
- #endif
- #if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE) && !defined(BOOST_NO_FENV_H)
- # include <boost/numeric/interval/detail/c99_rounding_control.hpp>
- #endif
- #if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE)
- # undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
- # error Boost.Numeric.Interval: Please specify rounding control mechanism.
- #endif
- namespace boost {
- namespace numeric {
- namespace interval_lib {
- template<>
- struct rounded_math<float>
- : save_state<rounded_arith_opp<float> >
- {};
- template<>
- struct rounded_math<double>
- : save_state<rounded_arith_opp<double> >
- {};
- template<>
- struct rounded_math<long double>
- : save_state<rounded_arith_opp<long double> >
- {};
- }
- }
- }
- #endif
|