Lines Matching defs:scratch
42 void ProcessorImpl::InvertBasecase(RWDigits Z, Digits V, RWDigits scratch) {
45 DCHECK(scratch.len() >= 2 * V.len());
47 RWDigits X(scratch, 0, 2 * n);
65 // Needs InvertNewtonScratchSpace(V.len) of scratch space.
70 void ProcessorImpl::InvertNewton(RWDigits Z, Digits V, RWDigits scratch) {
73 DCHECK(scratch.len() >= InvertNewtonScratchSpace(vn));
75 const int kWOffset = 0; // S and W can share their scratch space.
104 InvertBasecase(Z, top_part_of_v, scratch);
114 RWDigits S(scratch, kSOffset, 2 * Z.len());
128 RWDigits U(scratch, kUOffset, S.len() + T.len());
138 RWDigits W(scratch, kWOffset, U.len());
186 // Needs InvertScratchSpace(V.len) digits of scratch space.
187 void ProcessorImpl::Invert(RWDigits Z, Digits V, RWDigits scratch) {
191 DCHECK(scratch.len() >= InvertScratchSpace(V.len()));
195 return InvertNewton(Z, V, scratch);
203 InvertBasecase(Z, V, scratch);
214 // Needs DivideBarrettScratchSpace(A.len) scratch space.
216 Digits I, RWDigits scratch) {
224 DCHECK(scratch.len() >= DivideBarrettScratchSpace(A.len()));
235 RWDigits K(scratch, 0, 2 * I.len());
240 // K is no longer used, can re-use {scratch} for P.
243 RWDigits P(scratch, 0, A.len() + 1);
304 ScratchDigits scratch(scratch_len);
305 Invert(I, Digits(B, B.len() - i_len, i_len), scratch);
328 DivideBarrett(Qi, Ri, Z, B, I, scratch);
348 DivideBarrett(Qi, Ri, Z, B, I, scratch);
359 DivideBarrett(Q, R, A, B, I, scratch);