Changeset 48e0bcb in git for factory/facMul.cc


Ignore:
Timestamp:
Jun 17, 2020, 3:34:43 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
e4514d3151a5c53437b9fa2f30bda8febfd87539ed6f2bb0876535189130e32d71be46f776012a36
Parents:
95e373294f19817a4516238a9d8dd18b1a626ab9
Message:
seperate NTL and FLINT: nulNTL and factorize
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facMul.cc

    r95e3732 r48e0bcb  
    3232#include <NTL/lzz_pEX.h>
    3333#include "NTLconvert.h"
     34#endif
    3435
    3536#ifdef HAVE_FLINT
     
    452453        fq_ctx_clear (fq_con);
    453454        return b (result);
    454 #else
     455#endif
     456#ifdef HAVE_NTL
    455457        ZZ_p::init (convertFacCF2NTLZZ (b.getpk()));
    456458        ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (mipo));
     
    489491      }
    490492      return mulFLINTQ (F, G);
    491 #else
     493#endif
     494#ifdef HAVE_NTL
    492495      if (b.getp() != 0)
    493496      {
     
    569572
    570573          return b (result);
    571 #else
     574#endif
     575#ifdef HAVE_NTL
    572576          ZZ_p::init (convertFacCF2NTLZZ (b.getpk()));
    573577          ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (getMipo (alpha)));
     
    607611  ASSERT (F.isUnivariate() && G.isUnivariate(), "expected univariate polys");
    608612  ASSERT (F.level() == G.level(), "expected polys of same level");
     613#ifdef HAVE_NTL
    609614#if (!defined(HAVE_FLINT) ||  __FLINT_RELEASE < 20400)
    610615  if (fac_NTL_char != getCharacteristic())
     
    613618    zz_p::init (getCharacteristic());
    614619  }
     620#endif
    615621#endif
    616622  Variable alpha;
     
    646652    nmod_poly_clear (FLINTmipo);
    647653    fq_nmod_ctx_clear (fq_con);
    648 #else
     654    return result;
     655#elif defined(AHVE_NTL)
    649656    zz_pX NTLMipo= convertFacCF2NTLzzpX (getMipo (alpha));
    650657    zz_pE::init (NTLMipo);
     
    653660    mul (NTLF, NTLF, NTLG);
    654661    result= convertNTLzz_pEX2CF(NTLF, F.mvar(), alpha);
     662    return result;
    655663#endif
    656664  }
     
    665673    nmod_poly_clear (FLINTF);
    666674    nmod_poly_clear (FLINTG);
    667 #else
     675    return result;
     676#endif
     677#ifdef HAVE_NTL
    668678    zz_pX NTLF= convertFacCF2NTLzzpX (F);
    669679    zz_pX NTLG= convertFacCF2NTLzzpX (G);
    670680    mul (NTLF, NTLF, NTLG);
    671     result= convertNTLzzpX2CF(NTLF, F.mvar());
    672 #endif
    673   }
    674   return result;
     681    return convertNTLzzpX2CF(NTLF, F.mvar());
     682#endif
     683  }
     684  return F*G;
    675685}
    676686
     
    37353745// end division
    37363746
    3737 #endif
Note: See TracChangeset for help on using the changeset viewer.