NGL  6.5
The NCCA Graphics Library
internal Namespace Reference

Classes

class  BigInteger
 
struct  DiyFp
 
class  Double
 
struct  IsGenericValue
 
struct  IsGenericValueImpl
 
struct  IsGenericValueImpl< T, typename Void< typename T::EncodingType >::Type, typename Void< typename T::AllocatorType >::Type >
 
class  Stack
 A type-unsafe stack for storing different types of data. More...
 
class  StreamLocalCopy
 
class  StreamLocalCopy< Stream, 0 >
 Keep reference. More...
 
class  StreamLocalCopy< Stream, 1 >
 Do copy optimization. More...
 

Functions

DiyFp GetCachedPowerByIndex (size_t index)
 
DiyFp GetCachedPower (int e, int *K)
 
DiyFp GetCachedPower10 (int exp, int *outExp)
 
void GrisuRound (char *buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t wp_w)
 
unsigned CountDecimalDigit32 (uint32_t n)
 
void DigitGen (const DiyFp &W, const DiyFp &Mp, uint64_t delta, char *buffer, int *len, int *K)
 
void Grisu2 (double value, char *buffer, int *length, int *K)
 
char * WriteExponent (int K, char *buffer)
 
char * Prettify (char *buffer, int length, int k)
 
char * dtoa (double value, char *buffer)
 
const char * GetDigitsLut ()
 
char * u32toa (uint32_t value, char *buffer)
 
char * i32toa (int32_t value, char *buffer)
 
char * u64toa (uint64_t value, char *buffer)
 
char * i64toa (int64_t value, char *buffer)
 
double Pow10 (int n)
 Computes integer powers of 10 in double (10.0^n). More...
 
template<typename Ch >
SizeType StrLen (const Ch *s)
 Custom strlen() which works on different character types. More...
 
double FastPath (double significand, int exp)
 
double StrtodNormalPrecision (double d, int p)
 
template<typename T >
Min3 (T a, T b, T c)
 
int CheckWithinHalfULP (double b, const BigInteger &d, int dExp)
 
bool StrtodFast (double d, int p, double *result)
 
bool StrtodDiyFp (const char *decimals, size_t length, size_t decimalPosition, int exp, double *result)
 
double StrtodBigInteger (double approx, const char *decimals, size_t length, size_t decimalPosition, int exp)
 
double StrtodFullPrecision (double d, int p, const char *decimals, size_t length, size_t decimalPosition, int exp)
 
template<typename T >
void Swap (T &a, T &b) RAPIDJSON_NOEXCEPT
 Custom swap() to avoid dependency on C++ <algorith> header. More...
 

Function Documentation

int internal::CheckWithinHalfULP ( double  b,
const BigInteger d,
int  dExp 
)
inline

Definition at line 55 of file strtod.h.

References internal::BigInteger::Compare(), internal::BigInteger::Difference(), internal::Double::IntegerExponent(), internal::Double::IntegerSignificand(), Min3(), and internal::BigInteger::MultiplyPow5().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned internal::CountDecimalDigit32 ( uint32_t  n)
inline

Definition at line 43 of file dtoa.h.

+ Here is the caller graph for this function:

void internal::DigitGen ( const DiyFp W,
const DiyFp Mp,
uint64_t  delta,
char *  buffer,
int len,
int K 
)
inline

Definition at line 59 of file dtoa.h.

References CountDecimalDigit32(), internal::DiyFp::e, internal::DiyFp::f, and GrisuRound().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* internal::dtoa ( double  value,
char *  buffer 
)
inline

Definition at line 189 of file dtoa.h.

References Grisu2(), internal::Double::IsZero(), Prettify(), RAPIDJSON_NAMESPACE_END, and internal::Double::Sign().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double internal::FastPath ( double  significand,
int  exp 
)
inline

Definition at line 27 of file strtod.h.

References Pow10().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

DiyFp internal::GetCachedPower ( int  e,
int K 
)
inline

Definition at line 221 of file diyfp.h.

References internal::DiyFp::e, and GetCachedPowerByIndex().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

DiyFp internal::GetCachedPower10 ( int  exp,
int outExp 
)
inline

Definition at line 235 of file diyfp.h.

References GetCachedPowerByIndex(), and RAPIDJSON_NAMESPACE_END.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

DiyFp internal::GetCachedPowerByIndex ( size_t  index)
inline

Definition at line 159 of file diyfp.h.

References internal::DiyFp::DiyFp(), and RAPIDJSON_UINT64_C2.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const char* internal::GetDigitsLut ( )
inline

Definition at line 23 of file itoa.h.

+ Here is the caller graph for this function:

void internal::Grisu2 ( double  value,
char *  buffer,
int length,
int K 
)
inline

Definition at line 110 of file dtoa.h.

References DigitGen(), internal::DiyFp::e, internal::DiyFp::f, GetCachedPower(), internal::DiyFp::Normalize(), and internal::DiyFp::NormalizedBoundaries().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void internal::GrisuRound ( char *  buffer,
int  len,
uint64_t  delta,
uint64_t  rest,
uint64_t  ten_kappa,
uint64_t  wp_w 
)
inline

closer

Definition at line 34 of file dtoa.h.

+ Here is the caller graph for this function:

char* internal::i32toa ( int32_t  value,
char *  buffer 
)
inline

Definition at line 113 of file itoa.h.

References u32toa().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* internal::i64toa ( int64_t  value,
char *  buffer 
)
inline

Definition at line 291 of file itoa.h.

References RAPIDJSON_NAMESPACE_END, and u64toa().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
T internal::Min3 ( a,
b,
c 
)
inline

Definition at line 48 of file strtod.h.

+ Here is the caller graph for this function:

double internal::Pow10 ( int  n)
inline

Computes integer powers of 10 in double (10.0^n).

This function uses lookup table for fast and accurate results.

Parameters
nnon-negative exponent. Must <= 308.
Returns
10.0^n

Definition at line 28 of file pow10.h.

References RAPIDJSON_ASSERT, and RAPIDJSON_NAMESPACE_END.

+ Here is the caller graph for this function:

char* internal::Prettify ( char *  buffer,
int  length,
int  k 
)
inline

Definition at line 148 of file dtoa.h.

References WriteExponent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename Ch >
SizeType internal::StrLen ( const Ch *  s)
inline

Custom strlen() which works on different character types.

Template Parameters
ChCharacter type (e.g. char, wchar_t, short)
Parameters
sNull-terminated input string.
Returns
Number of characters in the string.
Note
This has the same semantics as strlen(), the return value is not number of Unicode codepoints.

Definition at line 30 of file strfunc.h.

References RAPIDJSON_NAMESPACE_END, and SizeType.

+ Here is the caller graph for this function:

double internal::StrtodBigInteger ( double  approx,
const char *  decimals,
size_t  length,
size_t  decimalPosition,
int  exp 
)
inline

Definition at line 207 of file strtod.h.

References CheckWithinHalfULP(), int(), internal::Double::NextPositiveDouble(), internal::Double::Significand(), and internal::Double::Value().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool internal::StrtodDiyFp ( const char *  decimals,
size_t  length,
size_t  decimalPosition,
int  exp,
double *  result 
)
inline
bool internal::StrtodFast ( double  d,
int  p,
double *  result 
)
inline

Definition at line 112 of file strtod.h.

References FastPath(), and Pow10().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double internal::StrtodFullPrecision ( double  d,
int  p,
const char *  decimals,
size_t  length,
size_t  decimalPosition,
int  exp 
)
inline

Definition at line 225 of file strtod.h.

References int(), RAPIDJSON_ASSERT, RAPIDJSON_NAMESPACE_END, StrtodBigInteger(), StrtodDiyFp(), and StrtodFast().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double internal::StrtodNormalPrecision ( double  d,
int  p 
)
inline

Definition at line 36 of file strtod.h.

References FastPath().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
void internal::Swap ( T &  a,
T &  b 
)
inline

Custom swap() to avoid dependency on C++ <algorith> header.

Template Parameters
TType of the arguments to swap, should be instantiated with primitive C++ types only.
Note
This has the same semantics as std::swap().

Definition at line 28 of file swap.h.

References RAPIDJSON_NAMESPACE_END.

+ Here is the caller graph for this function:

char* internal::u32toa ( uint32_t  value,
char *  buffer 
)
inline

Definition at line 39 of file itoa.h.

References GetDigitsLut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* internal::u64toa ( uint64_t  value,
char *  buffer 
)
inline

Definition at line 123 of file itoa.h.

References GetDigitsLut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* internal::WriteExponent ( int  K,
char *  buffer 
)
inline

Definition at line 124 of file dtoa.h.

References GetDigitsLut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: