Changeset e380c09 in git


Ignore:
Timestamp:
Jul 19, 2013, 5:18:33 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
Children:
5e03fb4e472ba218e89b7a882ab8398f47f1d5ad
Parents:
47310215b203f48bdcb8ddd5548d21c99d84717a
git-author:
Martin Lee <martinlee84@web.de>2013-07-19 17:18:33+02:00
git-committer:
Martin Lee <martinlee84@web.de>2013-07-22 15:49:54+02:00
Message:
chg: earlier switching to dense gcd
Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_gcd_smallp.cc

    r473102 re380c09  
    42434243  if (FF == GG) return FF/Lc(FF);
    42444244
     4245  int maxNumVars= tmax (getNumVars (FF), getNumVars (GG));
     4246  Variable a, oldA;
     4247  int sizeF= size (FF);
     4248  int sizeG= size (GG);
     4249
     4250  if (sizeF/maxNumVars > sizePerVars1 && sizeG/maxNumVars > sizePerVars1)
     4251  {
     4252    if (hasFirstAlgVar (FF, a) || hasFirstAlgVar (GG, a))
     4253      return GCD_Fp_extension (FF, GG, a);
     4254    else if (CFFactory::gettype() == GaloisFieldDomain)
     4255      return GCD_GF (FF, GG);
     4256    else
     4257      return GCD_small_p (FF, GG);
     4258  }
     4259
    42454260  CanonicalForm F, G, f, g, d, Fb, Gb, Db, Fbt, Gbt, Dbt, B0, B, D0, lcF, lcG,
    42464261                lcD;
     
    42944309  }
    42954310
    4296   int maxNumVars= tmax (getNumVars (F), getNumVars (G));
    4297   Variable a, oldA;
    4298   int sizeF= size (F);
    4299   int sizeG= size (G);
     4311  maxNumVars= tmax (getNumVars (F), getNumVars (G));
     4312  sizeF= size (F);
     4313  sizeG= size (G);
    43004314
    43014315  if (sizeF/maxNumVars > sizePerVars1 && sizeG/maxNumVars > sizePerVars1)
  • factory/fac_ezgcd.cc

    r473102 re380c09  
    432432{
    433433  bool isRat= isOn (SW_RATIONAL);
     434
     435  int maxNumVars= tmax (getNumVars (FF), getNumVars (GG));
     436  int sizeF= size (FF);
     437  int sizeG= size (GG);
     438
     439
     440  if (!isRat)
     441    On (SW_RATIONAL);
     442  if (sizeF/maxNumVars > 500 && sizeG/maxNumVars > 500)
     443  {
     444    Off(SW_USE_EZGCD);
     445    CanonicalForm result=gcd( FF, GG );
     446    On(SW_USE_EZGCD);
     447    if (!isRat)
     448      Off (SW_RATIONAL);
     449    result /= icontent (result);
     450    DEBDECLEVEL( cerr, "ezgcd" );
     451    return result;
     452  }
     453
     454
    434455  CanonicalForm F, G, f, g, d, Fb, Gb, Db, Fbt, Gbt, Dbt, B0, B, D0, lcF, lcG,
    435456                lcD, cand, contcand, result;
     
    497518  }
    498519
    499   int maxNumVars= tmax (getNumVars (F), getNumVars (G));
    500   int sizeF= size (F);
    501   int sizeG= size (G);
    502 
     520  maxNumVars= tmax (getNumVars (F), getNumVars (G));
     521  sizeF= size (F);
     522  sizeG= size (G);
    503523
    504524  if (!isRat)
Note: See TracChangeset for help on using the changeset viewer.