Defines | Enumerations | Functions
IceFPU.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define AIR(x)   (IR(x)&0x7fffffff)
 Absolute integer representation of a floating-point value.
#define CHECK_VALID_FLOAT(x)   ASSERT(IsValidFloat(x));
#define FCMOVB_ST0   _asm _emit 0xda _asm _emit 0xc0
#define FCMOVB_ST1   _asm _emit 0xda _asm _emit 0xc1
#define FCMOVB_ST2   _asm _emit 0xda _asm _emit 0xc2
#define FCMOVB_ST3   _asm _emit 0xda _asm _emit 0xc3
#define FCMOVB_ST4   _asm _emit 0xda _asm _emit 0xc4
#define FCMOVB_ST5   _asm _emit 0xda _asm _emit 0xc5
#define FCMOVB_ST6   _asm _emit 0xda _asm _emit 0xc6
#define FCMOVB_ST7   _asm _emit 0xda _asm _emit 0xc7
#define FCMOVNB_ST0   _asm _emit 0xdb _asm _emit 0xc0
#define FCMOVNB_ST1   _asm _emit 0xdb _asm _emit 0xc1
#define FCMOVNB_ST2   _asm _emit 0xdb _asm _emit 0xc2
#define FCMOVNB_ST3   _asm _emit 0xdb _asm _emit 0xc3
#define FCMOVNB_ST4   _asm _emit 0xdb _asm _emit 0xc4
#define FCMOVNB_ST5   _asm _emit 0xdb _asm _emit 0xc5
#define FCMOVNB_ST6   _asm _emit 0xdb _asm _emit 0xc6
#define FCMOVNB_ST7   _asm _emit 0xdb _asm _emit 0xc7
#define FCOMI_ST0   _asm _emit 0xdb _asm _emit 0xf0
#define FCOMI_ST1   _asm _emit 0xdb _asm _emit 0xf1
#define FCOMI_ST2   _asm _emit 0xdb _asm _emit 0xf2
#define FCOMI_ST3   _asm _emit 0xdb _asm _emit 0xf3
#define FCOMI_ST4   _asm _emit 0xdb _asm _emit 0xf4
#define FCOMI_ST5   _asm _emit 0xdb _asm _emit 0xf5
#define FCOMI_ST6   _asm _emit 0xdb _asm _emit 0xf6
#define FCOMI_ST7   _asm _emit 0xdb _asm _emit 0xf7
#define FCOMIP_ST0   _asm _emit 0xdf _asm _emit 0xf0
#define FCOMIP_ST1   _asm _emit 0xdf _asm _emit 0xf1
#define FCOMIP_ST2   _asm _emit 0xdf _asm _emit 0xf2
#define FCOMIP_ST3   _asm _emit 0xdf _asm _emit 0xf3
#define FCOMIP_ST4   _asm _emit 0xdf _asm _emit 0xf4
#define FCOMIP_ST5   _asm _emit 0xdf _asm _emit 0xf5
#define FCOMIP_ST6   _asm _emit 0xdf _asm _emit 0xf6
#define FCOMIP_ST7   _asm _emit 0xdf _asm _emit 0xf7
#define FR(x)   ((float&)(x))
 Floating-point representation of an integer value.
#define IR(x)   ((udword&)(x))
 Integer representation of a floating-point value.
#define IS_NEGATIVE_FLOAT(x)   ((x)<0)
#define SIGN_BITMASK   0x80000000
#define SIR(x)   ((sdword&)(x))
 Signed integer representation of a floating-point value.

Enumerations

enum  FPUMode { FPU_FLOOR = 0, FPU_CEIL = 1, FPU_BEST = 2, FPU_FORCE_DWORD = 0x7fffffff }

Functions

inline_ float ComputeFloatEpsilon ()
 This function computes the slowest possible floating-point value (you can also directly use FLT_EPSILON)
inline_ int ConvertToSortable (float f)
inline_ float FastFabs (float x)
inline_ float FastSqrt (float square)
 Fast square root for floating-point values.
inline_ float FCMax2 (float a, float b)
 A global function to find MAX(a,b) using FCOMI/FCMOV.
inline_ float FCMax3 (float a, float b, float c)
 A global function to find MAX(a,b,c) using FCOMI/FCMOV.
inline_ float FCMin2 (float a, float b)
 A global function to find MIN(a,b) using FCOMI/FCMOV.
inline_ float FCMin3 (float a, float b, float c)
 A global function to find MIN(a,b,c) using FCOMI/FCMOV.
inline_ float fepsilon (float f)
 Returns the float ranged espilon value.
inline_ float frsqrt (float f)
 Computes 1.0f / sqrtf(x).
inline_ float fsat (float f)
 Saturates positive to zero.
inline_ float fsqrt (float f)
 TO BE DOCUMENTED.
FUNCTION ICECORE_API FPUMode GetFPUMode ()
FUNCTION ICECORE_API int intCeil (const float &f)
FUNCTION ICECORE_API int intChop (const float &f)
FUNCTION ICECORE_API int intFloor (const float &f)
inline_ float InvSqrt (const float &x)
 Computes 1.0f / sqrtf(x). Comes from NVIDIA.
inline_ bool IsFloatZero (float x, float epsilon=1e-6f)
inline_ bool IsIndeterminate (float value)
inline_ bool IsMinusInf (float value)
inline_ bool IsNAN (float value)
 Is the float valid ?
inline_ bool IsPlusInf (float value)
inline_ bool IsValidFloat (float value)
FUNCTION ICECORE_API void RestoreFPU ()
inline_ float RSqrt (float number)
FUNCTION ICECORE_API void SaveFPU ()
FUNCTION ICECORE_API void SetFPUBestMode ()
FUNCTION ICECORE_API void SetFPUCeilMode ()
FUNCTION ICECORE_API void SetFPUFloorMode ()
FUNCTION ICECORE_API void SetFPUPrecision24 ()
FUNCTION ICECORE_API void SetFPUPrecision53 ()
FUNCTION ICECORE_API void SetFPUPrecision64 ()
FUNCTION ICECORE_API void SetFPURoundingChop ()
FUNCTION ICECORE_API void SetFPURoundingDown ()
FUNCTION ICECORE_API void SetFPURoundingNear ()
FUNCTION ICECORE_API void SetFPURoundingUp ()

Detailed Description

Contains FPU related code.

Author:
Pierre Terdiman
Date:
April, 4, 2000

Definition in file IceFPU.h.


Define Documentation

#define AIR (   x)    (IR(x)&0x7fffffff)

Absolute integer representation of a floating-point value.

Definition at line 24 of file IceFPU.h.

#define CHECK_VALID_FLOAT (   x)    ASSERT(IsValidFloat(x));

Definition at line 140 of file IceFPU.h.

#define FCMOVB_ST0   _asm _emit 0xda _asm _emit 0xc0

Definition at line 188 of file IceFPU.h.

#define FCMOVB_ST1   _asm _emit 0xda _asm _emit 0xc1

Definition at line 193 of file IceFPU.h.

#define FCMOVB_ST2   _asm _emit 0xda _asm _emit 0xc2

Definition at line 198 of file IceFPU.h.

#define FCMOVB_ST3   _asm _emit 0xda _asm _emit 0xc3

Definition at line 203 of file IceFPU.h.

#define FCMOVB_ST4   _asm _emit 0xda _asm _emit 0xc4

Definition at line 208 of file IceFPU.h.

#define FCMOVB_ST5   _asm _emit 0xda _asm _emit 0xc5

Definition at line 213 of file IceFPU.h.

#define FCMOVB_ST6   _asm _emit 0xda _asm _emit 0xc6

Definition at line 218 of file IceFPU.h.

#define FCMOVB_ST7   _asm _emit 0xda _asm _emit 0xc7

Definition at line 223 of file IceFPU.h.

#define FCMOVNB_ST0   _asm _emit 0xdb _asm _emit 0xc0

Definition at line 189 of file IceFPU.h.

#define FCMOVNB_ST1   _asm _emit 0xdb _asm _emit 0xc1

Definition at line 194 of file IceFPU.h.

#define FCMOVNB_ST2   _asm _emit 0xdb _asm _emit 0xc2

Definition at line 199 of file IceFPU.h.

#define FCMOVNB_ST3   _asm _emit 0xdb _asm _emit 0xc3

Definition at line 204 of file IceFPU.h.

#define FCMOVNB_ST4   _asm _emit 0xdb _asm _emit 0xc4

Definition at line 209 of file IceFPU.h.

#define FCMOVNB_ST5   _asm _emit 0xdb _asm _emit 0xc5

Definition at line 214 of file IceFPU.h.

#define FCMOVNB_ST6   _asm _emit 0xdb _asm _emit 0xc6

Definition at line 219 of file IceFPU.h.

#define FCMOVNB_ST7   _asm _emit 0xdb _asm _emit 0xc7

Definition at line 224 of file IceFPU.h.

#define FCOMI_ST0   _asm _emit 0xdb _asm _emit 0xf0

Definition at line 186 of file IceFPU.h.

#define FCOMI_ST1   _asm _emit 0xdb _asm _emit 0xf1

Definition at line 191 of file IceFPU.h.

#define FCOMI_ST2   _asm _emit 0xdb _asm _emit 0xf2

Definition at line 196 of file IceFPU.h.

#define FCOMI_ST3   _asm _emit 0xdb _asm _emit 0xf3

Definition at line 201 of file IceFPU.h.

#define FCOMI_ST4   _asm _emit 0xdb _asm _emit 0xf4

Definition at line 206 of file IceFPU.h.

#define FCOMI_ST5   _asm _emit 0xdb _asm _emit 0xf5

Definition at line 211 of file IceFPU.h.

#define FCOMI_ST6   _asm _emit 0xdb _asm _emit 0xf6

Definition at line 216 of file IceFPU.h.

#define FCOMI_ST7   _asm _emit 0xdb _asm _emit 0xf7

Definition at line 221 of file IceFPU.h.

#define FCOMIP_ST0   _asm _emit 0xdf _asm _emit 0xf0

Definition at line 187 of file IceFPU.h.

#define FCOMIP_ST1   _asm _emit 0xdf _asm _emit 0xf1

Definition at line 192 of file IceFPU.h.

#define FCOMIP_ST2   _asm _emit 0xdf _asm _emit 0xf2

Definition at line 197 of file IceFPU.h.

#define FCOMIP_ST3   _asm _emit 0xdf _asm _emit 0xf3

Definition at line 202 of file IceFPU.h.

#define FCOMIP_ST4   _asm _emit 0xdf _asm _emit 0xf4

Definition at line 207 of file IceFPU.h.

#define FCOMIP_ST5   _asm _emit 0xdf _asm _emit 0xf5

Definition at line 212 of file IceFPU.h.

#define FCOMIP_ST6   _asm _emit 0xdf _asm _emit 0xf6

Definition at line 217 of file IceFPU.h.

#define FCOMIP_ST7   _asm _emit 0xdf _asm _emit 0xf7

Definition at line 222 of file IceFPU.h.

#define FR (   x)    ((float&)(x))

Floating-point representation of an integer value.

Definition at line 27 of file IceFPU.h.

#define IR (   x)    ((udword&)(x))

Integer representation of a floating-point value.

Definition at line 18 of file IceFPU.h.

#define IS_NEGATIVE_FLOAT (   x)    ((x)<0)

Integer-based comparison of a floating point value. Don't use it blindly, it can be faster or slower than the FPU comparison, depends on the context.

Definition at line 32 of file IceFPU.h.

#define SIGN_BITMASK   0x80000000

Definition at line 15 of file IceFPU.h.

#define SIR (   x)    ((sdword&)(x))

Signed integer representation of a floating-point value.

Definition at line 21 of file IceFPU.h.


Enumeration Type Documentation

enum FPUMode
Enumerator:
FPU_FLOOR 
FPU_CEIL 
FPU_BEST 
FPU_FORCE_DWORD 

Definition at line 310 of file IceFPU.h.


Function Documentation

This function computes the slowest possible floating-point value (you can also directly use FLT_EPSILON)

Definition at line 174 of file IceFPU.h.

Definition at line 300 of file IceFPU.h.

inline_ float FastFabs ( float  x)

Fast fabs for floating-point values. It just clears the sign bit. Don't use it blindy, it can be faster or slower than the FPU comparison, depends on the context.

Definition at line 36 of file IceFPU.h.

inline_ float FastSqrt ( float  square)

Fast square root for floating-point values.

Definition at line 43 of file IceFPU.h.

inline_ float FCMax2 ( float  a,
float  b 
)

A global function to find MAX(a,b) using FCOMI/FCMOV.

Definition at line 227 of file IceFPU.h.

inline_ float FCMax3 ( float  a,
float  b,
float  c 
)

A global function to find MAX(a,b,c) using FCOMI/FCMOV.

Definition at line 261 of file IceFPU.h.

inline_ float FCMin2 ( float  a,
float  b 
)

A global function to find MIN(a,b) using FCOMI/FCMOV.

Definition at line 244 of file IceFPU.h.

inline_ float FCMin3 ( float  a,
float  b,
float  c 
)

A global function to find MIN(a,b,c) using FCOMI/FCMOV.

Definition at line 281 of file IceFPU.h.

inline_ float fepsilon ( float  f)

Returns the float ranged espilon value.

Definition at line 116 of file IceFPU.h.

inline_ float frsqrt ( float  f)

Computes 1.0f / sqrtf(x).

Definition at line 69 of file IceFPU.h.

inline_ float fsat ( float  f)

Saturates positive to zero.

Definition at line 62 of file IceFPU.h.

inline_ float fsqrt ( float  f)

TO BE DOCUMENTED.

Definition at line 106 of file IceFPU.h.

inline_ float InvSqrt ( const float &  x)

Computes 1.0f / sqrtf(x). Comes from NVIDIA.

Definition at line 80 of file IceFPU.h.

inline_ bool IsFloatZero ( float  x,
float  epsilon = 1e-6f 
)

Definition at line 181 of file IceFPU.h.

inline_ bool IsIndeterminate ( float  value)

Definition at line 127 of file IceFPU.h.

inline_ bool IsMinusInf ( float  value)

Definition at line 129 of file IceFPU.h.

inline_ bool IsNAN ( float  value)

Is the float valid ?

Definition at line 126 of file IceFPU.h.

inline_ bool IsPlusInf ( float  value)

Definition at line 128 of file IceFPU.h.

inline_ bool IsValidFloat ( float  value)

Definition at line 131 of file IceFPU.h.

inline_ float RSqrt ( float  number)

Computes 1.0f / sqrtf(x). Comes from Quake3. Looks like the first one I had above. See http://www.magic-software.com/3DGEDInvSqrt.html

Definition at line 89 of file IceFPU.h.



openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Apr 11 2019 03:30:19