HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IexMathFpu.h
Go to the documentation of this file.
1 #ifndef INCLUDED_IEXMATHFPU_H
2 #define INCLUDED_IEXMATHFPU_H
3 
4 ///////////////////////////////////////////////////////////////////////////
5 //
6 // Copyright (c) 1997, Industrial Light & Magic, a division of Lucas
7 // Digital Ltd. LLC
8 //
9 // All rights reserved.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 // * Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 // * Redistributions in binary form must reproduce the above
17 // copyright notice, this list of conditions and the following disclaimer
18 // in the documentation and/or other materials provided with the
19 // distribution.
20 // * Neither the name of Industrial Light & Magic nor the names of
21 // its contributors may be used to endorse or promote products derived
22 // from this software without specific prior written permission.
23 //
24 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 //
36 ///////////////////////////////////////////////////////////////////////////
37 
38 
39 //------------------------------------------------------------------------
40 //
41 // Functions to control floating point exceptions.
42 //
43 //------------------------------------------------------------------------
44 
45 #include "IexMathIeeeExc.h"
46 #include "IexNamespace.h"
47 
49 
50 
51 //-----------------------------------------
52 // setFpExceptions() defines which floating
53 // point exceptions cause SIGFPE signals.
54 //-----------------------------------------
55 
57 
58 
59 //----------------------------------------
60 // fpExceptions() tells you which floating
61 // point exceptions cause SIGFPE signals.
62 //----------------------------------------
63 
64 int fpExceptions ();
65 
66 
67 //------------------------------------------
68 // setFpExceptionHandler() defines a handler
69 // that will be called when SIGFPE occurs.
70 //------------------------------------------
71 
72 extern "C" typedef void (* FpExceptionHandler) (int type, const char explanation[]);
73 
75 
76 // -----------------------------------------
77 // handleExceptionsSetInRegisters() examines
78 // the exception registers and calls the
79 // floating point exception handler if the
80 // bits are set. This function exists to
81 // allow trapping of exception register states
82 // that can get set though no SIGFPE occurs.
83 // -----------------------------------------
84 
86 
87 
89 
90 
91 #endif
IEX_INTERNAL_NAMESPACE_HEADER_ENTER void setFpExceptions(int when=(IEEE_OVERFLOW|IEEE_DIVZERO|IEEE_INVALID))
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
void setFpExceptionHandler(FpExceptionHandler handler)
void(* FpExceptionHandler)(int type, const char explanation[])
Definition: IexMathFpu.h:72
#define IEX_INTERNAL_NAMESPACE_HEADER_ENTER
Definition: IexNamespace.h:106
void handleExceptionsSetInRegisters()
#define IEX_INTERNAL_NAMESPACE_HEADER_EXIT
Definition: IexNamespace.h:107
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
int fpExceptions()