Changeset 0dff6bc in git for factory/cf_factor.cc


Ignore:
Timestamp:
Mar 22, 2013, 4:59:20 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '1d362c315e551a5b527ab0759f8839cf0e94f3a5')
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
File:
1 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
Note: See TracChangeset for help on using the changeset viewer.