Lines Matching full:up

21 #define MPN_MUL_N_RECURSE(prodp, up, vp, size, tspace)		\  argument
24 mul_n_basecase(prodp, up, vp, size); \
26 mul_n(prodp, up, vp, size, tspace); \
29 #define MPN_SQR_N_RECURSE(prodp, up, size, tspace) \ argument
32 mpih_sqr_n_basecase(prodp, up, size); \
34 mpih_sqr_n(prodp, up, size, tspace); \
37 /* Multiply the natural numbers u (pointed to by UP) and v (pointed to by VP),
42 * 1. PRODP != UP and PRODP != VP, i.e. the destination
55 mul_n_basecase(mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp, mpi_size_t size) in mul_n_basecase() argument
66 MPN_COPY(prodp, up, size); in mul_n_basecase()
71 cy = mpihelp_mul_1(prodp, up, size, v_limb); in mul_n_basecase()
83 cy = mpihelp_add_n(prodp, prodp, up, size); in mul_n_basecase()
85 cy = mpihelp_addmul_1(prodp, up, size, v_limb); in mul_n_basecase()
95 mul_n(mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp, in mul_n() argument
112 MPN_MUL_N_RECURSE(prodp, up, vp, esize, tspace); in mul_n()
113 cy_limb = mpihelp_addmul_1(prodp + esize, up, esize, vp[esize]); in mul_n()
115 cy_limb = mpihelp_addmul_1(prodp + esize, vp, size, up[esize]); in mul_n()
142 MPN_MUL_N_RECURSE(prodp + size, up + hsize, vp + hsize, hsize, in mul_n()
148 if (mpihelp_cmp(up + hsize, up, hsize) >= 0) { in mul_n()
149 mpihelp_sub_n(prodp, up + hsize, up, hsize); in mul_n()
152 mpihelp_sub_n(prodp, up, up + hsize, hsize); in mul_n()
190 MPN_MUL_N_RECURSE(tspace, up, vp, hsize, tspace + size); in mul_n()
207 void mpih_sqr_n_basecase(mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t size) in mpih_sqr_n_basecase() argument
215 v_limb = up[0]; in mpih_sqr_n_basecase()
218 MPN_COPY(prodp, up, size); in mpih_sqr_n_basecase()
223 cy_limb = mpihelp_mul_1(prodp, up, size, v_limb); in mpih_sqr_n_basecase()
231 v_limb = up[i]; in mpih_sqr_n_basecase()
235 cy_limb = mpihelp_add_n(prodp, prodp, up, size); in mpih_sqr_n_basecase()
237 cy_limb = mpihelp_addmul_1(prodp, up, size, v_limb); in mpih_sqr_n_basecase()
245 mpih_sqr_n(mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t size, mpi_ptr_t tspace) in mpih_sqr_n() argument
261 MPN_SQR_N_RECURSE(prodp, up, esize, tspace); in mpih_sqr_n()
262 cy_limb = mpihelp_addmul_1(prodp + esize, up, esize, up[esize]); in mpih_sqr_n()
264 cy_limb = mpihelp_addmul_1(prodp + esize, up, size, up[esize]); in mpih_sqr_n()
276 MPN_SQR_N_RECURSE(prodp + size, up + hsize, hsize, tspace); in mpih_sqr_n()
281 if (mpihelp_cmp(up + hsize, up, hsize) >= 0) in mpih_sqr_n()
282 mpihelp_sub_n(prodp, up + hsize, up, hsize); in mpih_sqr_n()
284 mpihelp_sub_n(prodp, up, up + hsize, hsize); in mpih_sqr_n()
304 MPN_SQR_N_RECURSE(tspace, up, hsize, tspace + size); in mpih_sqr_n()
322 mpi_ptr_t up, mpi_size_t usize, in mpihelp_mul_karatsuba_case() argument
337 MPN_MUL_N_RECURSE(prodp, up, vp, vsize, ctx->tspace); in mpihelp_mul_karatsuba_case()
340 up += vsize; in mpihelp_mul_karatsuba_case()
357 MPN_MUL_N_RECURSE(ctx->tp, up, vp, vsize, ctx->tspace); in mpihelp_mul_karatsuba_case()
362 up += vsize; in mpihelp_mul_karatsuba_case()
370 if (mpihelp_mul(ctx->tspace, vp, vsize, up, usize, &tmp) in mpihelp_mul_karatsuba_case()
381 up, usize, in mpihelp_mul_karatsuba_case()
411 /* Multiply the natural numbers u (pointed to by UP, with USIZE limbs)
422 * 2. PRODP != UP and PRODP != VP, i.e. the destination
427 mpihelp_mul(mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t usize, in mpihelp_mul() argument
448 MPN_COPY(prodp, up, usize); in mpihelp_mul()
453 cy = mpihelp_mul_1(prodp, up, usize, v_limb); in mpihelp_mul()
465 cy = mpihelp_add_n(prodp, prodp, up, in mpihelp_mul()
468 cy = mpihelp_addmul_1(prodp, up, usize, v_limb); in mpihelp_mul()
479 if (mpihelp_mul_karatsuba_case(prodp, up, usize, vp, vsize, &ctx) < 0) in mpihelp_mul()