VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
FloatingPoint< RawType > Class Template Reference

#include <AlmostEquals.h>

Public Types

typedef TypeWithSize< sizeof(RawType)>::UInt Bits
 
typedef TypeWithSize< sizeof(RawType)>::UInt Bits
 

Public Member Functions

 FloatingPoint (const RawType &x)
 
const Bitsbits () const
 
Bits exponent_bits () const
 
Bits fraction_bits () const
 
Bits sign_bit () const
 
bool is_nan () const
 
bool AlmostEquals (const FloatingPoint &rhs) const
 
 FloatingPoint (const RawType &x)
 
const Bitsbits () const
 
Bits exponent_bits () const
 
Bits fraction_bits () const
 
Bits sign_bit () const
 
bool is_nan () const
 
bool AlmostEquals (const FloatingPoint &rhs) const
 
float Max ()
 
double Max ()
 
float Max ()
 
double Max ()
 

Static Public Member Functions

static RawType ReinterpretBits (const Bits bits)
 
static RawType Infinity ()
 
static RawType Max ()
 
static RawType ReinterpretBits (const Bits bits)
 
static RawType Infinity ()
 
static RawType Max ()
 

Static Public Attributes

static const size_t kBitCount = 8 * sizeof(RawType)
 
static const size_t kFractionBitCount
 
static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount
 
static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1)
 
static const Bits kFractionBitMask
 
static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask)
 
static const size_t kMaxUlps = 4
 

Detailed Description

template<typename RawType>
class FloatingPoint< RawType >

Definition at line 155 of file AlmostEquals.h.

Member Typedef Documentation

◆ Bits [1/2]

Definition at line 159 of file AlmostEquals.h.

◆ Bits [2/2]

Definition at line 159 of file AlmostEquals.h.

Constructor & Destructor Documentation

◆ FloatingPoint() [1/2]

template<typename RawType >
FloatingPoint< RawType >::FloatingPoint ( const RawType x)
inlineexplicit

Definition at line 203 of file AlmostEquals.h.

◆ FloatingPoint() [2/2]

template<typename RawType >
FloatingPoint< RawType >::FloatingPoint ( const RawType x)
inlineexplicit

Definition at line 203 of file AlmostEquals.h.

Member Function Documentation

◆ AlmostEquals() [1/2]

template<typename RawType >
bool FloatingPoint< RawType >::AlmostEquals ( const FloatingPoint< RawType > &  rhs) const
inline

Definition at line 251 of file AlmostEquals.h.

◆ AlmostEquals() [2/2]

template<typename RawType >
bool FloatingPoint< RawType >::AlmostEquals ( const FloatingPoint< RawType > &  rhs) const
inline

Definition at line 251 of file AlmostEquals.h.

◆ bits() [1/2]

template<typename RawType >
const Bits & FloatingPoint< RawType >::bits ( ) const
inline

Definition at line 227 of file AlmostEquals.h.

◆ bits() [2/2]

template<typename RawType >
const Bits & FloatingPoint< RawType >::bits ( ) const
inline

Definition at line 227 of file AlmostEquals.h.

◆ exponent_bits() [1/2]

template<typename RawType >
Bits FloatingPoint< RawType >::exponent_bits ( ) const
inline

Definition at line 230 of file AlmostEquals.h.

◆ exponent_bits() [2/2]

template<typename RawType >
Bits FloatingPoint< RawType >::exponent_bits ( ) const
inline

Definition at line 230 of file AlmostEquals.h.

◆ fraction_bits() [1/2]

template<typename RawType >
Bits FloatingPoint< RawType >::fraction_bits ( ) const
inline

Definition at line 233 of file AlmostEquals.h.

◆ fraction_bits() [2/2]

template<typename RawType >
Bits FloatingPoint< RawType >::fraction_bits ( ) const
inline

Definition at line 233 of file AlmostEquals.h.

◆ Infinity() [1/2]

template<typename RawType >
static RawType FloatingPoint< RawType >::Infinity ( )
inlinestatic

Definition at line 217 of file AlmostEquals.h.

◆ Infinity() [2/2]

template<typename RawType >
static RawType FloatingPoint< RawType >::Infinity ( )
inlinestatic

Definition at line 217 of file AlmostEquals.h.

◆ is_nan() [1/2]

template<typename RawType >
bool FloatingPoint< RawType >::is_nan ( ) const
inline

Definition at line 239 of file AlmostEquals.h.

◆ is_nan() [2/2]

template<typename RawType >
bool FloatingPoint< RawType >::is_nan ( ) const
inline

Definition at line 239 of file AlmostEquals.h.

◆ Max() [1/6]

template<typename RawType >
static RawType FloatingPoint< RawType >::Max ( )
static

◆ Max() [2/6]

float FloatingPoint< float >::Max ( )
inline

Definition at line 308 of file AlmostEquals.h.

◆ Max() [3/6]

double FloatingPoint< double >::Max ( )
inline

Definition at line 310 of file AlmostEquals.h.

◆ Max() [4/6]

template<typename RawType >
static RawType FloatingPoint< RawType >::Max ( )
static

◆ Max() [5/6]

float FloatingPoint< float >::Max ( )
inline

Definition at line 308 of file AlmostEquals.h.

◆ Max() [6/6]

double FloatingPoint< double >::Max ( )
inline

Definition at line 310 of file AlmostEquals.h.

◆ ReinterpretBits() [1/2]

template<typename RawType >
static RawType FloatingPoint< RawType >::ReinterpretBits ( const Bits  bits)
inlinestatic

Definition at line 210 of file AlmostEquals.h.

◆ ReinterpretBits() [2/2]

template<typename RawType >
static RawType FloatingPoint< RawType >::ReinterpretBits ( const Bits  bits)
inlinestatic

Definition at line 210 of file AlmostEquals.h.

◆ sign_bit() [1/2]

template<typename RawType >
Bits FloatingPoint< RawType >::sign_bit ( ) const
inline

Definition at line 236 of file AlmostEquals.h.

◆ sign_bit() [2/2]

template<typename RawType >
Bits FloatingPoint< RawType >::sign_bit ( ) const
inline

Definition at line 236 of file AlmostEquals.h.

Member Data Documentation

◆ kBitCount

template<typename RawType >
static const size_t FloatingPoint< RawType >::kBitCount = 8 * sizeof(RawType)
static

Definition at line 164 of file AlmostEquals.h.

◆ kExponentBitCount

template<typename RawType >
static const size_t FloatingPoint< RawType >::kExponentBitCount = kBitCount - 1 - kFractionBitCount
static

Definition at line 171 of file AlmostEquals.h.

◆ kExponentBitMask

template<typename RawType >
static const Bits FloatingPoint< RawType >::kExponentBitMask = ~(kSignBitMask | kFractionBitMask)
static

Definition at line 181 of file AlmostEquals.h.

◆ kFractionBitCount

template<typename RawType >
static const size_t FloatingPoint< RawType >::kFractionBitCount
static
Initial value:
=
std::numeric_limits<RawType>::digits - 1

Definition at line 167 of file AlmostEquals.h.

◆ kFractionBitMask

template<typename RawType >
static const Bits FloatingPoint< RawType >::kFractionBitMask
static
Initial value:
=
static const size_t kExponentBitCount
std::shared_ptr< T > SPtr

Definition at line 177 of file AlmostEquals.h.

◆ kMaxUlps

template<typename RawType >
static const size_t FloatingPoint< RawType >::kMaxUlps = 4
static

Definition at line 195 of file AlmostEquals.h.

◆ kSignBitMask

template<typename RawType >
static const Bits FloatingPoint< RawType >::kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1)
static

Definition at line 174 of file AlmostEquals.h.


The documentation for this class was generated from the following files: