Changeset 3d5b277 in git for libpolys/polys/operations/p_Mult_q.cc
- Timestamp:
- Jul 25, 2019, 1:23:11 PM (5 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 35a153cf7acb82519d52d0b74581e9a193d15765
- Parents:
- c9824e54c705dcaedb3b991c6bf81f9f974e758d3f94cbdb24129f0002a999ab5fb63a34f0fc933d
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2019-07-25 13:23:11+02:00
- git-committer:
- GitHub <noreply@github.com>2019-07-25 13:23:11+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/operations/p_Mult_q.cc
r3f94cb r3d5b277 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.