Changeset 517530 in git for factory


Ignore:
Timestamp:
May 7, 2012, 5:34:51 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
dccd6db99cc44c93669e843ddb6e06d2682769b8
Parents:
e7676af1109530ff2efd9495bfdb0fa2cedc576a
Message:
fix: issues with building factory without NTL
Location:
factory
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • factory/algext.cc

    re7676a r517530  
    1313#endif
    1414#endif
     15
     16#include "cf_assert.h"
    1517
    1618#include "templates/ftmpl_functions.h"
     
    589591}
    590592
    591 #ifdef HAVE_NTL
    592593static CanonicalForm
    593594myicontent ( const CanonicalForm & f, const CanonicalForm & c )
    594595{
     596#ifdef HAVE_NTL
    595597    if (f.isOne() || c.isOne())
    596598      return 1;
     
    620622        return g;
    621623    }
    622 }
     624#else
     625    return 1;
    623626#endif
     627}
    624628
    625629CanonicalForm
  • factory/cf_gcd.cc

    re7676a r517530  
    12781278    //printf("try p=%d\n",p);
    12791279    setCharacteristic( p );
     1280#ifdef HAVE_NTL
    12801281    Dp = GCD_small_p (mapinto (f), mapinto (g), cofp, cogp);
     1282#else
     1283    Dp= gcd_poly (mapinto (f), mapinto (g));
     1284    cofp= mapinto (f)/Dp;
     1285    cogp= mapinto (g)/Dp;
     1286#endif
    12811287    Dp /=Dp.lc();
    12821288    cofp /= lc (cofp);
  • factory/cf_gcd_smallp.cc

    re7676a r517530  
    3535#include "cf_iter.h"
    3636#include "cfNewtonPolygon.h"
     37#include "cf_algorithm.h"
    3738
    3839// iinline helper functions:
     
    4546
    4647#include "cf_gcd_smallp.h"
    47 
    48 #ifdef HAVE_NTL
    4948
    5049TIMING_DEFINE_PRINT(gcd_recursion)
     
    7271  return false;
    7372}
     73
     74#ifdef HAVE_NTL
    7475
    7576static const double log2exp= 1.442695041;
  • factory/fac_ezgcd.cc

    re7676a r517530  
    3030#include "facHensel.h"
    3131
     32#ifdef HAVE_NTL
    3233static
    3334int compress4EZGCD (const CanonicalForm& F, const CanonicalForm& G, CFMap & M,
     
    673674  return N (d*cand);
    674675}
     676#endif
    675677
    676678CanonicalForm
    677679ezgcd ( const CanonicalForm & FF, const CanonicalForm & GG )
    678680{
     681#ifdef HAVE_NTL
    679682  REvaluation b;
    680683  return ezgcd( FF, GG, b, false );
    681 }
    682 
     684#else
     685  Off (SW_USE_EZGCD);
     686  return gcd (FF, GG);
     687  On (SW_USE_EZGCD);
     688#endif
     689}
     690
Note: See TracChangeset for help on using the changeset viewer.