Home
last modified time | relevance | path

Searched refs:mpd_uint_t (Results 1 – 25 of 27) sorted by relevance

12

/external/python/cpython3/Modules/_decimal/libmpdec/
Dbasearith.h42 mpd_uint_t _mpd_baseadd(mpd_uint_t *w, const mpd_uint_t *u, const mpd_uint_t *v,
44 void _mpd_baseaddto(mpd_uint_t *w, const mpd_uint_t *u, mpd_size_t n);
45 mpd_uint_t _mpd_shortadd(mpd_uint_t *w, mpd_size_t m, mpd_uint_t v);
46 mpd_uint_t _mpd_shortadd_b(mpd_uint_t *w, mpd_size_t m, mpd_uint_t v,
47 mpd_uint_t b);
48 mpd_uint_t _mpd_baseincr(mpd_uint_t *u, mpd_size_t n);
49 void _mpd_basesub(mpd_uint_t *w, const mpd_uint_t *u, const mpd_uint_t *v,
51 void _mpd_basesubfrom(mpd_uint_t *w, const mpd_uint_t *u, mpd_size_t n);
52 void _mpd_basemul(mpd_uint_t *w, const mpd_uint_t *u, const mpd_uint_t *v,
54 void _mpd_shortmul(mpd_uint_t *w, const mpd_uint_t *u, mpd_size_t n,
[all …]
Dumodarith.h51 static inline mpd_uint_t
52 addmod(mpd_uint_t a, mpd_uint_t b, mpd_uint_t m) in addmod()
54 mpd_uint_t s; in addmod()
67 static inline mpd_uint_t
68 submod(mpd_uint_t a, mpd_uint_t b, mpd_uint_t m) in submod()
70 mpd_uint_t d; in submod()
82 static inline mpd_uint_t
83 ext_submod(mpd_uint_t a, mpd_uint_t b, mpd_uint_t m) in ext_submod()
85 mpd_uint_t d; in ext_submod()
101 static inline mpd_uint_t
[all …]
Dtypearith.h50 _mpd_mul_words(mpd_uint_t *hi, mpd_uint_t *lo, mpd_uint_t a, mpd_uint_t b) in _mpd_mul_words()
57 *lo = (mpd_uint_t)hl; in _mpd_mul_words()
61 _mpd_div_words(mpd_uint_t *q, mpd_uint_t *r, mpd_uint_t hi, mpd_uint_t lo, in _mpd_div_words()
62 mpd_uint_t d) in _mpd_div_words()
67 *q = (mpd_uint_t)(hl / d); /* quotient is known to fit */ in _mpd_div_words()
68 *r = (mpd_uint_t)(hl - (__uint128_t)(*q) * d); in _mpd_div_words()
72 _mpd_mul_words(mpd_uint_t *hi, mpd_uint_t *lo, mpd_uint_t a, mpd_uint_t b) in _mpd_mul_words()
128 _mpd_div_words(mpd_uint_t *q, mpd_uint_t *r, mpd_uint_t u1, mpd_uint_t u0, in _mpd_div_words()
129 mpd_uint_t v) in _mpd_div_words()
131 const mpd_uint_t b = 4294967296; in _mpd_div_words()
[all …]
Dbasearith.c50 mpd_uint_t
51 _mpd_baseadd(mpd_uint_t *w, const mpd_uint_t *u, const mpd_uint_t *v, in _mpd_baseadd()
54 mpd_uint_t s; in _mpd_baseadd()
55 mpd_uint_t carry = 0; in _mpd_baseadd()
85 _mpd_baseaddto(mpd_uint_t *w, const mpd_uint_t *u, mpd_size_t n) in _mpd_baseaddto()
87 mpd_uint_t s; in _mpd_baseaddto()
88 mpd_uint_t carry = 0; in _mpd_baseaddto()
111 mpd_uint_t
112 _mpd_shortadd(mpd_uint_t *w, mpd_size_t m, mpd_uint_t v) in _mpd_shortadd()
114 mpd_uint_t s; in _mpd_shortadd()
[all …]
Dcrt.c42 _crt_mulP1P2_3(mpd_uint_t w[3], mpd_uint_t v) in _crt_mulP1P2_3()
44 mpd_uint_t hi1, hi2, lo; in _crt_mulP1P2_3()
59 _crt_add3(mpd_uint_t w[3], mpd_uint_t v[3]) in _crt_add3()
61 mpd_uint_t carry; in _crt_add3()
62 mpd_uint_t s; in _crt_add3()
76 static inline mpd_uint_t
77 _crt_div3(mpd_uint_t *w, const mpd_uint_t *u, mpd_uint_t v) in _crt_div3()
79 mpd_uint_t r1 = u[2]; in _crt_div3()
80 mpd_uint_t r2; in _crt_div3()
132 crt3(mpd_uint_t *x1, mpd_uint_t *x2, mpd_uint_t *x3, mpd_size_t rsize) in crt3()
[all …]
Dconstants.c37 const mpd_uint_t mpd_moduli[3] = {
40 const mpd_uint_t mpd_roots[3] = {7ULL, 10ULL, 19ULL};
43 const mpd_uint_t INV_P1_MOD_P2 = 18446744055098026669ULL;
44 const mpd_uint_t INV_P1P2_MOD_P3 = 287064143708160ULL;
45 const mpd_uint_t LH_P1P2 = 18446744052234715137ULL; /* (P1*P2) % 2^64 */
46 const mpd_uint_t UH_P1P2 = 18446744052234715141ULL; /* (P1*P2) / 2^64 */
66 const mpd_uint_t mpd_pow10[MPD_RDIGITS+1] = {
74 const mpd_uint_t mprime_rdx = 15581492618384294730ULL;
79 const mpd_uint_t mpd_moduli[3] = {2113929217UL, 2013265921UL, 1811939329UL};
80 const mpd_uint_t mpd_roots[3] = {5UL, 31UL, 13UL};
[all …]
Dconvolute.c47 fnt_convolute(mpd_uint_t *c1, mpd_uint_t *c2, mpd_size_t n, int modnum) in fnt_convolute()
49 int (*fnt)(mpd_uint_t *, mpd_size_t, int); in fnt_convolute()
50 int (*inv_fnt)(mpd_uint_t *, mpd_size_t, int); in fnt_convolute()
55 mpd_uint_t n_inv, umod; in fnt_convolute()
84 mpd_uint_t x0 = c1[i]; in fnt_convolute()
85 mpd_uint_t y0 = c2[i]; in fnt_convolute()
86 mpd_uint_t x1 = c1[i+1]; in fnt_convolute()
87 mpd_uint_t y1 = c2[i+1]; in fnt_convolute()
97 mpd_uint_t x0 = c1[i]; in fnt_convolute()
98 mpd_uint_t x1 = c1[i+1]; in fnt_convolute()
[all …]
Dfourstep.c44 std_size3_ntt(mpd_uint_t *x1, mpd_uint_t *x2, mpd_uint_t *x3, in std_size3_ntt()
45 mpd_uint_t w3table[3], mpd_uint_t umod) in std_size3_ntt()
47 mpd_uint_t r1, r2; in std_size3_ntt()
48 mpd_uint_t w; in std_size3_ntt()
49 mpd_uint_t s, tmp; in std_size3_ntt()
89 ppro_size3_ntt(mpd_uint_t *x1, mpd_uint_t *x2, mpd_uint_t *x3, mpd_uint_t w3table[3], in ppro_size3_ntt()
90 mpd_uint_t umod, double *dmod, uint32_t dinvmod[3]) in ppro_size3_ntt()
92 mpd_uint_t r1, r2; in ppro_size3_ntt()
93 mpd_uint_t w; in ppro_size3_ntt()
94 mpd_uint_t s, tmp; in ppro_size3_ntt()
[all …]
Dnumbertheory.c47 mpd_uint_t
48 _mpd_getkernel(mpd_uint_t n, int sign, int modnum) in _mpd_getkernel()
50 mpd_uint_t umod, p, r, xi; in _mpd_getkernel()
77 mpd_uint_t umod; in _mpd_init_fnt_params()
82 mpd_uint_t kernel, w; in _mpd_init_fnt_params()
83 mpd_uint_t i; in _mpd_init_fnt_params()
91 tparams = mpd_sh_alloc(sizeof *tparams, nhalf, sizeof (mpd_uint_t)); in _mpd_init_fnt_params()
115 _mpd_init_w3table(mpd_uint_t w3table[3], int sign, int modnum) in _mpd_init_w3table()
117 mpd_uint_t umod; in _mpd_init_w3table()
122 mpd_uint_t kernel; in _mpd_init_w3table()
Dnumbertheory.h44 mpd_uint_t modulus;
45 mpd_uint_t kernel;
46 mpd_uint_t wtable[];
50 mpd_uint_t _mpd_getkernel(mpd_uint_t n, int sign, int modnum);
52 void _mpd_init_w3table(mpd_uint_t w3table[3], int sign, int modnum);
57 ppro_setmodulus(int modnum, mpd_uint_t *umod, double *dmod, uint32_t dinvmod[3]) in ppro_setmodulus()
66 std_setmodulus(int modnum, mpd_uint_t *umod) in std_setmodulus()
Dtranspose.h44 void std_trans(mpd_uint_t dest[], mpd_uint_t src[], mpd_size_t rows, mpd_size_t cols);
45 int transpose_pow2(mpd_uint_t *matrix, mpd_size_t rows, mpd_size_t cols);
46 void transpose_3xpow2(mpd_uint_t *matrix, mpd_size_t rows, mpd_size_t cols);
49 static inline void pointerswap(mpd_uint_t **a, mpd_uint_t **b) in pointerswap()
51 mpd_uint_t *tmp; in pointerswap()
Dsixstep.c47 six_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum) in six_step_fnt()
51 mpd_uint_t kernel; in six_step_fnt()
52 mpd_uint_t umod; in six_step_fnt()
57 mpd_uint_t *x, w0, w1, wstep; in six_step_fnt()
97 mpd_uint_t x0 = a[i*C+k]; in six_step_fnt()
98 mpd_uint_t x1 = a[i*C+k+1]; in six_step_fnt()
132 inv_six_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum) in inv_six_step_fnt()
136 mpd_uint_t kernel; in inv_six_step_fnt()
137 mpd_uint_t umod; in inv_six_step_fnt()
142 mpd_uint_t *x, w0, w1, wstep; in inv_six_step_fnt()
[all …]
Dtranspose.c51 std_trans(mpd_uint_t dest[], mpd_uint_t src[], mpd_size_t rows, mpd_size_t cols) in std_trans()
73 swap_halfrows_pow2(mpd_uint_t *matrix, mpd_size_t rows, mpd_size_t cols, int dir) in swap_halfrows_pow2()
75 mpd_uint_t buf1[BUFSIZE]; in swap_halfrows_pow2()
76 mpd_uint_t buf2[BUFSIZE]; in swap_halfrows_pow2()
77 mpd_uint_t *readbuf, *writebuf, *hp; in swap_halfrows_pow2()
149 squaretrans(mpd_uint_t *buf, mpd_size_t cols) in squaretrans()
151 mpd_uint_t tmp; in squaretrans()
175 squaretrans_pow2(mpd_uint_t *matrix, mpd_size_t size) in squaretrans_pow2()
177 mpd_uint_t buf1[SIDE*SIDE]; in squaretrans_pow2()
178 mpd_uint_t buf2[SIDE*SIDE]; in squaretrans_pow2()
[all …]
Dconstants.h73 extern const mpd_uint_t mpd_moduli[];
74 extern const mpd_uint_t mpd_roots[];
76 extern const mpd_uint_t mpd_pow10[];
78 extern const mpd_uint_t INV_P1_MOD_P2;
79 extern const mpd_uint_t INV_P1P2_MOD_P3;
80 extern const mpd_uint_t LH_P1P2;
81 extern const mpd_uint_t UH_P1P2;
Ddifradix2.c48 bitreverse_permute(mpd_uint_t a[], mpd_size_t n) in bitreverse_permute()
52 mpd_uint_t t; in bitreverse_permute()
73 fnt_dif2(mpd_uint_t a[], mpd_size_t n, struct fnt_params *tparams) in fnt_dif2()
75 mpd_uint_t *wtable = tparams->wtable; in fnt_dif2()
76 mpd_uint_t umod; in fnt_dif2()
81 mpd_uint_t u0, u1, v0, v1; in fnt_dif2()
82 mpd_uint_t w, w0, w1, wstep; in fnt_dif2()
Dmpdecimal.h149 typedef uint64_t mpd_uint_t; /* unsigned mod type */ typedef
188 typedef uint32_t mpd_uint_t; /* unsigned mod type */ typedef
378 mpd_uint_t *data;
438 void mpd_qset_uint(mpd_t *result, mpd_uint_t a, const mpd_context_t *ctx, uint32_t *status);
448 void mpd_qsset_uint(mpd_t *result, mpd_uint_t a, const mpd_context_t *ctx, uint32_t *status);
453 mpd_uint_t mpd_qget_uint(const mpd_t *dec, uint32_t *status);
454 mpd_uint_t mpd_qabs_uint(const mpd_t *dec, uint32_t *status);
486 mpd_uint_t mpd_qshiftr(mpd_t *result, const mpd_t *a, mpd_ssize_t n, uint32_t *status);
487 mpd_uint_t mpd_qshiftr_inplace(mpd_t *result, mpd_ssize_t n);
522 void mpd_qadd_uint(mpd_t *result, const mpd_t *a, mpd_uint_t b, const mpd_context_t *ctx, uint32_t …
[all …]
Dmpdecimal.c80 mpd_uint_t name##_data[MPD_MINALLOC_MAX]; \
85 mpd_uint_t name##_data[alloc] = {initval}; \
94 static mpd_uint_t data_one[1] = {1};
95 static mpd_uint_t data_zero[1] = {0};
103 static void _settriple(mpd_t *result, uint8_t sign, mpd_uint_t a,
105 static inline mpd_ssize_t _mpd_real_size(mpd_uint_t *data, mpd_ssize_t size);
116 mpd_uint_t exp, uint8_t resultsign,
119 static mpd_uint_t mpd_qsshiftr(mpd_t *result, const mpd_t *a, mpd_ssize_t n);
140 mpd_word_digits(mpd_uint_t word) in mpd_word_digits()
177 mpd_word_digits(mpd_uint_t word) in mpd_word_digits()
[all …]
Dcrt.h41 void crt3(mpd_uint_t *x1, mpd_uint_t *x2, mpd_uint_t *x3, mpd_size_t nmemb);
Dconvolute.h43 int fnt_convolute(mpd_uint_t *c1, mpd_uint_t *c2, mpd_size_t n, int modnum);
44 int fnt_autoconvolute(mpd_uint_t *c1, mpd_size_t n, int modnum);
Dsixstep.h41 int six_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum);
42 int inv_six_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum);
Dfnt.h41 int std_fnt(mpd_uint_t a[], mpd_size_t n, int modnum);
42 int std_inv_fnt(mpd_uint_t a[], mpd_size_t n, int modnum);
Dfourstep.h41 int four_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum);
42 int inv_four_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum);
Dfnt.c44 std_fnt(mpd_uint_t *a, mpd_size_t n, int modnum) in std_fnt()
63 std_inv_fnt(mpd_uint_t *a, mpd_size_t n, int modnum) in std_inv_fnt()
Ddifradix2.h42 void fnt_dif2(mpd_uint_t a[], mpd_size_t n, struct fnt_params *tparams);
Dmemory.c216 mpd_uint_t *p = result->data; in mpd_switch_to_dyn()
245 mpd_uint_t *p = result->data; in mpd_switch_to_dyn_zero()

12