Changeset 58603f in git for libpolys/polys/operations/p_Mult_q.cc
- Timestamp:
- Aug 4, 2019, 9:34:39 PM (5 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 2f9e3f171a90f561e7a3c81734eb72998dc8fe82
- Parents:
- 112c79d4f91036791f523bcfbb261d1ba63c2d8f557b878dd8c840afb5ec95de122ba27a0ec99926
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/operations/p_Mult_q.cc
r112c79 r58603f 67 67 } 68 68 69 static void pqLengthApprox(poly p, poly q, int &lp, int &lq, const int min) 70 { 71 int l = 0; 72 73 do 74 { 75 if (p == NULL) 76 { 77 lp=l; 78 lq=l+(q!=NULL); 79 return; 80 } 81 if (q == NULL) /* && p!=NULL */ 82 { 83 lp=l+1; 84 lq=l; 85 return; 86 } 87 if (l>min) /* && p,q!=NULL */ 88 { 89 lp=l; lq=l; 90 return; 91 } 92 pIter(p); 93 pIter(q); 94 l++; 95 } 96 while (1); 97 } 98 69 99 70 100 static poly _p_Mult_q_Bucket(poly p, const int lp, … … 290 320 poly pt; 291 321 292 pqLength(p, q, lp, lq, MIN_LENGTH_FACTORY); 322 // MIN_LENGTH_FACTORY must be >= MIN_LENGTH_FACTORY_QQ, MIN_FLINT_QQ, MIN_FLINT_Zp 20 323 pqLengthApprox(p, q, lp, lq, MIN_LENGTH_FACTORY); 293 324 294 325 if (lp < lq) … … 309 340 if (pure_polys && rField_is_Q(r) && !convSingRFlintR(ctx,r)) 310 341 { 311 lp=pLength(p); 312 //printf("mul in flint\n"); 313 poly res=Flint_Mult_MP(p,lp,q,lq,ctx,r); 342 // lq is a lower bound for the length of p and q 343 poly res=Flint_Mult_MP(p,lq,q,lq,ctx,r); 314 344 if (!copy) 315 345 { … … 325 355 if (pure_polys && rField_is_Zp(r) && !convSingRFlintR(ctx,r)) 326 356 { 327 lp=pLength(p); 328 //printf("mul in flint\n"); 329 poly res=Flint_Mult_MP(p,lp,q,lq,ctx,r); 357 // lq is a lower bound for the length of p and q 358 poly res=Flint_Mult_MP(p,lq,q,lq,ctx,r); 330 359 if (!copy) 331 360 { … … 357 386 { 358 387 lp=pLength(p); 359 assume(lq == pLength(q));388 lq=pLength(q); 360 389 return _p_Mult_q_Bucket(p, lp, q, lq, copy, r); 361 390 }
Note: See TracChangeset
for help on using the changeset viewer.