Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
detail::bigint Class Reference

#include <format.h>

Public Member Functions

FMT_CONSTEXPR20 void align (const bigint &other)
 
FMT_CONSTEXPR20 void assign (const bigint &other)
 
FMT_CONSTEXPR20 void assign_pow10 (int exp)
 
FMT_CONSTEXPR20 bigint ()
 
 bigint (const bigint &)=delete
 
 bigint (uint64_t n)
 
FMT_CONSTEXPR20 auto divmod_assign (const bigint &divisor) -> int
 
FMT_CONSTEXPR20 auto num_bigits () const -> int
 
template<typename Int >
FMT_CONSTEXPR20 auto operator*= (Int value) -> bigint &
 
FMT_NOINLINE FMT_CONSTEXPR20 auto operator<<= (int shift) -> bigint &
 
void operator= (const bigint &)=delete
 
template<typename Int >
FMT_CONSTEXPR20 void operator= (Int n)
 
FMT_CONSTEXPR20 void square ()
 

Private Types

enum  { bigits_capacity = 32 }
 
using bigit = uint32_t
 
using double_bigit = uint64_t
 

Private Member Functions

template<typename UInt , FMT_ENABLE_IF(std::is_same< UInt, uint64_t >::value|| std::is_same< UInt, uint128_t >::value) >
FMT_CONSTEXPR20 void assign (UInt n)
 
template<typename UInt , FMT_ENABLE_IF(std::is_same< UInt, uint64_t >::value|| std::is_same< UInt, uint128_t >::value) >
FMT_CONSTEXPR20 void multiply (UInt value)
 
FMT_CONSTEXPR20 void multiply (uint32_t value)
 
FMT_CONSTEXPR20 auto operator[] (int index) -> bigit &
 
FMT_CONSTEXPR20 auto operator[] (int index) const -> bigit
 
FMT_CONSTEXPR20 void remove_leading_zeros ()
 
FMT_CONSTEXPR20 void subtract_aligned (const bigint &other)
 
FMT_CONSTEXPR20 void subtract_bigits (int index, bigit other, bigit &borrow)
 

Private Attributes

basic_memory_buffer< bigit, bigits_capacitybigits_
 
int exp_
 

Static Private Attributes

static constexpr const int bigit_bits = num_bits<bigit>()
 

Friends

FMT_CONSTEXPR20 auto add_compare (const bigint &lhs1, const bigint &lhs2, const bigint &rhs) -> int
 
FMT_CONSTEXPR20 auto compare (const bigint &lhs, const bigint &rhs) -> int
 
struct formatter< bigint >
 

Detailed Description

Definition at line 2781 of file format.h.

Member Typedef Documentation

◆ bigit

using detail::bigint::bigit = uint32_t
private

Definition at line 2785 of file format.h.

◆ double_bigit

using detail::bigint::double_bigit = uint64_t
private

Definition at line 2786 of file format.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
bigits_capacity 

Definition at line 2787 of file format.h.

Constructor & Destructor Documentation

◆ bigint() [1/3]

FMT_CONSTEXPR20 detail::bigint::bigint ( )
inline

Definition at line 2871 of file format.h.

◆ bigint() [2/3]

detail::bigint::bigint ( uint64_t  n)
inlineexplicit

Definition at line 2872 of file format.h.

◆ bigint() [3/3]

detail::bigint::bigint ( const bigint )
delete

Member Function Documentation

◆ align()

FMT_CONSTEXPR20 void detail::bigint::align ( const bigint other)
inline

Definition at line 3010 of file format.h.

◆ assign() [1/2]

FMT_CONSTEXPR20 void detail::bigint::assign ( const bigint other)
inline

Definition at line 2877 of file format.h.

◆ assign() [2/2]

template<typename UInt , FMT_ENABLE_IF(std::is_same< UInt, uint64_t >::value|| std::is_same< UInt, uint128_t >::value) >
FMT_CONSTEXPR20 void detail::bigint::assign ( UInt  n)
inlineprivate

Definition at line 2860 of file format.h.

◆ assign_pow10()

FMT_CONSTEXPR20 void detail::bigint::assign_pow10 ( int  exp)
inline

Definition at line 2961 of file format.h.

◆ divmod_assign()

FMT_CONSTEXPR20 auto detail::bigint::divmod_assign ( const bigint divisor) -> int
inline

Definition at line 3023 of file format.h.

◆ multiply() [1/2]

template<typename UInt , FMT_ENABLE_IF(std::is_same< UInt, uint64_t >::value|| std::is_same< UInt, uint128_t >::value) >
FMT_CONSTEXPR20 void detail::bigint::multiply ( UInt  value)
inlineprivate

Definition at line 2839 of file format.h.

◆ multiply() [2/2]

FMT_CONSTEXPR20 void detail::bigint::multiply ( uint32_t  value)
inlineprivate

Definition at line 2826 of file format.h.

◆ num_bigits()

FMT_CONSTEXPR20 auto detail::bigint::num_bigits ( ) const -> int
inline

Definition at line 2890 of file format.h.

◆ operator*=()

template<typename Int >
FMT_CONSTEXPR20 auto detail::bigint::operator*= ( Int  value) -> bigint&
inline

Definition at line 2910 of file format.h.

◆ operator<<=()

FMT_NOINLINE FMT_CONSTEXPR20 auto detail::bigint::operator<<= ( int  shift) -> bigint&
inline

Definition at line 2894 of file format.h.

◆ operator=() [1/2]

void detail::bigint::operator= ( const bigint )
delete

◆ operator=() [2/2]

template<typename Int >
FMT_CONSTEXPR20 void detail::bigint::operator= ( Int  n)
inline

Definition at line 2885 of file format.h.

◆ operator[]() [1/2]

FMT_CONSTEXPR20 auto detail::bigint::operator[] ( int  index) -> bigit&
inlineprivate

Definition at line 2794 of file format.h.

◆ operator[]() [2/2]

FMT_CONSTEXPR20 auto detail::bigint::operator[] ( int  index) const -> bigit
inlineprivate

Definition at line 2791 of file format.h.

◆ remove_leading_zeros()

FMT_CONSTEXPR20 void detail::bigint::remove_leading_zeros ( )
inlineprivate

Definition at line 2808 of file format.h.

◆ square()

FMT_CONSTEXPR20 void detail::bigint::square ( )
inline

Definition at line 2980 of file format.h.

◆ subtract_aligned()

FMT_CONSTEXPR20 void detail::bigint::subtract_aligned ( const bigint other)
inlineprivate

Definition at line 2815 of file format.h.

◆ subtract_bigits()

FMT_CONSTEXPR20 void detail::bigint::subtract_bigits ( int  index,
bigit  other,
bigit borrow 
)
inlineprivate

Definition at line 2802 of file format.h.

Friends And Related Function Documentation

◆ add_compare

FMT_CONSTEXPR20 auto add_compare ( const bigint lhs1,
const bigint lhs2,
const bigint rhs 
) -> int
friend

Definition at line 2934 of file format.h.

◆ compare

FMT_CONSTEXPR20 auto compare ( const bigint lhs,
const bigint rhs 
) -> int
friend

Definition at line 2916 of file format.h.

◆ formatter< bigint >

friend struct formatter< bigint >
friend

Definition at line 2800 of file format.h.

Member Data Documentation

◆ bigit_bits

constexpr const int detail::bigint::bigit_bits = num_bits<bigit>()
staticconstexprprivate

Definition at line 2798 of file format.h.

◆ bigits_

basic_memory_buffer<bigit, bigits_capacity> detail::bigint::bigits_
private

Definition at line 2788 of file format.h.

◆ exp_

int detail::bigint::exp_
private

Definition at line 2789 of file format.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:30