Changeset 0dff6bc in git


Ignore:
Timestamp:
Mar 22, 2013, 4:59:20 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5a0dde71de01068fad5736a17555c993ecbbf495')
Children:
15913a696349fcc40d93d2f1edb152b6effea44a
Parents:
d4b25e07575f90d19a7fc324664d102ae84e47ad
git-author:
Martin Lee <martinlee84@web.de>2013-03-22 16:59:20+01:00
git-committer:
Martin Lee <martinlee84@web.de>2013-03-26 14:36:56+01:00
Message:
chg: threshold for using FLINT factorization over Z/p
Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_factor.cc

    rd4b25e r0dff6bc  
    430430    if (f.isUnivariate())
    431431    {
     432#ifdef HAVE_NTL
    432433#ifdef HAVE_FLINT
    433       nmod_poly_t f1;
    434       convertFacCF2nmod_poly_t (f1, f);
    435       nmod_poly_factor_t result;
    436       nmod_poly_factor_init (result);
    437       mp_limb_t leadingCoeff= nmod_poly_factor (result, f1);
    438       F= convertFLINTnmod_poly_factor2FacCFFList (result, leadingCoeff, f.mvar());
    439       nmod_poly_factor_clear (result);
    440       nmod_poly_clear (f1);
    441 #else
    442 #ifdef HAVE_NTL
     434      if (degree (f) < 300)
     435      {
     436        nmod_poly_t f1;
     437        convertFacCF2nmod_poly_t (f1, f);
     438        nmod_poly_factor_t result;
     439        nmod_poly_factor_init (result);
     440        mp_limb_t leadingCoeff= nmod_poly_factor (result, f1);
     441        F= convertFLINTnmod_poly_factor2FacCFFList (result, leadingCoeff, f.mvar());
     442        nmod_poly_factor_clear (result);
     443        nmod_poly_clear (f1);
     444      }
     445      else
     446#endif
    443447      if (isOn(SW_USE_NTL) && (isPurePoly(f)))
    444448      {
     
    546550          F=FpFactorizeUnivariateCZ( f, issqrfree, 0, Variable(), Variable() );
    547551      }
    548 #endif //HAVE_FLINT
    549552    }
    550553    else
  • factory/facFqBivar.cc

    rd4b25e r0dff6bc  
    232232  {
    233233#ifdef HAVE_FLINT
    234     nmod_poly_t FLINTA;
    235     convertFacCF2nmod_poly_t (FLINTA, A);
    236     nmod_poly_factor_t result;
    237     nmod_poly_factor_init (result);
    238     mp_limb_t leadingCoeff= nmod_poly_factor (result, FLINTA);
    239     factorsA= convertFLINTnmod_poly_factor2FacCFFList (result, leadingCoeff, x);
    240     if (factorsA.getFirst().factor().inCoeffDomain())
    241       factorsA.removeFirst();
    242     nmod_poly_factor_clear (result);
    243     nmod_poly_clear (FLINTA);
    244 #else
     234    if (degree (A) < 300)
     235    {
     236      nmod_poly_t FLINTA;
     237      convertFacCF2nmod_poly_t (FLINTA, A);
     238      nmod_poly_factor_t result;
     239      nmod_poly_factor_init (result);
     240      mp_limb_t leadingCoeff= nmod_poly_factor (result, FLINTA);
     241      factorsA= convertFLINTnmod_poly_factor2FacCFFList (result, leadingCoeff, x);
     242      if (factorsA.getFirst().factor().inCoeffDomain())
     243        factorsA.removeFirst();
     244      nmod_poly_factor_clear (result);
     245      nmod_poly_clear (FLINTA);
     246    }
     247    else
     248#endif
    245249    if (getCharacteristic() > 2)
    246250    {
     
    260264                                                          x);
    261265    }
    262 #endif
    263266  }
    264267  CFList uniFactors;
Note: See TracChangeset for help on using the changeset viewer.