Lines Matching full:tspace
21 #define MPN_MUL_N_RECURSE(prodp, up, vp, size, tspace) \ argument
26 mul_n(prodp, up, vp, size, tspace); \
29 #define MPN_SQR_N_RECURSE(prodp, up, size, tspace) \ argument
34 mpih_sqr_n(prodp, up, size, tspace); \
96 mpi_size_t size, mpi_ptr_t tspace) in mul_n() argument
112 MPN_MUL_N_RECURSE(prodp, up, vp, esize, tspace); in mul_n()
139 * Put result in upper part of PROD and pass low part of TSPACE in mul_n()
140 * as new TSPACE. in mul_n()
143 tspace); in mul_n()
163 * Put result in low part of TSPACE using upper part of TSPACE in mul_n()
164 * as new TSPACE. in mul_n()
166 MPN_MUL_N_RECURSE(tspace, prodp, prodp + hsize, hsize, in mul_n()
167 tspace + size); in mul_n()
177 mpihelp_sub_n(prodp + hsize, prodp + hsize, tspace, in mul_n()
181 mpihelp_add_n(prodp + hsize, prodp + hsize, tspace, in mul_n()
187 * Put result in low part of TSPACE using upper part of TSPACE in mul_n()
188 * as new TSPACE. in mul_n()
190 MPN_MUL_N_RECURSE(tspace, up, vp, hsize, tspace + size); in mul_n()
194 cy += mpihelp_add_n(prodp + hsize, prodp + hsize, tspace, size); in mul_n()
199 MPN_COPY(prodp, tspace, hsize); in mul_n()
200 cy = mpihelp_add_n(prodp + hsize, prodp + hsize, tspace + hsize, in mul_n()
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()
273 * Put result in upper part of PROD and pass low part of TSPACE in mpih_sqr_n()
274 * as new TSPACE. in mpih_sqr_n()
276 MPN_SQR_N_RECURSE(prodp + size, up + hsize, hsize, tspace); in mpih_sqr_n()
287 * Put result in low part of TSPACE using upper part of TSPACE in mpih_sqr_n()
288 * as new TSPACE. */ in mpih_sqr_n()
289 MPN_SQR_N_RECURSE(tspace, prodp, hsize, tspace + size); in mpih_sqr_n()
297 cy -= mpihelp_sub_n(prodp + hsize, prodp + hsize, tspace, size); in mpih_sqr_n()
302 * Put result in low part of TSPACE using upper part of TSPACE in mpih_sqr_n()
303 * as new TSPACE. */ in mpih_sqr_n()
304 MPN_SQR_N_RECURSE(tspace, up, hsize, tspace + size); in mpih_sqr_n()
307 cy += mpihelp_add_n(prodp + hsize, prodp + hsize, tspace, size); in mpih_sqr_n()
312 MPN_COPY(prodp, tspace, hsize); in mpih_sqr_n()
313 cy = mpihelp_add_n(prodp + hsize, prodp + hsize, tspace + hsize, in mpih_sqr_n()
328 if (!ctx->tspace || ctx->tspace_size < vsize) { in mpihelp_mul_karatsuba_case()
329 if (ctx->tspace) in mpihelp_mul_karatsuba_case()
330 mpi_free_limb_space(ctx->tspace); in mpihelp_mul_karatsuba_case()
331 ctx->tspace = mpi_alloc_limb_space(2 * vsize); in mpihelp_mul_karatsuba_case()
332 if (!ctx->tspace) in mpihelp_mul_karatsuba_case()
337 MPN_MUL_N_RECURSE(prodp, up, vp, vsize, ctx->tspace); in mpihelp_mul_karatsuba_case()
348 if (ctx->tspace) in mpihelp_mul_karatsuba_case()
349 mpi_free_limb_space(ctx->tspace); in mpihelp_mul_karatsuba_case()
350 ctx->tspace = NULL; in mpihelp_mul_karatsuba_case()
357 MPN_MUL_N_RECURSE(ctx->tp, up, vp, vsize, ctx->tspace); in mpihelp_mul_karatsuba_case()
370 if (mpihelp_mul(ctx->tspace, vp, vsize, up, usize, &tmp) in mpihelp_mul_karatsuba_case()
379 if (mpihelp_mul_karatsuba_case(ctx->tspace, in mpihelp_mul_karatsuba_case()
386 cy = mpihelp_add_n(prodp, prodp, ctx->tspace, vsize); in mpihelp_mul_karatsuba_case()
387 mpihelp_add_1(prodp + vsize, ctx->tspace + vsize, usize, cy); in mpihelp_mul_karatsuba_case()
399 if (ctx->tspace) in mpihelp_release_karatsuba_ctx()
400 mpi_free_limb_space(ctx->tspace); in mpihelp_release_karatsuba_ctx()
405 if (ctx->tspace) in mpihelp_release_karatsuba_ctx()
406 mpi_free_limb_space(ctx->tspace); in mpihelp_release_karatsuba_ctx()