]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/boost/boost/numeric/interval/detail/c99_rounding_control.hpp
Add subset of boost library headers needed for compilation on PowerPC
[eurobot/public.git] / src / boost / boost / numeric / interval / detail / c99_rounding_control.hpp
1 /* Boost interval/detail/c99_rounding_control.hpp file
2  *
3  * Copyright 2000 Jens Maurer
4  * Copyright 2002 HervĂ© Brönnimann, Guillaume Melquiond, Sylvain Pion
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_DETAIL_C99_ROUNDING_CONTROL_HPP
12 #define BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP
13
14 #include <boost/numeric/interval/detail/c99sub_rounding_control.hpp>
15
16 namespace boost {
17 namespace numeric {
18 namespace interval_lib {
19
20 template<>
21 struct rounding_control<float>:
22   detail::c99_rounding_control
23 {
24   static float force_rounding(float const &r)
25   { volatile float r_ = r; return r_; }
26 };
27
28 template<>
29 struct rounding_control<double>:
30   detail::c99_rounding_control
31 {
32   static double force_rounding(double const &r)
33   { volatile double r_ = r; return r_; }
34 };
35
36 template<>
37 struct rounding_control<long double>:
38   detail::c99_rounding_control
39 {
40   static long double force_rounding(long double const &r)
41   { volatile long double r_ = r; return r_; }
42 };
43
44 } // namespace interval_lib
45 } // namespace numeric
46 } // namespace boost
47
48 #undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
49
50 #endif // BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP