Lines Matching refs:up
34 #define MPN_MUL_N_RECURSE(prodp, up, vp, size, tspace) \ argument
37 mul_n_basecase(prodp, up, vp, size); \
39 mul_n(prodp, up, vp, size, tspace); \
42 #define MPN_SQR_N_RECURSE(prodp, up, size, tspace) \ argument
45 mpih_sqr_n_basecase(prodp, up, size); \
47 mpih_sqr_n(prodp, up, size, tspace); \
68 mul_n_basecase(mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp, mpi_size_t size) in mul_n_basecase() argument
79 MPN_COPY(prodp, up, size); in mul_n_basecase()
84 cy = mpihelp_mul_1(prodp, up, size, v_limb); in mul_n_basecase()
96 cy = mpihelp_add_n(prodp, prodp, up, size); in mul_n_basecase()
98 cy = mpihelp_addmul_1(prodp, up, size, v_limb); in mul_n_basecase()
108 mul_n(mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp, in mul_n() argument
125 MPN_MUL_N_RECURSE(prodp, up, vp, esize, tspace); in mul_n()
126 cy_limb = mpihelp_addmul_1(prodp + esize, up, esize, vp[esize]); in mul_n()
128 cy_limb = mpihelp_addmul_1(prodp + esize, vp, size, up[esize]); in mul_n()
155 MPN_MUL_N_RECURSE(prodp + size, up + hsize, vp + hsize, hsize, in mul_n()
161 if (mpihelp_cmp(up + hsize, up, hsize) >= 0) { in mul_n()
162 mpihelp_sub_n(prodp, up + hsize, up, hsize); in mul_n()
165 mpihelp_sub_n(prodp, up, up + hsize, hsize); in mul_n()
203 MPN_MUL_N_RECURSE(tspace, up, vp, hsize, tspace + size); in mul_n()
220 void mpih_sqr_n_basecase(mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t size) in mpih_sqr_n_basecase() argument
228 v_limb = up[0]; in mpih_sqr_n_basecase()
231 MPN_COPY(prodp, up, size); in mpih_sqr_n_basecase()
236 cy_limb = mpihelp_mul_1(prodp, up, size, v_limb); in mpih_sqr_n_basecase()
244 v_limb = up[i]; in mpih_sqr_n_basecase()
248 cy_limb = mpihelp_add_n(prodp, prodp, up, size); in mpih_sqr_n_basecase()
250 cy_limb = mpihelp_addmul_1(prodp, up, size, v_limb); in mpih_sqr_n_basecase()
258 mpih_sqr_n(mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t size, mpi_ptr_t tspace) in mpih_sqr_n() argument
274 MPN_SQR_N_RECURSE(prodp, up, esize, tspace); in mpih_sqr_n()
275 cy_limb = mpihelp_addmul_1(prodp + esize, up, esize, up[esize]); in mpih_sqr_n()
277 cy_limb = mpihelp_addmul_1(prodp + esize, up, size, up[esize]); in mpih_sqr_n()
289 MPN_SQR_N_RECURSE(prodp + size, up + hsize, hsize, tspace); in mpih_sqr_n()
294 if (mpihelp_cmp(up + hsize, up, hsize) >= 0) in mpih_sqr_n()
295 mpihelp_sub_n(prodp, up + hsize, up, hsize); in mpih_sqr_n()
297 mpihelp_sub_n(prodp, up, up + hsize, hsize); in mpih_sqr_n()
317 MPN_SQR_N_RECURSE(tspace, up, hsize, tspace + size); in mpih_sqr_n()
335 mpi_ptr_t up, mpi_size_t usize, in mpihelp_mul_karatsuba_case() argument
350 MPN_MUL_N_RECURSE(prodp, up, vp, vsize, ctx->tspace); in mpihelp_mul_karatsuba_case()
353 up += vsize; in mpihelp_mul_karatsuba_case()
370 MPN_MUL_N_RECURSE(ctx->tp, up, vp, vsize, ctx->tspace); in mpihelp_mul_karatsuba_case()
375 up += vsize; in mpihelp_mul_karatsuba_case()
383 if (mpihelp_mul(ctx->tspace, vp, vsize, up, usize, &tmp) in mpihelp_mul_karatsuba_case()
394 up, usize, in mpihelp_mul_karatsuba_case()
440 mpihelp_mul(mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t usize, in mpihelp_mul() argument
461 MPN_COPY(prodp, up, usize); in mpihelp_mul()
466 cy = mpihelp_mul_1(prodp, up, usize, v_limb); in mpihelp_mul()
478 cy = mpihelp_add_n(prodp, prodp, up, in mpihelp_mul()
481 cy = mpihelp_addmul_1(prodp, up, usize, v_limb); in mpihelp_mul()
492 if (mpihelp_mul_karatsuba_case(prodp, up, usize, vp, vsize, &ctx) < 0) in mpihelp_mul()