Lines Matching refs:n

61 #define TOOM44_MUL_N_REC(p, a, b, n, ws)				\  argument
64 && BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD)) \
65 mpn_mul_basecase (p, a, n, b, n); \
67 && BELOW_THRESHOLD (n, MUL_TOOM33_THRESHOLD)) \
68 mpn_toom22_mul (p, a, n, b, n, ws); \
70 || BELOW_THRESHOLD (n, MUL_TOOM44_THRESHOLD)) \
71 mpn_toom33_mul (p, a, n, b, n, ws); \
73 mpn_toom44_mul (p, a, n, b, n, ws); \
105 mp_size_t n, s, t; in mpn_toom44_mul() local
110 #define a1 (ap + n) in mpn_toom44_mul()
111 #define a2 (ap + 2*n) in mpn_toom44_mul()
112 #define a3 (ap + 3*n) in mpn_toom44_mul()
114 #define b1 (bp + n) in mpn_toom44_mul()
115 #define b2 (bp + 2*n) in mpn_toom44_mul()
116 #define b3 (bp + 3*n) in mpn_toom44_mul()
120 n = (an + 3) >> 2; in mpn_toom44_mul()
122 s = an - 3 * n; in mpn_toom44_mul()
123 t = bn - 3 * n; in mpn_toom44_mul()
125 ASSERT (0 < s && s <= n); in mpn_toom44_mul()
126 ASSERT (0 < t && t <= n); in mpn_toom44_mul()
133 #define v1 (pp + 2 * n) /* 2n+1 */ in mpn_toom44_mul()
134 #define vinf (pp + 6 * n) /* s+t */ in mpn_toom44_mul()
136 #define vm2 (scratch + 2 * n + 1) /* 2n+1 */ in mpn_toom44_mul()
137 #define vh (scratch + 4 * n + 2) /* 2n+1 */ in mpn_toom44_mul()
138 #define vm1 (scratch + 6 * n + 3) /* 2n+1 */ in mpn_toom44_mul()
139 #define tp (scratch + 8*n + 5) in mpn_toom44_mul()
143 #define amx (pp + n + 1) /* n+1 */ in mpn_toom44_mul()
144 #define bmx (pp + 2*n + 2) /* n+1 */ in mpn_toom44_mul()
145 #define bpx (pp + 4*n + 2) /* n+1 */ in mpn_toom44_mul()
151 flags = toom7_w1_neg & mpn_toom_eval_dgr3_pm2 (apx, amx, ap, n, s, tp); in mpn_toom44_mul()
154 flags ^= toom7_w1_neg & mpn_toom_eval_dgr3_pm2 (bpx, bmx, bp, n, t, tp); in mpn_toom44_mul()
156 TOOM44_MUL_N_REC (v2, apx, bpx, n + 1, tp); /* v2, 2n+1 limbs */ in mpn_toom44_mul()
157 TOOM44_MUL_N_REC (vm2, amx, bmx, n + 1, tp); /* vm2, 2n+1 limbs */ in mpn_toom44_mul()
161 cy = mpn_addlsh1_n (apx, a1, a0, n); in mpn_toom44_mul()
162 cy = 2*cy + mpn_addlsh1_n (apx, a2, apx, n); in mpn_toom44_mul()
163 if (s < n) in mpn_toom44_mul()
167 apx[n] = 2*cy + mpn_lshift (apx + s, apx + s, n - s, 1); in mpn_toom44_mul()
168 MPN_INCR_U (apx + s, n+1-s, cy2); in mpn_toom44_mul()
171 apx[n] = 2*cy + mpn_addlsh1_n (apx, a3, apx, n); in mpn_toom44_mul()
173 cy = mpn_lshift (apx, a0, n, 1); in mpn_toom44_mul()
174 cy += mpn_add_n (apx, apx, a1, n); in mpn_toom44_mul()
175 cy = 2*cy + mpn_lshift (apx, apx, n, 1); in mpn_toom44_mul()
176 cy += mpn_add_n (apx, apx, a2, n); in mpn_toom44_mul()
177 cy = 2*cy + mpn_lshift (apx, apx, n, 1); in mpn_toom44_mul()
178 apx[n] = cy + mpn_add (apx, apx, n, a3, s); in mpn_toom44_mul()
183 cy = mpn_addlsh1_n (bpx, b1, b0, n); in mpn_toom44_mul()
184 cy = 2*cy + mpn_addlsh1_n (bpx, b2, bpx, n); in mpn_toom44_mul()
185 if (t < n) in mpn_toom44_mul()
189 bpx[n] = 2*cy + mpn_lshift (bpx + t, bpx + t, n - t, 1); in mpn_toom44_mul()
190 MPN_INCR_U (bpx + t, n+1-t, cy2); in mpn_toom44_mul()
193 bpx[n] = 2*cy + mpn_addlsh1_n (bpx, b3, bpx, n); in mpn_toom44_mul()
195 cy = mpn_lshift (bpx, b0, n, 1); in mpn_toom44_mul()
196 cy += mpn_add_n (bpx, bpx, b1, n); in mpn_toom44_mul()
197 cy = 2*cy + mpn_lshift (bpx, bpx, n, 1); in mpn_toom44_mul()
198 cy += mpn_add_n (bpx, bpx, b2, n); in mpn_toom44_mul()
199 cy = 2*cy + mpn_lshift (bpx, bpx, n, 1); in mpn_toom44_mul()
200 bpx[n] = cy + mpn_add (bpx, bpx, n, b3, t); in mpn_toom44_mul()
203 ASSERT (apx[n] < 15); in mpn_toom44_mul()
204 ASSERT (bpx[n] < 15); in mpn_toom44_mul()
206 TOOM44_MUL_N_REC (vh, apx, bpx, n + 1, tp); /* vh, 2n+1 limbs */ in mpn_toom44_mul()
209 flags |= toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (apx, amx, ap, n, s, tp); in mpn_toom44_mul()
212 flags ^= toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (bpx, bmx, bp, n, t, tp); in mpn_toom44_mul()
214 TOOM44_MUL_N_REC (vm1, amx, bmx, n + 1, tp); /* vm1, 2n+1 limbs */ in mpn_toom44_mul()
216 TOOM44_MUL_N_REC (v1, apx, bpx, n + 1, tp); /* v1, 2n+1 limbs */ in mpn_toom44_mul()
218 TOOM44_MUL_N_REC (v0, a0, b0, n, tp); in mpn_toom44_mul()
224 mpn_toom_interpolate_7pts (pp, n, flags, vm2, vm1, v2, vh, s + t, tp); in mpn_toom44_mul()