Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
testing::internal::FloatingPoint< RawType > Class Template Reference

#include <JETSCAPE/blob/main/external_packages/googletest/googletest/include/gtest/internal/gtest-internal.h>

+ Collaboration diagram for testing::internal::FloatingPoint< RawType >:

Classes

union  FloatingPointUnion
 

Public Types

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
 
template<>
float Max ()
 
template<>
double Max ()
 

Static Public Member Functions

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
 

Static Private Member Functions

static Bits SignAndMagnitudeToBiased (const Bits &sam)
 
static Bits DistanceBetweenSignAndMagnitudeNumbers (const Bits &sam1, const Bits &sam2)
 

Private Attributes

FloatingPointUnion u_
 

Detailed Description

template<typename RawType>
class testing::internal::FloatingPoint< RawType >

Definition at line 262 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 262 of file gtest-internal.h

Member Typedef Documentation

template<typename RawType>
typedef TypeWithSize<sizeof(RawType)>::UInt testing::internal::FloatingPoint< RawType >::Bits

Definition at line 266 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 266 of file gtest-internal.h

Constructor & Destructor Documentation

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

Member Function Documentation

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

Definition at line 358 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 358 of file gtest-internal.h

References testing::internal::FloatingPoint< RawType >::FloatingPointUnion::bits_, testing::internal::FloatingPoint< RawType >::DistanceBetweenSignAndMagnitudeNumbers(), testing::internal::FloatingPoint< RawType >::is_nan(), testing::internal::FloatingPoint< RawType >::kMaxUlps, and testing::internal::FloatingPoint< RawType >::u_.

+ Here is the call graph for this function:

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

Definition at line 334 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 334 of file gtest-internal.h

References testing::internal::FloatingPoint< RawType >::FloatingPointUnion::bits_, and testing::internal::FloatingPoint< RawType >::u_.

Referenced by testing::internal::FloatingPoint< RawType >::ReinterpretBits().

+ Here is the caller graph for this function:

template<typename RawType>
static Bits testing::internal::FloatingPoint< RawType >::DistanceBetweenSignAndMagnitudeNumbers ( const Bits sam1,
const Bits sam2 
)
inlinestaticprivate

Definition at line 401 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 401 of file gtest-internal.h

References testing::internal::FloatingPoint< RawType >::SignAndMagnitudeToBiased().

Referenced by testing::internal::FloatingPoint< RawType >::AlmostEquals().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 337 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 337 of file gtest-internal.h

References testing::internal::FloatingPoint< RawType >::FloatingPointUnion::bits_, testing::internal::FloatingPoint< RawType >::kExponentBitMask, and testing::internal::FloatingPoint< RawType >::u_.

Referenced by testing::internal::FloatingPoint< RawType >::is_nan().

+ Here is the caller graph for this function:

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

Definition at line 340 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 340 of file gtest-internal.h

References testing::internal::FloatingPoint< RawType >::FloatingPointUnion::bits_, testing::internal::FloatingPoint< RawType >::kFractionBitMask, and testing::internal::FloatingPoint< RawType >::u_.

Referenced by testing::internal::FloatingPoint< RawType >::is_nan().

+ Here is the caller graph for this function:

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

Definition at line 324 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 324 of file gtest-internal.h

References testing::internal::FloatingPoint< RawType >::kExponentBitMask, and testing::internal::FloatingPoint< RawType >::ReinterpretBits().

+ Here is the call graph for this function:

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

Definition at line 346 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 346 of file gtest-internal.h

References testing::internal::FloatingPoint< RawType >::exponent_bits(), testing::internal::FloatingPoint< RawType >::fraction_bits(), and testing::internal::FloatingPoint< RawType >::kExponentBitMask.

Referenced by testing::internal::FloatingPoint< RawType >::AlmostEquals(), and testing::internal::FloatingEqMatcher< FloatType >::Impl< T >::MatchAndExplain().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename RawType>
static RawType testing::internal::FloatingPoint< RawType >::Max ( )
static
template<>
float testing::internal::FloatingPoint< float >::Max ( )
inline

Definition at line 414 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 414 of file gtest-internal.h

template<>
double testing::internal::FloatingPoint< double >::Max ( )
inline

Definition at line 416 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 416 of file gtest-internal.h

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

Definition at line 317 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 317 of file gtest-internal.h

References testing::internal::FloatingPoint< RawType >::bits(), testing::internal::FloatingPoint< RawType >::FloatingPointUnion::bits_, testing::internal::FloatingPoint< RawType >::u_, and testing::internal::FloatingPoint< RawType >::FloatingPointUnion::value_.

Referenced by testing::gmock_matchers_test::FloatingPointTest< RawType >::AsBits(), and testing::internal::FloatingPoint< RawType >::Infinity().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename RawType>
Bits testing::internal::FloatingPoint< RawType >::sign_bit ( ) const
inline
template<typename RawType>
static Bits testing::internal::FloatingPoint< RawType >::SignAndMagnitudeToBiased ( const Bits sam)
inlinestaticprivate

Definition at line 389 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 389 of file gtest-internal.h

References testing::internal::FloatingPoint< RawType >::kSignBitMask.

Referenced by testing::internal::FloatingPoint< RawType >::DistanceBetweenSignAndMagnitudeNumbers().

+ Here is the caller graph for this function:

Member Data Documentation

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

Definition at line 271 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 271 of file gtest-internal.h

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

Definition at line 278 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 278 of file gtest-internal.h

template<typename RawType>
const Bits testing::internal::FloatingPoint< RawType >::kExponentBitMask = ~(kSignBitMask | kFractionBitMask)
static
template<typename RawType>
const size_t testing::internal::FloatingPoint< RawType >::kFractionBitCount
static
Initial value:
=
std::numeric_limits<RawType>::digits - 1

Definition at line 274 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 274 of file gtest-internal.h

template<typename RawType>
const Bits testing::internal::FloatingPoint< RawType >::kFractionBitMask
static
Initial value:
=
~static_cast<Bits>(0) >> (kExponentBitCount + 1)

Definition at line 284 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 284 of file gtest-internal.h

Referenced by testing::internal::FloatingPoint< RawType >::fraction_bits().

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

Definition at line 302 of file gtest-internal.h.

View newest version in sPHENIX GitHub at line 302 of file gtest-internal.h

Referenced by testing::internal::FloatingPoint< RawType >::AlmostEquals().

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

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