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.h41 mpd_uint_t _mpd_baseadd(mpd_uint_t *w, const mpd_uint_t *u, const mpd_uint_t *v,
43 void _mpd_baseaddto(mpd_uint_t *w, const mpd_uint_t *u, mpd_size_t n);
44 mpd_uint_t _mpd_shortadd(mpd_uint_t *w, mpd_size_t m, mpd_uint_t v);
45 mpd_uint_t _mpd_shortadd_b(mpd_uint_t *w, mpd_size_t m, mpd_uint_t v,
46 mpd_uint_t b);
47 mpd_uint_t _mpd_baseincr(mpd_uint_t *u, mpd_size_t n);
48 void _mpd_basesub(mpd_uint_t *w, const mpd_uint_t *u, const mpd_uint_t *v,
50 void _mpd_basesubfrom(mpd_uint_t *w, const mpd_uint_t *u, mpd_size_t n);
51 void _mpd_basemul(mpd_uint_t *w, const mpd_uint_t *u, const mpd_uint_t *v,
53 void _mpd_shortmul(mpd_uint_t *w, const mpd_uint_t *u, mpd_size_t n,
[all …]
Dumodarith.h52 static inline mpd_uint_t
53 addmod(mpd_uint_t a, mpd_uint_t b, mpd_uint_t m) in addmod()
55 mpd_uint_t s; in addmod()
68 static inline mpd_uint_t
69 submod(mpd_uint_t a, mpd_uint_t b, mpd_uint_t m) in submod()
71 mpd_uint_t d; in submod()
83 static inline mpd_uint_t
84 ext_submod(mpd_uint_t a, mpd_uint_t b, mpd_uint_t m) in ext_submod()
86 mpd_uint_t d; in ext_submod()
102 static inline mpd_uint_t
[all …]
Dtypearith.h52 _mpd_mul_words(mpd_uint_t *hi, mpd_uint_t *lo, mpd_uint_t a, mpd_uint_t b) in _mpd_mul_words()
59 *lo = (mpd_uint_t)hl; in _mpd_mul_words()
63 _mpd_div_words(mpd_uint_t *q, mpd_uint_t *r, mpd_uint_t hi, mpd_uint_t lo, in _mpd_div_words()
64 mpd_uint_t d) in _mpd_div_words()
69 *q = (mpd_uint_t)(hl / d); /* quotient is known to fit */ in _mpd_div_words()
70 *r = (mpd_uint_t)(hl - (__uint128_t)(*q) * d); in _mpd_div_words()
74 _mpd_mul_words(mpd_uint_t *hi, mpd_uint_t *lo, mpd_uint_t a, mpd_uint_t b) in _mpd_mul_words()
130 _mpd_div_words(mpd_uint_t *q, mpd_uint_t *r, mpd_uint_t u1, mpd_uint_t u0, in _mpd_div_words()
131 mpd_uint_t v) in _mpd_div_words()
133 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 …]
Dconstants.c36 const mpd_uint_t mpd_moduli[3] = {
39 const mpd_uint_t mpd_roots[3] = {7ULL, 10ULL, 19ULL};
42 const mpd_uint_t INV_P1_MOD_P2 = 18446744055098026669ULL;
43 const mpd_uint_t INV_P1P2_MOD_P3 = 287064143708160ULL;
44 const mpd_uint_t LH_P1P2 = 18446744052234715137ULL; /* (P1*P2) % 2^64 */
45 const mpd_uint_t UH_P1P2 = 18446744052234715141ULL; /* (P1*P2) / 2^64 */
65 const mpd_uint_t mpd_pow10[MPD_RDIGITS+1] = {
73 const mpd_uint_t mprime_rdx = 15581492618384294730ULL;
78 const mpd_uint_t mpd_moduli[3] = {2113929217UL, 2013265921UL, 1811939329UL};
79 const mpd_uint_t mpd_roots[3] = {5UL, 31UL, 13UL};
[all …]
Dcrt.c45 _crt_mulP1P2_3(mpd_uint_t w[3], mpd_uint_t v) in _crt_mulP1P2_3()
47 mpd_uint_t hi1, hi2, lo; in _crt_mulP1P2_3()
62 _crt_add3(mpd_uint_t w[3], mpd_uint_t v[3]) in _crt_add3()
64 mpd_uint_t carry; in _crt_add3()
65 mpd_uint_t s; in _crt_add3()
79 static inline mpd_uint_t
80 _crt_div3(mpd_uint_t *w, const mpd_uint_t *u, mpd_uint_t v) in _crt_div3()
82 mpd_uint_t r1 = u[2]; in _crt_div3()
83 mpd_uint_t r2; in _crt_div3()
135 crt3(mpd_uint_t *x1, mpd_uint_t *x2, mpd_uint_t *x3, mpd_size_t rsize) in crt3()
[all …]
Dconvolute.c46 fnt_convolute(mpd_uint_t *c1, mpd_uint_t *c2, mpd_size_t n, int modnum) in fnt_convolute()
48 int (*fnt)(mpd_uint_t *, mpd_size_t, int); in fnt_convolute()
49 int (*inv_fnt)(mpd_uint_t *, mpd_size_t, int); in fnt_convolute()
54 mpd_uint_t n_inv, umod; in fnt_convolute()
83 mpd_uint_t x0 = c1[i]; in fnt_convolute()
84 mpd_uint_t y0 = c2[i]; in fnt_convolute()
85 mpd_uint_t x1 = c1[i+1]; in fnt_convolute()
86 mpd_uint_t y1 = c2[i+1]; in fnt_convolute()
96 mpd_uint_t x0 = c1[i]; in fnt_convolute()
97 mpd_uint_t x1 = c1[i+1]; in fnt_convolute()
[all …]
Dfourstep.c46 std_size3_ntt(mpd_uint_t *x1, mpd_uint_t *x2, mpd_uint_t *x3, in std_size3_ntt()
47 mpd_uint_t w3table[3], mpd_uint_t umod) in std_size3_ntt()
49 mpd_uint_t r1, r2; in std_size3_ntt()
50 mpd_uint_t w; in std_size3_ntt()
51 mpd_uint_t s, tmp; in std_size3_ntt()
91 ppro_size3_ntt(mpd_uint_t *x1, mpd_uint_t *x2, mpd_uint_t *x3, mpd_uint_t w3table[3], in ppro_size3_ntt()
92 mpd_uint_t umod, double *dmod, uint32_t dinvmod[3]) in ppro_size3_ntt()
94 mpd_uint_t r1, r2; in ppro_size3_ntt()
95 mpd_uint_t w; in ppro_size3_ntt()
96 mpd_uint_t s, tmp; in ppro_size3_ntt()
[all …]
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()
Dnumbertheory.c49 mpd_uint_t
50 _mpd_getkernel(mpd_uint_t n, int sign, int modnum) in _mpd_getkernel()
52 mpd_uint_t umod, p, r, xi; in _mpd_getkernel()
79 mpd_uint_t umod; in _mpd_init_fnt_params()
84 mpd_uint_t kernel, w; in _mpd_init_fnt_params()
85 mpd_uint_t i; in _mpd_init_fnt_params()
93 tparams = mpd_sh_alloc(sizeof *tparams, nhalf, sizeof (mpd_uint_t)); in _mpd_init_fnt_params()
117 _mpd_init_w3table(mpd_uint_t w3table[3], int sign, int modnum) in _mpd_init_w3table()
119 mpd_uint_t umod; in _mpd_init_w3table()
124 mpd_uint_t kernel; in _mpd_init_w3table()
Dtranspose.h43 void std_trans(mpd_uint_t dest[], mpd_uint_t src[], mpd_size_t rows, mpd_size_t cols);
44 int transpose_pow2(mpd_uint_t *matrix, mpd_size_t rows, mpd_size_t cols);
45 void transpose_3xpow2(mpd_uint_t *matrix, mpd_size_t rows, mpd_size_t cols);
48 static inline void pointerswap(mpd_uint_t **a, mpd_uint_t **b) in pointerswap()
50 mpd_uint_t *tmp; in pointerswap()
Dsixstep.c49 six_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum) in six_step_fnt()
53 mpd_uint_t kernel; in six_step_fnt()
54 mpd_uint_t umod; in six_step_fnt()
59 mpd_uint_t *x, w0, w1, wstep; in six_step_fnt()
99 mpd_uint_t x0 = a[i*C+k]; in six_step_fnt()
100 mpd_uint_t x1 = a[i*C+k+1]; in six_step_fnt()
134 inv_six_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum) in inv_six_step_fnt()
138 mpd_uint_t kernel; in inv_six_step_fnt()
139 mpd_uint_t umod; in inv_six_step_fnt()
144 mpd_uint_t *x, w0, w1, wstep; in inv_six_step_fnt()
[all …]
Dtranspose.c53 std_trans(mpd_uint_t dest[], mpd_uint_t src[], mpd_size_t rows, mpd_size_t cols) in std_trans()
75 swap_halfrows_pow2(mpd_uint_t *matrix, mpd_size_t rows, mpd_size_t cols, int dir) in swap_halfrows_pow2()
77 mpd_uint_t buf1[BUFSIZE]; in swap_halfrows_pow2()
78 mpd_uint_t buf2[BUFSIZE]; in swap_halfrows_pow2()
79 mpd_uint_t *readbuf, *writebuf, *hp; in swap_halfrows_pow2()
151 squaretrans(mpd_uint_t *buf, mpd_size_t cols) in squaretrans()
153 mpd_uint_t tmp; in squaretrans()
177 squaretrans_pow2(mpd_uint_t *matrix, mpd_size_t size) in squaretrans_pow2()
179 mpd_uint_t buf1[SIDE*SIDE]; in squaretrans_pow2()
180 mpd_uint_t buf2[SIDE*SIDE]; in squaretrans_pow2()
[all …]
Dconstants.h75 extern const mpd_uint_t mpd_moduli[];
76 extern const mpd_uint_t mpd_roots[];
78 extern const mpd_uint_t mpd_pow10[];
80 extern const mpd_uint_t INV_P1_MOD_P2;
81 extern const mpd_uint_t INV_P1P2_MOD_P3;
82 extern const mpd_uint_t LH_P1P2;
83 extern const mpd_uint_t UH_P1P2;
Ddifradix2.c50 bitreverse_permute(mpd_uint_t a[], mpd_size_t n) in bitreverse_permute()
54 mpd_uint_t t; in bitreverse_permute()
75 fnt_dif2(mpd_uint_t a[], mpd_size_t n, struct fnt_params *tparams) in fnt_dif2()
77 mpd_uint_t *wtable = tparams->wtable; in fnt_dif2()
78 mpd_uint_t umod; in fnt_dif2()
83 mpd_uint_t u0, u1, v0, v1; in fnt_dif2()
84 mpd_uint_t w, w0, w1, wstep; in fnt_dif2()
Dcrt.h40 void crt3(mpd_uint_t *x1, mpd_uint_t *x2, mpd_uint_t *x3, mpd_size_t nmemb);
Dconvolute.h42 int fnt_convolute(mpd_uint_t *c1, mpd_uint_t *c2, mpd_size_t n, int modnum);
43 int fnt_autoconvolute(mpd_uint_t *c1, mpd_size_t n, int modnum);
Dmpdecimal.h138 typedef uint64_t mpd_uint_t; /* unsigned mod type */ typedef
177 typedef uint32_t mpd_uint_t; /* unsigned mod type */ typedef
367 mpd_uint_t *data;
428 void mpd_qset_uint(mpd_t *result, mpd_uint_t a, const mpd_context_t *ctx, uint32_t *status);
440 void mpd_qsset_uint(mpd_t *result, mpd_uint_t a, const mpd_context_t *ctx, uint32_t *status);
445 mpd_uint_t mpd_qget_uint(const mpd_t *dec, uint32_t *status);
446 mpd_uint_t mpd_qabs_uint(const mpd_t *dec, uint32_t *status);
479 mpd_uint_t mpd_qshiftr(mpd_t *result, const mpd_t *a, mpd_ssize_t n, uint32_t *status);
480 mpd_uint_t mpd_qshiftr_inplace(mpd_t *result, mpd_ssize_t n);
515 void mpd_qadd_uint(mpd_t *result, const mpd_t *a, mpd_uint_t b, const mpd_context_t *ctx, uint32_t …
[all …]
Dmpdecimal.c83 mpd_uint_t name##_data[MPD_MINALLOC_MAX]; \
88 mpd_uint_t name##_data[alloc] = {initval}; \
97 static mpd_uint_t data_one[1] = {1};
98 static mpd_uint_t data_zero[1] = {0};
106 static void _settriple(mpd_t *result, uint8_t sign, mpd_uint_t a,
108 static inline mpd_ssize_t _mpd_real_size(mpd_uint_t *data, mpd_ssize_t size);
119 mpd_uint_t exp, uint8_t resultsign,
122 static mpd_uint_t mpd_qsshiftr(mpd_t *result, const mpd_t *a, mpd_ssize_t n);
143 mpd_word_digits(mpd_uint_t word) in mpd_word_digits()
180 mpd_word_digits(mpd_uint_t word) in mpd_word_digits()
[all …]
Dfnt.h40 int std_fnt(mpd_uint_t a[], mpd_size_t n, int modnum);
41 int std_inv_fnt(mpd_uint_t a[], mpd_size_t n, int modnum);
Dfourstep.h40 int four_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum);
41 int inv_four_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum);
Dsixstep.h40 int six_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum);
41 int inv_six_step_fnt(mpd_uint_t *a, mpd_size_t n, int modnum);
Dfnt.c45 std_fnt(mpd_uint_t *a, mpd_size_t n, int modnum) in std_fnt()
64 std_inv_fnt(mpd_uint_t *a, mpd_size_t n, int modnum) in std_inv_fnt()
Dmpalloc.c220 mpd_uint_t *p = result->data; in mpd_switch_to_dyn()
249 mpd_uint_t *p = result->data; in mpd_switch_to_dyn_zero()
315 mpd_uint_t *data = mpd_alloc(nwords, sizeof *result->data); in mpd_switch_to_dyn_cxx()
346 mpd_uint_t *p = mpd_realloc(result->data, nwords, sizeof *result->data, &err); in mpd_realloc_dyn_cxx()
Ddifradix2.h41 void fnt_dif2(mpd_uint_t a[], mpd_size_t n, struct fnt_params *tparams);

12