We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de15dd5 commit 1103794Copy full SHA for 1103794
cp-algo/math/poly/impl/div.hpp
@@ -88,6 +88,8 @@ namespace cp_algo::math::poly::impl {
88
auto qqf = fft::dft<base>(qq.a, N);
89
size_t M = q0.deg() + (n + 1) / 2;
90
typename poly::Vector A, B;
91
+ A.resize((M + fft::flen - 1) / fft::flen * fft::flen);
92
+ B.resize((M + fft::flen - 1) / fft::flen * fft::flen);
93
q0f.mul(qqf, A, M);
94
q1f.mul_inplace(qqf, B, M);
95
q.a.resize(n + 1);
@@ -121,6 +123,8 @@ namespace cp_algo::math::poly::impl {
121
123
122
124
125
126
+ A.resize(((n + 1) / 2 + fft::flen - 1) / fft::flen * fft::flen);
127
+ B.resize(((n + 1) / 2 + fft::flen - 1) / fft::flen * fft::flen);
128
q0f.mul(qqf, A, (n + 1) / 2);
129
q1f.mul_inplace(qqf, B, (n + 1) / 2);
130
p.a.resize(n + 1);
0 commit comments