Enumerations
enum Direction
| Name | Value |
|---|---|
| LEFT | 0 |
| RIGHT | 1 |
An enum for the shift function below.
Defined at line 250 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
Records
Functions
-
template <typename T>auto split (T value)Converts an unsigned value into a DoubleWide
<half
_width_t
<T
>>.
Defined at line 53 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename T>T lo (const DoubleWide<T> & value)The low part of a DoubleWide value.
Defined at line 62 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename T>T hi (const DoubleWide<T> & value)The high part of a DoubleWide value.
Defined at line 66 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename T>half_width_t<T> lo (T value)The low part of an unsigned value.
Defined at line 70 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename T>half_width_t<T> hi (T value)The high part of an unsigned value.
Defined at line 74 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word>DoubleWide<word> mul2 (word a, word b)Returns 'a' times 'b' in a DoubleWide
<word
>. Cannot overflow by construction.
Defined at line 80 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename Function, typename word, size_t N, size_t M>word inplace_binop (Function op_with_carry, cpp::array<word, N> & dst, const cpp::array<word, M> & rhs)In-place 'dst op= rhs' with operation with carry propagation. Returns carry.
Defined at line 137 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename Function, typename word, size_t N, size_t M>word inplace_binop (Function op_with_carry, cpp::array<word, N> & dst, const cpp::array<word, M> & rhs)In-place 'dst op= rhs' with operation with carry propagation. Returns carry.
Defined at line 137 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N, size_t M>word add_with_carry (cpp::array<word, N> & dst, const cpp::array<word, M> & rhs)In-place addition. Returns carry.
Defined at line 156 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N, size_t M>word add_with_carry (cpp::array<word, N> & dst, const cpp::array<word, M> & rhs)In-place addition. Returns carry.
Defined at line 156 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N, size_t M>word sub_with_borrow (cpp::array<word, N> & dst, const cpp::array<word, M> & rhs)In-place subtraction. Returns borrow.
Defined at line 163 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N, size_t M>word sub_with_borrow (cpp::array<word, N> & dst, const cpp::array<word, M> & rhs)In-place subtraction. Returns borrow.
Defined at line 163 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N>word mul_add_with_carry (cpp::array<word, N> & dst, word b, word c)In-place multiply-add. Returns carry.
i.e., 'dst += b * c'
Defined at line 171 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N>word mul_add_with_carry (cpp::array<word, N> & dst, word b, word c)In-place multiply-add. Returns carry.
i.e., 'dst += b * c'
Defined at line 171 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N>word scalar_multiply_with_carry (cpp::array<word, N> & dst, word x)In-place multiplication by a single word. Returns carry.
Defined at line 193 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N>word scalar_multiply_with_carry (cpp::array<word, N> & dst, word x)In-place multiplication by a single word. Returns carry.
Defined at line 193 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t O, size_t M, size_t N>word multiply_with_carry (cpp::array<word, O> & dst, const cpp::array<word, M> & lhs, const cpp::array<word, N> & rhs)Multiplication of 'lhs' by 'rhs' into 'dst'. Returns carry.
This function is safe to use for signed numbers.
https://stackoverflow.com/a/20793834
https://pages.cs.wisc.edu/%7Emarkhill/cs354/Fall2008/beyond354/int.mult.html
Defined at line 208 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t O, size_t M, size_t N>word multiply_with_carry (cpp::array<word, O> & dst, const cpp::array<word, M> & lhs, const cpp::array<word, N> & rhs)Multiplication of 'lhs' by 'rhs' into 'dst'. Returns carry.
This function is safe to use for signed numbers.
https://stackoverflow.com/a/20793834
https://pages.cs.wisc.edu/%7Emarkhill/cs354/Fall2008/beyond354/int.mult.html
Defined at line 208 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N>void quick_mul_hi (cpp::array<word, N> & dst, const cpp::array<word, N> & lhs, const cpp::array<word, N> & rhs)Defined at line 225 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N>void quick_mul_hi (cpp::array<word, N> & dst, const cpp::array<word, N> & lhs, const cpp::array<word, N> & rhs)Defined at line 225 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N>bool is_negative (const cpp::array<word, N> & array)Defined at line 244 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <typename word, size_t N>bool is_negative (const cpp::array<word, N> & array)Defined at line 244 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <Direction direction, bool is_signed, typename word, size_t N>cpp::array<word, N> shift (cpp::array<word, N> array, size_t offset)A bitwise shift on an array of elements.
'offset' must be less than TOTAL_BITS (i.e., sizeof(word) * CHAR_BIT * N)
otherwise the behavior is undefined.
Defined at line 256 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <Direction direction, bool is_signed, typename word, size_t N>cpp::array<word, N> shift (cpp::array<word, N> array, size_t offset)A bitwise shift on an array of elements.
'offset' must be less than TOTAL_BITS (i.e., sizeof(word) * CHAR_BIT * N)
otherwise the behavior is undefined.
Defined at line 256 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <, >int countr_zero (const cpp::array<word, N> & val)Defined at line 325 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <, >int countr_zero (const cpp::array<word, N> & val)Defined at line 325 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <, >int countr_one (const cpp::array<word, N> & val)Defined at line 326 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <, >int countr_one (const cpp::array<word, N> & val)Defined at line 326 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <, >int countl_zero (const cpp::array<word, N> & val)Defined at line 327 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <, >int countl_zero (const cpp::array<word, N> & val)Defined at line 327 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <, >int countl_one (const cpp::array<word, N> & val)Defined at line 328 of file ../../third_party/llvm-libc/src/src/__support/big_int.h
-
template <>int countl_one (const cpp::array<word, N> & val)Defined at line 328 of file ../../third_party/llvm-libc/src/src/__support/big_int.h