PPL  1.2
fpu_defs.hh
Go to the documentation of this file.
1 /* Floating point unit related functions.
2  Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it>
3  Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com)
4 
5 This file is part of the Parma Polyhedra Library (PPL).
6 
7 The PPL is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 The PPL is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
20 
21 For the most up-to-date information see the Parma Polyhedra Library
22 site: http://bugseng.com/products/ppl/ . */
23 
24 #ifndef PPL_fpu_defs_hh
25 #define PPL_fpu_defs_hh 1
26 
27 #include "fpu_types.hh"
28 #include "compiler.hh"
29 
30 namespace Parma_Polyhedra_Library {
31 
33 
34 
36 void
38 
42 
44 void
46 
53 
61 
63 void
65 
67 void
69 
76 int
78 
80 
81 } // namespace Parma_Polyhedra_Library
82 
83 #if PPL_CAN_CONTROL_FPU
84 
85 #if defined(__i386__) && (defined(__GNUC__) || defined(__INTEL_COMPILER))
86 #include "fpu-ia32_inlines.hh"
87 #elif defined(PPL_HAVE_IEEEFP_H) \
88  && (defined(__sparc) \
89  || defined(sparc) \
90  || defined(__sparc__))
91 #include "fpu-sparc_inlines.hh"
92 #elif defined(PPL_HAVE_FENV_H)
93 #include "fpu-c99_inlines.hh"
94 #else
95 #error "PPL_CAN_CONTROL_FPU evaluates to true: why?"
96 #endif
97 
98 #else // !PPL_CAN_CONTROL_FPU
99 
100 #include "fpu-none_inlines.hh"
101 
102 #endif // !PPL_CAN_CONTROL_FPU
103 
104 #endif // !defined(PPL_fpu_defs_hh)
fpu_rounding_control_word_type fpu_save_rounding_direction(fpu_rounding_direction_type dir)
Sets the FPU rounding direction to dir and returns the rounding control word previously in use...
int fpu_check_inexact()
Queries the inexact computation status.
fpu_rounding_direction_type fpu_get_rounding_direction()
Returns the current FPU rounding direction.
void fpu_reset_inexact()
Clears the inexact computation status.
void fpu_restore_rounding_direction(fpu_rounding_control_word_type)
Restores the FPU rounding rounding control word to cw.
The entire library is confined to this namespace.
Definition: version.hh:61
void fpu_initialize_control_functions()
Initializes the FPU control functions.
void fpu_set_rounding_direction(fpu_rounding_direction_type dir)
Sets the FPU rounding direction to dir.
fpu_rounding_control_word_type fpu_save_rounding_direction_reset_inexact(fpu_rounding_direction_type dir)
Sets the FPU rounding direction to dir, clears the inexact computation status, and returns the roundi...