31#ifndef SC_BIGINT_INLINES_H
32#define SC_BIGINT_INLINES_H
47inline const sc_bigint<W>&
112 *to_p++ = from >> 32;
127 if (
sizeof(from) > 4 ) {
129 *to_p++ = (
int64)from >> 32;
135 else if ( HOD > 0 ) {
162 *to_p++ = from >> 32;
177 if (
sizeof(from) > 4 ) {
179 *to_p++ = (
int64)from >> 32;
185 else if ( HOD > 1 ) {
209 return *
this = (
int64)from;
216 return *
this = (
uint64)from;
228 for (
int digit_i = 0; digit_i <= HOD; ++digit_i ) {
229 carry += ~digit[digit_i];
230 result_digits[digit_i] = (
sc_digit)carry;
242 for (
int digit_i = 0; digit_i <= HOD; ++digit_i ) {
243 result_digits[digit_i] = ~digit[digit_i];
496 result.
digit[0] = 0 > (int)digit[HOD] ? -1 : 0;
504 result.
digit[0] = (int)digit[0] >> v;
508 tmp = (tmp << 32) | digit[0];
510 result.
digit[0] = tmp;
512 result.
digit[1] = (tmp >>32);
void vector_fill(const sc_digit fill, const int to_hod, sc_digit *to_p)
bool vector_and_reduce(const int bits_n, const sc_digit *target_p)
unsigned long long uint64
void vector_extract(const sc_digit *source_p, sc_digit *destination_p, const int high_bit, const int low_bit)
void vector_copy(const int from_n, const sc_digit *from_p, const int to_n, sc_digit *to_p)
bool vector_xor_reduce(const int bits_n, const sc_digit *target_p)
bool vector_or_reduce(const int bits_n, const sc_digit *target_p)
void vector_shift_left(const int from_digits_n, const sc_digit *from_p, const int to_digits_n, sc_digit *to_p, const int shift_n)
void vector_shift_right(const int target_n, sc_digit *target_p, int bits_n, const sc_digit fill)
const sc_bigint< W > & operator>>=(int v)
const sc_signed operator>>(int v) const
sc_bigint< W > & operator*=(const sc_signed &v)
sc_bigint< W > & operator|=(const sc_signed &v)
const sc_digit * get_digits() const
sc_bigint< W > & operator+=(const sc_signed &v)
const sc_bigint< W > operator-()
const sc_bigint< W > & operator<<=(int v)
sc_bigint< W > & operator%=(const sc_signed &v)
const sc_bigint< W > operator~()
sc_bigint< W > & operator/=(const sc_signed &v)
sc_signed & sc_signed_proxy()
const sc_bigint< W > & operator=(const sc_bigint< W > &other)
sc_bigint< W > & operator&=(const sc_signed &v)
sc_bigint< W > & operator-=(const sc_signed &v)
sc_bigint< W > & operator^=(const sc_signed &v)
const sc_signed operator<<(int v) const
const sc_digit * get_digits() const
sc_digit * get_digits() const
sc_digit * get_digits() const