RetroArch
Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
internal::BigInteger Class Reference

#include <biginteger.h>

Collaboration diagram for internal::BigInteger:
[legend]

Public Types

typedef uint64_t Type
 

Public Member Functions

 BigInteger (const BigInteger &rhs)
 
 BigInteger (uint64_t u)
 
 BigInteger (const char *decimals, size_t length)
 
BigIntegeroperator= (const BigInteger &rhs)
 
BigIntegeroperator= (uint64_t u)
 
BigIntegeroperator+= (uint64_t u)
 
BigIntegeroperator*= (uint64_t u)
 
BigIntegeroperator*= (uint32_t u)
 
BigIntegeroperator<<= (size_t shift)
 
bool operator== (const BigInteger &rhs) const
 
bool operator== (const Type rhs) const
 
BigIntegerMultiplyPow5 (unsigned exp)
 
bool Difference (const BigInteger &rhs, BigInteger *out) const
 
int Compare (const BigInteger &rhs) const
 
size_t GetCount () const
 
Type GetDigit (size_t index) const
 
bool IsZero () const
 

Private Member Functions

void AppendDecimal64 (const char *begin, const char *end)
 
void PushBack (Type digit)
 

Static Private Member Functions

static uint64_t ParseUint64 (const char *begin, const char *end)
 
static uint64_t MulAdd64 (uint64_t a, uint64_t b, uint64_t k, uint64_t *outHigh)
 

Private Attributes

Type digits_ [kCapacity]
 
size_t count_
 

Static Private Attributes

static const size_t kBitCount = 3328
 
static const size_t kCapacity = kBitCount / sizeof(Type)
 
static const size_t kTypeBit = sizeof(Type) * 8
 

Member Typedef Documentation

◆ Type

Constructor & Destructor Documentation

◆ BigInteger() [1/3]

internal::BigInteger::BigInteger ( const BigInteger rhs)
inline
Here is the call graph for this function:

◆ BigInteger() [2/3]

internal::BigInteger::BigInteger ( uint64_t  u)
inlineexplicit

◆ BigInteger() [3/3]

internal::BigInteger::BigInteger ( const char *  decimals,
size_t  length 
)
inline
Here is the call graph for this function:

Member Function Documentation

◆ AppendDecimal64()

void internal::BigInteger::AppendDecimal64 ( const char *  begin,
const char *  end 
)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Compare()

int internal::BigInteger::Compare ( const BigInteger rhs) const
inline
Here is the caller graph for this function:

◆ Difference()

bool internal::BigInteger::Difference ( const BigInteger rhs,
BigInteger out 
) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCount()

size_t internal::BigInteger::GetCount ( ) const
inline

◆ GetDigit()

Type internal::BigInteger::GetDigit ( size_t  index) const
inline

◆ IsZero()

bool internal::BigInteger::IsZero ( ) const
inline
Here is the caller graph for this function:

◆ MulAdd64()

static uint64_t internal::BigInteger::MulAdd64 ( uint64_t  a,
uint64_t  b,
uint64_t  k,
uint64_t outHigh 
)
inlinestaticprivate
Here is the caller graph for this function:

◆ MultiplyPow5()

BigInteger& internal::BigInteger::MultiplyPow5 ( unsigned  exp)
inline
Here is the caller graph for this function:

◆ operator*=() [1/2]

BigInteger& internal::BigInteger::operator*= ( uint64_t  u)
inline
Here is the call graph for this function:

◆ operator*=() [2/2]

BigInteger& internal::BigInteger::operator*= ( uint32_t  u)
inline
Here is the call graph for this function:

◆ operator+=()

BigInteger& internal::BigInteger::operator+= ( uint64_t  u)
inline
Here is the call graph for this function:

◆ operator<<=()

BigInteger& internal::BigInteger::operator<<= ( size_t  shift)
inline
Here is the call graph for this function:

◆ operator=() [1/2]

BigInteger& internal::BigInteger::operator= ( const BigInteger rhs)
inline
Here is the call graph for this function:

◆ operator=() [2/2]

BigInteger& internal::BigInteger::operator= ( uint64_t  u)
inline

◆ operator==() [1/2]

bool internal::BigInteger::operator== ( const BigInteger rhs) const
inline
Here is the call graph for this function:

◆ operator==() [2/2]

bool internal::BigInteger::operator== ( const Type  rhs) const
inline

◆ ParseUint64()

static uint64_t internal::BigInteger::ParseUint64 ( const char *  begin,
const char *  end 
)
inlinestaticprivate
Here is the caller graph for this function:

◆ PushBack()

void internal::BigInteger::PushBack ( Type  digit)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ count_

size_t internal::BigInteger::count_
private

◆ digits_

Type internal::BigInteger::digits_[kCapacity]
private

◆ kBitCount

const size_t internal::BigInteger::kBitCount = 3328
staticprivate

◆ kCapacity

const size_t internal::BigInteger::kCapacity = kBitCount / sizeof(Type)
staticprivate

◆ kTypeBit

const size_t internal::BigInteger::kTypeBit = sizeof(Type) * 8
staticprivate

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