Changeset e7a487 in git
- Timestamp:
- Feb 22, 2012, 6:41:12 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- a3aa3f3540f7d9604a809fe2b268a4115e7aef9a
- Parents:
- 9b8b090bca59f6bb48b468a6a1b63a90e53e6299ff3a4f4a8e655885eb376e551f47339a6de25bf0
- Location:
- factory
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_gcd_smallp.cc
r9b8b09 re7a487 1474 1474 { 1475 1475 int r= M.size(); 1476 ASSERT (c == r, "number of columns and rows not equal");1477 1476 ASSERT (A.size() == r, "vector does not have right size"); 1478 1477 if (r == 1) … … 1971 1970 1972 1971 Variable x= Variable (1); 1973 ASSERT (degree (A, y) == 0, "expected degree (F, 1) == 0");1974 ASSERT (degree (B, y) == 0, "expected degree (G, 1) == 0");1972 ASSERT (degree (A, x) == 0, "expected degree (F, 1) == 0"); 1973 ASSERT (degree (B, x) == 0, "expected degree (G, 1) == 0"); 1975 1974 1976 1975 //univariate case … … 2229 2228 2230 2229 Variable x= Variable (1); 2231 ASSERT (degree (A, y) == 0, "expected degree (F, 1) == 0");2232 ASSERT (degree (B, y) == 0, "expected degree (G, 1) == 0");2230 ASSERT (degree (A, x) == 0, "expected degree (F, 1) == 0"); 2231 ASSERT (degree (B, x) == 0, "expected degree (G, 1) == 0"); 2233 2232 2234 2233 //univariate case -
factory/cf_gcd_smallp.h
r9b8b09 re7a487 25 25 // #include "config.h" 26 26 #include "cf_assert.h" 27 28 #include "cf_factory.h" 27 29 28 30 CanonicalForm GCD_Fp_extension (const CanonicalForm& F, const CanonicalForm& G, -
factory/configure.ac
r9b8b09 re7a487 76 76 AC_ARG_ENABLE( 77 77 assertions, 78 [AS_HELP_STRING([-- enable-assertions],[build Factory with assertions activated])],78 [AS_HELP_STRING([--disable-assertions],[build Factory with no assertions])], 79 79 , 80 enable_assertions= no)80 enable_assertions=yes) 81 81 82 82 AC_ARG_ENABLE( -
factory/debug.h
r9b8b09 re7a487 13 13 14 14 #ifdef DEBUGOUTPUT 15 #include <iostream> 15 16 #ifdef HAVE_IOSTREAM 16 17 #include <iostream> … … 22 23 extern char * deb_level_msg; 23 24 #define DEBINCLEVEL(stream, msg) \ 24 (st ream << deb_level_msg << "entering << " << msg << " >>" <<endl, deb_inc_level())25 (std::stream << deb_level_msg << "entering << " << msg << " >>" << std::endl, deb_inc_level()) 25 26 #define DEBDECLEVEL(stream, msg) \ 26 (deb_dec_level(), st ream << deb_level_msg << "leaving << " << msg << " >>" <<endl)27 (deb_dec_level(), std::stream << deb_level_msg << "leaving << " << msg << " >>" << std::endl) 27 28 #define DEBOUTSL(stream) \ 28 (st ream << deb_level_msg,stream.flush())29 (std::stream << deb_level_msg, std::stream.flush()) 29 30 #define DEBOUT(stream, objects) \ 30 (st ream << objects,stream.flush())31 (std::stream << objects, std::stream.flush()) 31 32 #define DEBOUTENDL(stream) \ 32 (st ream <<endl)33 (std::stream << std::endl) 33 34 #define DEBOUTLN(stream, objects) \ 34 (st ream << deb_level_msg << objects <<endl)35 (std::stream << deb_level_msg << objects << std::endl) 35 36 #else /* DEBUGOUTPUT */ 36 #define DEBINCLEVEL(stream, msg) ((void) 0)37 #define DEBDECLEVEL(stream, msg) ((void) 0)38 #define DEBOUTSL(stream) ((void) 0)39 #define DEBOUT(stream, objects) ((void) 0)40 #define DEBOUTENDL(stream) ((void) 0)41 #define DEBOUTLN(stream, objects) ((void) 0)37 #define DEBINCLEVEL(stream, msg) 38 #define DEBDECLEVEL(stream, msg) 39 #define DEBOUTSL(stream) 40 #define DEBOUT(stream, objects) 41 #define DEBOUTENDL(stream) 42 #define DEBOUTLN(stream, objects) 42 43 #endif /* DEBUGOUTPUT */ -
factory/facAlgExt.cc
r9b8b09 re7a487 168 168 169 169 factors.insert (CFFactor (Lc(F), 1)); 170 ASSERT (degree (buf) <= 0, "bug in AlgExtFactorize");171 170 if (save_rat) Off(SW_RATIONAL); 172 171 return factors; -
factory/facBivar.cc
r9b8b09 re7a487 24 24 25 25 #ifdef HAVE_NTL 26 TIMING_DEFINE_PRINT(fac_uni_factorizer) 27 TIMING_DEFINE_PRINT(fac_hensel_lift) 28 TIMING_DEFINE_PRINT(fac_factor_recombination) 26 TIMING_DEFINE_PRINT(uni_factorize) 27 TIMING_DEFINE_PRINT(hensel_lift12) 29 28 30 29 CFList conv (const CFFList& L) … … 224 223 225 224 // univariate factorization 226 TIMING_START ( fac_uni_factorizer);225 TIMING_START (uni_factorize); 227 226 228 227 if (extension) … … 230 229 else 231 230 bufUniFactors= conv (factorize (bufAeval, true)); 232 TIMING_END_AND_PRINT ( fac_uni_factorizer,231 TIMING_END_AND_PRINT (uni_factorize, 233 232 "time for univariate factorization: "); 234 233 DEBOUTLN (cerr, "Lc (bufAeval)*prod (bufUniFactors)== bufAeval " << 235 prod (bufUniFactors)*Lc (bufAeval) == bufAeval);236 237 TIMING_START ( fac_uni_factorizer);234 (prod (bufUniFactors)*Lc (bufAeval) == bufAeval)); 235 236 TIMING_START (uni_factorize); 238 237 if (extension) 239 238 bufUniFactors2= conv (factorize (bufAeval2, v)); 240 239 else 241 240 bufUniFactors2= conv (factorize (bufAeval2, true)); 242 TIMING_END_AND_PRINT ( fac_uni_factorizer,241 TIMING_END_AND_PRINT (uni_factorize, 243 242 "time for univariate factorization in y: "); 244 243 DEBOUTLN (cerr, "Lc (Aeval2)*prod (uniFactors2)== Aeval2 " << 245 prod (bufUniFactors2)*Lc (bufAeval2) == bufAeval2);244 (prod (bufUniFactors2)*Lc (bufAeval2) == bufAeval2)); 246 245 247 246 if (bufUniFactors.getFirst().inCoeffDomain()) … … 369 368 bool earlySuccess= false; 370 369 CFList earlyFactors; 371 TIMING_START ( fac_hensel_lift);370 TIMING_START (hensel_lift12); 372 371 uniFactors= henselLiftAndEarly 373 372 (A, earlySuccess, earlyFactors, degs, liftBound, 374 373 uniFactors, dummy, evaluation); 375 TIMING_END_AND_PRINT ( fac_hensel_lift, "time for hensel lifting: ");374 TIMING_END_AND_PRINT (hensel_lift12, "time for hensel lifting: "); 376 375 DEBOUTLN (cerr, "lifted factors= " << uniFactors); 377 376 -
factory/facFactorize.cc
r9b8b09 re7a487 30 30 #include "cf_reval.h" 31 31 #include "facSparseHensel.h" 32 33 TIMING_DEFINE_PRINT(bi_factorize) 34 TIMING_DEFINE_PRINT(hensel_lift) 35 TIMING_DEFINE_PRINT(factor_recombination) 32 36 33 37 #ifdef HAVE_NTL … … 691 695 bufLift= degree (A, y) + 1 + degree (LC(A, x), y); 692 696 693 TIMING_START ( fac_bi_factorizer);697 TIMING_START (bi_factorize); 694 698 bufBiFactors= ratBiSqrfFactorize (bufAeval.getFirst(), v); 695 TIMING_END_AND_PRINT ( fac_bi_factorizer,699 TIMING_END_AND_PRINT (bi_factorize, 696 700 "time for bivariate factorization: "); 697 701 bufBiFactors.removeFirst(); … … 969 973 CFList earlyFactors; 970 974 ExtensionInfo info= ExtensionInfo (false); 971 TIMING_START (fac_hensel_lift); 972 CFList liftedFactors= henselLiftAndEarly 973 (A, MOD, liftBounds, earlySuccess, earlyFactors, 974 Aeval, biFactors, evaluation, info); 975 TIMING_END_AND_PRINT (fac_hensel_lift, "time for hensel lifting: "); 976 977 TIMING_START (fac_factor_recombination); 975 CFList liftedFactors; 976 TIMING_START (hensel_lift); 977 liftedFactors= henselLiftAndEarly 978 (A, MOD, liftBounds, earlySuccess, earlyFactors, 979 Aeval, biFactors, evaluation, info); 980 TIMING_END_AND_PRINT (hensel_lift, "time for hensel lifting: "); 981 982 TIMING_START (factor_recombination); 978 983 factors= factorRecombination (A, liftedFactors, MOD); 979 TIMING_END_AND_PRINT (fac _factor_recombination,984 TIMING_END_AND_PRINT (factor_recombination, 980 985 "time for factor recombination: "); 981 986 -
factory/facFqBivar.cc
r9b8b09 re7a487 40 40 41 41 TIMING_DEFINE_PRINT(fac_uni_factorizer) 42 TIMING_DEFINE_PRINT(fac_hensel_lift) 43 TIMING_DEFINE_PRINT(fac_factor_recombination) 42 TIMING_DEFINE_PRINT(fac_hensel_lift12) 44 43 45 44 CanonicalForm prodMod0 (const CFList& L, const CanonicalForm& M) … … 464 463 return result; 465 464 } 466 DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, M) == F " <<467 (LC (F, 1)*prodMod (factors, M) == F));465 DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, N) == F " << 466 (LC (F, 1)*prodMod (factors, N) == F)); 468 467 CFList T, S; 469 468 … … 5588 5587 "time for univariate factorization: "); 5589 5588 DEBOUTLN (cerr, "Lc (bufAeval)*prod (bufUniFactors)== bufAeval " << 5590 prod (bufUniFactors)*Lc (bufAeval) == bufAeval);5589 (prod (bufUniFactors)*Lc (bufAeval) == bufAeval)); 5591 5590 5592 5591 if (!derivXZero && !fail2) … … 5597 5596 "time for univariate factorization in y: "); 5598 5597 DEBOUTLN (cerr, "Lc (Aeval2)*prod (uniFactors2)== Aeval2 " << 5599 prod (bufUniFactors2)*Lc (bufAeval2) == bufAeval2);5598 (prod (bufUniFactors2)*Lc (bufAeval2) == bufAeval2)); 5600 5599 } 5601 5600 … … 5754 5753 bool earlySuccess= false; 5755 5754 CFList earlyFactors; 5756 TIMING_START (fac_hensel_lift );5755 TIMING_START (fac_hensel_lift12); 5757 5756 uniFactors= henselLiftAndEarly 5758 5757 (A, earlySuccess, earlyFactors, degs, liftBound, 5759 5758 uniFactors, info, evaluation); 5760 TIMING_END_AND_PRINT (fac_hensel_lift , "time for hensel lifting: ");5759 TIMING_END_AND_PRINT (fac_hensel_lift12, "time for hensel lifting: "); 5761 5760 DEBOUTLN (cerr, "lifted factors= " << uniFactors); 5762 5761 … … 5777 5776 else if (degree (A) > 4 && beta.level() == 1 && (2*minBound)/degMipo < 32) 5778 5777 { 5779 TIMING_START (fac_hensel_lift );5778 TIMING_START (fac_hensel_lift12); 5780 5779 if (extension) 5781 5780 { … … 5795 5794 factors= Union (lll, factors); 5796 5795 } 5797 TIMING_END_AND_PRINT (fac_hensel_lift , "time for hensel lifting: ");5796 TIMING_END_AND_PRINT (fac_hensel_lift12, "time for hensel lifting: "); 5798 5797 DEBOUTLN (cerr, "lifted factors= " << uniFactors); 5799 5798 } … … 5802 5801 bool earlySuccess= false; 5803 5802 CFList earlyFactors; 5804 TIMING_START (fac_hensel_lift );5803 TIMING_START (fac_hensel_lift12); 5805 5804 uniFactors= henselLiftAndEarly 5806 5805 (A, earlySuccess, earlyFactors, degs, liftBound, 5807 5806 uniFactors, info, evaluation); 5808 TIMING_END_AND_PRINT (fac_hensel_lift , "time for hensel lifting: ");5807 TIMING_END_AND_PRINT (fac_hensel_lift12, "time for hensel lifting: "); 5809 5808 DEBOUTLN (cerr, "lifted factors= " << uniFactors); 5810 5809 -
factory/facFqFactorize.cc
r9b8b09 re7a487 2705 2705 CFList MOD; 2706 2706 bool earlySuccess; 2707 CFList earlyFactors ;2707 CFList earlyFactors, liftedFactors; 2708 2708 TIMING_START (fac_hensel_lift); 2709 CFListliftedFactors= henselLiftAndEarly2710 2711 2709 liftedFactors= henselLiftAndEarly 2710 (A, MOD, liftBounds, earlySuccess, earlyFactors, 2711 Aeval, biFactors, evaluation, info); 2712 2712 TIMING_END_AND_PRINT (fac_hensel_lift, "time for hensel lifting: "); 2713 2713 -
factory/fac_berlekamp.cc
r9b8b09 re7a487 22 22 for ( int i = 0; i < n; i++ ) { 23 23 for ( int j = 0; j < n; j++ ) 24 cerr << Q[i][j] << " ";25 cerr <<endl;26 } 27 cerr <<endl;24 std::cerr << Q[i][j] << " "; 25 std::cerr << std::endl; 26 } 27 std::cerr << std::endl; 28 28 } 29 29 #endif /* DEBUGOUTPUT */ … … 34 34 for ( int i = 0; i < n; i++ ) { 35 35 for ( int j = 0; j < n; j++ ) { 36 gf_print( cerr, Q[i][j] );37 cerr << " ";38 } 39 cerr <<endl;40 } 41 cerr <<endl;36 gf_print( std::cerr, Q[i][j] ); 37 std::cerr << " "; 38 } 39 std::cerr << std::endl; 40 } 41 std::cerr << std::endl; 42 42 } 43 43 #endif /* DEBUGOUTPUT */ -
factory/fac_multihensel.cc
r9b8b09 re7a487 166 166 A[i] = remainder( pk( a[i] * C0 ), P0[i], pk ); 167 167 DEBOUTLN( cerr, "the first approximation of the correction coefficients is " << A ); 168 #ifdef DEBUGOUTPUT168 /*#ifdef DEBUGOUTPUT 169 169 if ( check_dummy( A, P, Q ) - C != 0 ) 170 170 { … … 174 174 DEBOUTLN( cerr, " Q " << Q ); 175 175 } 176 #endif 176 #endif*/ 177 177 for ( m = 0; m <= h && ( m == 0 || Dm != 0 ); m++ ) 178 178 { … … 216 216 DEBOUTLN( cerr, "the correction coefficients at step " << m ); 217 217 DEBOUTLN( cerr, "are now " << A ); 218 #ifdef DEBUGOUTPUT218 /*#ifdef DEBUGOUTPUT 219 219 if ( check_dummy( A, P, Q ) - C != 0 ) { 220 220 DEBOUTLN( cerr, "there is an error detected, the correction coefficients do not" ); … … 223 223 DEBOUTLN( cerr, " Q " << Q ); 224 224 } 225 #endif 225 #endif*/ 226 226 } 227 227 DEBDECLEVEL( cerr, "findCorrCoeffs" ); -
factory/fac_univar.cc
r9b8b09 re7a487 32 32 #ifdef DEBUGOUTPUT 33 33 #define DEBOUTHPRINT(stream, msg, hg) \ 34 {st ream << deb_level_msg << msg, stream.flush(); hprint( hg ); stream <<endl;}34 {std::stream << deb_level_msg << msg, std::stream.flush(); hprint( hg ); std::stream << std::endl;} 35 35 36 36 static void … … 38 38 { 39 39 int n = a[0]; 40 cerr << "( " << n << ": ";40 std::cerr << "( " << n << ": "; 41 41 int i = 1; 42 42 while ( i < n ) { 43 43 if ( a[i] != 0 ) 44 cerr << i << " ";44 std::cerr << i << " "; 45 45 i++; 46 46 } 47 cerr << ")";47 std::cerr << ")"; 48 48 } 49 49 #else /* DEBUGOUTPUT */ -
factory/gfops.cc
r9b8b09 re7a487 31 31 32 32 const int gf_primes_len = 42; 33 //static unsigned short gf_primes [] = 34 //{ 35 // 2, 3, 5, 7, 11, 13, 17, 19, 36 // 23, 29, 31, 37, 41, 43, 47, 53, 37 // 59, 61, 67, 71, 73, 79, 83, 89, 38 // 97, 101, 103, 107, 109, 113, 127, 131, 39 // 137, 139, 149, 151, 157, 163, 167, 173, 40 // 179, 181, 191, 193, 197, 199, 223, 211, 41 // 227, 229, 233, 239, 241, 251 42 //}; 33 #ifndef NOASSERT 34 static unsigned short gf_primes [] = 35 { 36 2, 3, 5, 7, 11, 13, 17, 19, 37 23, 29, 31, 37, 41, 43, 47, 53, 38 59, 61, 67, 71, 73, 79, 83, 89, 39 97, 101, 103, 107, 109, 113, 127, 131, 40 137, 139, 149, 151, 157, 163, 167, 173, 41 179, 181, 191, 193, 197, 199, 223, 211, 42 227, 229, 233, 239, 241, 251 43 }; 44 #endif 43 45 44 46 int gf_q = 0; … … 190 192 } 191 193 192 //static bool gf_valid_combination ( int p, int n ) 193 //{ 194 // int i = 0; 195 // while ( i < gf_primes_len && gf_primes[i] != p ) i++; 196 // if ( i == gf_primes_len ) 197 // return false; 198 // else 199 // { 200 // i = n; 201 // int a = 1; 202 // while ( a < gf_maxtable && i > 0 ) 203 // { 204 // a *= p; 205 // i--; 206 // } 207 // if ( i > 0 || a > gf_maxtable ) 208 // return false; 209 // else 210 // return true; 211 // } 212 //} 194 #ifndef NOASSERT 195 static bool gf_valid_combination ( int p, int n ) 196 { 197 int i = 0; 198 while ( i < gf_primes_len && gf_primes[i] != p ) i++; 199 if ( i == gf_primes_len ) 200 return false; 201 else 202 { 203 i = n; 204 int a = 1; 205 while ( a < gf_maxtable && i > 0 ) 206 { 207 a *= p; 208 i--; 209 } 210 if ( i > 0 || a > gf_maxtable ) 211 return false; 212 else 213 return true; 214 } 215 } 216 #endif 213 217 214 218 void gf_setcharacteristic ( int p, int n, char name ) -
factory/libfac/charset/alg_factor.cc
r9b8b09 re7a487 28 28 29 29 #include <libfac/factor/debug.h> 30 #include "timing.h"31 TIMING_DEFINE_PRINT(newfactoras_time)32 30 33 31 static Varlist -
factory/libfac/factor/timing.h
r9b8b09 re7a487 1 //////////////////////////////////////////////////////////// 2 // emacs edit mode for this file is -*- C++ -*- 3 // $Id$ 4 //////////////////////////////////////////////////////////// 5 // It is possible to include this file multiple times for different 6 // settings of TIMING (but now this isn't used) 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id$ */ 3 4 /* It should be possible to include this file multiple times for different */ 5 /* settings of TIMING */ 7 6 8 7 #undef TIMING_START 9 8 #undef TIMING_END 9 #undef TIMING_END_AND_PRINT 10 10 #undef TIMING_DEFINE_PRINT 11 11 #undef TIMING_DEFINE_PRINTPROTO … … 14 14 #ifdef TIMING 15 15 #include <time.h> 16 #if ! defined(WINNT) || defined(__GNUC__) 16 17 #include <sys/times.h> 17 #ifdef HAVE_IOSTREAM 18 #include <iostream> 19 #define OSTREAM std::ostream 20 #define ISTREAM std::istream 21 #elif defined(HAVE_IOSTREAM_H) 22 #include <iostream.h> 23 #define OSTREAM ostream 24 #define ISTREAM istream 18 #include <sys/param.h> 25 19 #endif 20 #ifndef NOSTREAMIO 21 #ifdef HAVE_CSTDIO 22 #include <cstdio> 23 #else 24 #include <stdio.h> 25 #endif 26 #endif 27 28 // need to be adjusted on your machine: 29 // the number of ticks per second: HZ 30 #if ! defined (HZ) && defined (CLOCKS_PER_SEC) 31 #define HZ CLOCKS_PER_SEC 32 #endif 33 #if ! defined (HZ) && defined (CLK_TCK) 34 #define HZ CLK_TCK 35 #endif 36 #ifndef HZ 37 #ifdef sun 38 #define HZ 60.0 39 #else 40 #define HZ 100.0 41 #endif 42 #endif 43 44 #if defined(WINNT) && ! defined(__GNUC__) 45 46 #define TIMING_START(t) { clock_t timing_ ## t ## _start, timing_ ## t ## _end; \ 47 timing_ ## t ## _start = clock(); 48 #define TIMING_END(t) timing_ ## t ## _end = clock(); \ 49 timing_ ## t ## _time += timing_ ## t ## _end - timing_ ## t ## _start; } 50 #define TIMING_END_AND_PRINT(t, msg) times( &timing_ ## t ## _end ); \ 51 fprintf( stderr, "%s%.2f sec\n", msg, \ 52 float( timing_ ## t ## _end - timing_ ## t ## _start ) / HZ ); \ 53 timing_ ## t ## _time += timing_ ## t ## _end - timing_ ## t ## _start; } 54 #define TIMING_DEFINE_PRINT(t) clock_t timing_ ## t ## _time; \ 55 void timing_print_ ## t ( char * msg ) { \ 56 fprintf( stderr, "%s%.2f sec\n", msg, float(timing_ ## t ## _time) / HZ ); \ 57 } \ 58 void timing_reset_ ## t () { \ 59 timing_ ## t ## _time = 0; \ 60 } 61 62 #else /* ! WINNT */ 63 26 64 #define TIMING_START(t) { struct tms timing_ ## t ## _start, timing_ ## t ## _end; \ 27 65 times( &timing_ ## t ## _start ); 28 66 #define TIMING_END(t) times( &timing_ ## t ## _end ); \ 29 67 timing_ ## t ## _time += timing_ ## t ## _end.tms_utime - timing_ ## t ## _start.tms_utime; } 68 #define TIMING_END_AND_PRINT(t, msg) times( &timing_ ## t ## _end ); \ 69 fprintf( stderr, "%s%.2f sec\n", msg, \ 70 float( timing_ ## t ## _end.tms_utime - timing_ ## t ## _start.tms_utime ) / HZ ); \ 71 timing_ ## t ## _time += timing_ ## t ## _end.tms_utime - timing_ ## t ## _start.tms_utime; } 30 72 #define TIMING_DEFINE_PRINT(t) long timing_ ## t ## _time; \ 31 void timing_print_ ## t ( char * msg ) { CERR.setf( ios::fixed, ios::floatfield); CERR.precision(2); \ 32 CERR << msg << float(timing_ ## t ## _time) / 60 << " sec" << "\n"; } 33 #define TIMING_PRINT(t,msg) timing_print_ ## t ( msg ); 34 #define TIMING_DEFINE_PRINTPROTO(t) void timing_print_ ## t ( char * ); 35 #else 73 void timing_print_ ## t ( char * msg ) { \ 74 fprintf( stderr, "%s%.2f sec\n", msg, float(timing_ ## t ## _time) / HZ ); \ 75 } \ 76 void timing_reset_ ## t () { \ 77 timing_ ## t ## _time = 0; \ 78 } 79 #endif /* ! WINNT */ 80 81 /* macros common to all platforms */ 82 #define TIMING_DEFINE_PRINTPROTO(t) void timing_print_ ## t ( char * ); \ 83 void timing_reset_ ## t (); 84 #define TIMING_PRINT(t, msg) timing_print_ ## t ( msg ); 85 #define TIMING_RESET(t) timing_reset_ ## t (); 86 87 #else /* TIMING */ 36 88 #define TIMING_START(t) 37 89 #define TIMING_END(t) 90 #define TIMING_END_AND_PRINT(t, msg) 38 91 #define TIMING_DEFINE_PRINT(t) 39 #define TIMING_PRINT(t,msg)40 92 #define TIMING_DEFINE_PRINTPROTO(t) 93 #define TIMING_PRINT(t, msg) 94 #define TIMING_RESET(t) 41 95 #endif /* TIMING */ 42 -
factory/variable.cc
r9b8b09 re7a487 151 151 #endif /* NOSTREAMIO */ 152 152 153 //static bool legal_mipo( const CanonicalForm & mipo )154 //{155 // ASSERT( mipo.inPolyDomain(), "not a legal extension" );156 // bool ok = true;157 // for ( CFIterator i = mipo; ok && i.hasTerms(); i++ )158 // ok = i.coeff().inBaseDomain();159 // return ok;160 //}161 162 153 static CanonicalForm conv2mipo ( const CanonicalForm & mipo, const Variable alpha ) 163 154 { … … 170 161 Variable rootOf( const CanonicalForm & mipo, char name ) 171 162 { 172 ASSERT ( legal_mipo( mipo ), "not a legal extension");163 ASSERT (mipo.inPolyDomain() && mipo.isUnivariate(), "not a legal extension"); 173 164 174 165 int l;
Note: See TracChangeset
for help on using the changeset viewer.