Changeset 1130ffc in git for factory/fac_ezgcd.cc
- Timestamp:
- Oct 25, 2012, 2:25:59 PM (11 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 139f6f800b915490dfaa914ef7676d29a3236b92186df6b3fe891f605e0e3e7324333e7713165436
- Parents:
- becbea965e6c5de8e8ab195c7f480cabc295ac0cd91423947d67c2ab2eaf1aae4a61f9f2988e9510
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/fac_ezgcd.cc
rbecbea r1130ffc 15 15 #include "config.h" 16 16 17 #include "timing.h" 17 18 #include "cf_assert.h" 18 19 #include "debug.h" … … 30 31 31 32 #ifdef HAVE_NTL 33 34 TIMING_DEFINE_PRINT(ez_eval) 35 TIMING_DEFINE_PRINT(ez_compress) 36 TIMING_DEFINE_PRINT(ez_hensel_lift) 37 TIMING_DEFINE_PRINT(ez_content) 38 TIMING_DEFINE_PRINT(ez_termination) 39 32 40 static 33 41 int compress4EZGCD (const CanonicalForm& F, const CanonicalForm& G, CFMap & M, … … 432 440 Off (SW_RATIONAL); 433 441 442 TIMING_START (ez_compress) 434 443 CFMap M,N; 435 444 int smallestDegLev; … … 444 453 F= M (F); 445 454 G= M (G); 455 TIMING_END_AND_PRINT (ez_compress, "time for compression in EZ: ") 446 456 447 457 DEBINCLEVEL( cerr, "ezgcd" ); 448 458 DEBOUTLN( cerr, "FF = " << FF ); 449 459 DEBOUTLN( cerr, "GG = " << GG ); 460 TIMING_START (ez_content) 450 461 f = content( F, x ); g = content( G, x ); d = gcd( f, g ); 451 462 d /= icontent (d); … … 453 464 DEBOUTLN( cerr, "g = " << g ); 454 465 F /= f; G /= g; 466 TIMING_END_AND_PRINT (ez_content, "time to extract content in EZ: ") 455 467 if ( F.isUnivariate() && G.isUnivariate() ) 456 468 { … … 500 512 DEBOUTLN( cerr, "F = " << F ); 501 513 DEBOUTLN( cerr, "G = " << G ); 514 TIMING_START (ez_eval) 502 515 if (!findeval( F, G, Fb, Gb, Db, b, delta, degF, degG, maxeval, count, 503 516 o, 25, l)) … … 512 525 return N (d*result); 513 526 } 527 TIMING_END_AND_PRINT (ez_eval, "time to find eval point in EZ1: ") 514 528 DEBOUTLN( cerr, "found evaluation b = " << b ); 515 529 DEBOUTLN( cerr, "F(b) = " << Fb ); … … 530 544 { 531 545 bt = b; 546 TIMING_START (ez_eval) 532 547 if (!findeval( F, G, Fbt, Gbt, Dbt, bt, delta, degF, degG, maxeval, count, 533 548 o, 25,l )) … … 542 557 return N (d*result); 543 558 } 559 TIMING_END_AND_PRINT (ez_eval, "time to find eval point in EZ2: ") 544 560 int dd=degree( Dbt ); 545 561 if ( dd /*degree( Dbt )*/ == 0 ) … … 636 652 DEBOUTLN( cerr, "(hensel) DD = " << DD ); 637 653 DEBOUTLN( cerr, "(hensel) lcDD = " << lcDD ); 654 TIMING_START (ez_hensel_lift) 638 655 gcdfound= Hensel (B*lcD, DD, b, lcDD); 656 TIMING_END_AND_PRINT (ez_hensel_lift, "time to hensel lift in EZ: ") 639 657 DEBOUTLN( cerr, "(hensel finished) DD = " << DD ); 640 658 … … 653 671 if (gcdfound) 654 672 { 673 TIMING_START (ez_termination) 655 674 contcand= content (DD[2], Variable (1)); 656 675 cand = DD[2] / contcand; … … 659 678 else 660 679 gcdfound = fdivides( cand, F ) && cand*(DD[1]/(lcD/contcand)) == G; 680 TIMING_END_AND_PRINT (ez_termination, 681 "time for termination test in EZ: ") 661 682 } 662 683 /// ---> A8 (gcdfound)
Note: See TracChangeset
for help on using the changeset viewer.