]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/numeric/interval/hw_rounding.hpp
bump version to 18.2.4-pve3
[ceph.git] / ceph / src / boost / boost / numeric / interval / hw_rounding.hpp
1 /* Boost interval/hw_rounding.hpp template implementation file
2 *
3 * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
4 * Copyright 2005 Guillaume Melquiond
5 *
6 * Distributed under the Boost Software License, Version 1.0.
7 * (See accompanying file LICENSE_1_0.txt or
8 * copy at http://www.boost.org/LICENSE_1_0.txt)
9 */
10
11 #ifndef BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP
12 #define BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP
13
14 #include <boost/config.hpp>
15 #include <boost/numeric/interval/rounding.hpp>
16 #include <boost/numeric/interval/rounded_arith.hpp>
17
18 #define BOOST_NUMERIC_INTERVAL_NO_HARDWARE
19
20 // define appropriate specialization of rounding_control for built-in types
21 #if defined(__x86_64__) && !defined(BOOST_NO_FENV_H)
22 # include <boost/numeric/interval/detail/c99_rounding_control.hpp>
23 #elif defined(__i386__) || defined(_M_IX86) || defined(__BORLANDC__) && !defined(__clang__) || defined(_M_X64)
24 # include <boost/numeric/interval/detail/x86_rounding_control.hpp>
25 #elif defined(__i386) && defined(__SUNPRO_CC)
26 # include <boost/numeric/interval/detail/x86_rounding_control.hpp>
27 #elif defined(powerpc) || defined(__powerpc__) || defined(__ppc__)
28 # include <boost/numeric/interval/detail/ppc_rounding_control.hpp>
29 #elif defined(sparc) || defined(__sparc__)
30 # include <boost/numeric/interval/detail/sparc_rounding_control.hpp>
31 #elif defined(alpha) || defined(__alpha__)
32 # include <boost/numeric/interval/detail/alpha_rounding_control.hpp>
33 #elif defined(ia64) || defined(__ia64) || defined(__ia64__)
34 # include <boost/numeric/interval/detail/ia64_rounding_control.hpp>
35 #endif
36
37 #if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE) && !defined(BOOST_NO_FENV_H)
38 # include <boost/numeric/interval/detail/c99_rounding_control.hpp>
39 #endif
40
41 #if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE)
42 # undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
43 # error Boost.Numeric.Interval: Please specify rounding control mechanism.
44 #endif
45
46 namespace boost {
47 namespace numeric {
48 namespace interval_lib {
49
50 /*
51 * Three specializations of rounded_math<T>
52 */
53
54 template<>
55 struct rounded_math<float>
56 : save_state<rounded_arith_opp<float> >
57 {};
58
59 template<>
60 struct rounded_math<double>
61 : save_state<rounded_arith_opp<double> >
62 {};
63
64 template<>
65 struct rounded_math<long double>
66 : save_state<rounded_arith_opp<long double> >
67 {};
68
69 } // namespace interval_lib
70 } // namespace numeric
71 } // namespace boost
72
73 #endif // BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP