Changeset 45cfb82 in git
- Timestamp:
- May 5, 2021, 3:23:13 PM (3 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- b385d0e618e758a8143fee011320a6c069221b2c
- Parents:
- 502859fe5faa956d714f45c2e56bd4bd4736e1ad
- Location:
- kernel/GBEngine
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kLiftstd.cc
r502859 r45cfb82 132 132 } 133 133 p_Delete(&M[i],tailR); 134 if ((i+1)%RED_CANONICALIZE==0) kBucketCanonicalize(b); 134 135 } 135 136 poly p; … … 296 297 pass++; 297 298 d = h_d + h->ecart; 298 if (pass% 64==0) kBucketCanonicalize(h->bucket);299 } 300 } 299 if (pass%RED_CANONICALIZE==0) kBucketCanonicalize(h->bucket); 300 } 301 } -
kernel/GBEngine/kstd1.cc
r502859 r45cfb82 792 792 long reddeg,d; 793 793 int pass = 0; 794 int cnt = 0; 794 795 int j = 0; 795 796 … … 907 908 d = h->SetDegStuffReturnLDeg(strat->LDegLast); 908 909 /*- try to reduce the s-polynomial -*/ 910 cnt++; 909 911 pass++; 910 912 /* … … 933 935 } 934 936 } 935 if (UNLIKELY( pass>30))937 if (UNLIKELY(cnt>RED_CANONICALIZE)) 936 938 { 937 939 h->CanonicalizeP(); 938 pass=0;939 if (TEST_OPT_PROT) { PrintS("!");mflush(); }940 cnt=0; 941 //if (TEST_OPT_PROT) { PrintS("!");mflush(); } 940 942 } 941 943 if ((TEST_OPT_PROT) && (strat->Ll < 0) && (d >= reddeg)) -
kernel/GBEngine/kstd2.cc
r502859 r45cfb82 934 934 935 935 poly h_p; 936 int i,j,at,pass, 936 int i,j,at,pass,cnt,ii; 937 937 unsigned long not_sev; 938 938 // long reddeg,d; 939 939 940 pass = j = 0;940 cnt = pass = j = 0; 941 941 // d = reddeg = h->GetpFDeg(); 942 942 h->SetShortExpVector(); … … 1068 1068 *-if the number of pre-defined reductions jumps 1069 1069 */ 1070 cnt++; 1070 1071 pass++; 1071 1072 if (!TEST_OPT_REDTHROUGH && (strat->Ll >= 0) && (pass > strat->LazyPass)) … … 1097 1098 } 1098 1099 } 1099 else if (UNLIKELY( pass>30))1100 else if (UNLIKELY(cnt>RED_CANONICALIZE)) 1100 1101 { 1101 1102 h->CanonicalizeP(); 1102 pass=0;1103 if (TEST_OPT_PROT) { PrintS("!");mflush(); }1103 cnt=0; 1104 //if (TEST_OPT_PROT) { PrintS("!");mflush(); } 1104 1105 } 1105 1106 } … … 1562 1563 poly redtailSba (LObject* L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize) 1563 1564 { 1564 #define REDTAIL_CANONICALIZE 1001565 1565 strat->redTailChange=FALSE; 1566 1566 if (strat->noTailReduction) return L->GetLmCurrRing(); … … 1687 1687 int j = 0; 1688 1688 int pass = 0; 1689 int cnt = 0; 1689 1690 assume(h->pFDeg() == h->FDeg); 1690 1691 long reddeg = h->GetpFDeg(); … … 1818 1819 d = h->SetpFDeg(); 1819 1820 /*- try to reduce the s-polynomial -*/ 1821 cnt++; 1820 1822 pass++; 1821 1823 if (//!TEST_OPT_REDTHROUGH && … … 1870 1872 } 1871 1873 } 1872 else if (UNLIKELY( pass>30))1874 else if (UNLIKELY(cnt>RED_CANONICALIZE)) 1873 1875 { 1874 1876 h->CanonicalizeP(); 1875 pass=0;1876 if (TEST_OPT_PROT) { PrintS("!");mflush(); }1877 cnt=0; 1878 //if (TEST_OPT_PROT) { PrintS("!");mflush(); } 1877 1879 } 1878 1880 } … … 2118 2120 poly redNF (poly h,int &max_ind,int nonorm,kStrategy strat) 2119 2121 { 2120 #define REDNF_CANONICALIZE 602121 2122 if (h==NULL) return NULL; 2122 2123 int j; … … 2217 2218 { 2218 2219 kBucketDestroy(&P.bucket); 2219 2220 #ifdef KDEBUG2221 // if (TEST_OPT_DEBUG)2222 // {2223 // PrintS("redNF: starting S:\n");2224 // for( j = 0; j <= max_ind; j++ )2225 // {2226 // Print("S[%d] (of size: %d): ", j, pSize(strat->S[j]));2227 // pWrite(strat->S[j]);2228 // }2229 // };2230 #endif2231 2232 2220 return NULL; 2233 2221 } … … 2250 2238 kBucketDestroy(&P.bucket); 2251 2239 pNormalize(P.p); 2252 2253 #ifdef KDEBUG2254 // if (TEST_OPT_DEBUG)2255 // {2256 // PrintS("redNF: starting S:\n");2257 // for( j = 0; j <= max_ind; j++ )2258 // {2259 // Print("S[%d] (of size: %d): ", j, pSize(strat->S[j]));2260 // pWrite(strat->S[j]);2261 // }2262 // };2263 #endif2264 2265 2240 return P.p; 2266 2241 } … … 2290 2265 #ifdef HAVE_RINGS 2291 2266 BOOLEAN is_ring = rField_is_Ring(currRing); 2292 #endif2293 #ifdef KDEBUG2294 // if (TEST_OPT_DEBUG)2295 // {2296 // PrintS("redNF: starting S:\n");2297 // for( j = 0; j <= max_ind; j++ )2298 // {2299 // Print("S[%d] (of size: %d): ", j, pSize(strat->S[j]));2300 // pWrite(strat->S[j]);2301 // }2302 // };2303 2267 #endif 2304 2268 … … 2375 2339 { 2376 2340 kBucketDestroy(&P.bucket); 2377 2378 #ifdef KDEBUG2379 // if (TEST_OPT_DEBUG)2380 // {2381 // PrintS("redNF: starting S:\n");2382 // for( j = 0; j <= max_ind; j++ )2383 // {2384 // Print("S[%d] (of size: %d): ", j, pSize(strat->S[j]));2385 // pWrite(strat->S[j]);2386 // }2387 // };2388 #endif2389 2390 2341 return NULL; 2391 2342 } … … 2408 2359 kBucketDestroy(&P.bucket); 2409 2360 pNormalize(P.p); 2410 2411 #ifdef KDEBUG2412 // if (TEST_OPT_DEBUG)2413 // {2414 // PrintS("redNF: starting S:\n");2415 // for( j = 0; j <= max_ind; j++ )2416 // {2417 // Print("S[%d] (of size: %d): ", j, pSize(strat->S[j]));2418 // pWrite(strat->S[j]);2419 // }2420 // };2421 #endif2422 2423 2361 return P.p; 2424 2362 } -
kernel/GBEngine/kutil.cc
r502859 r45cfb82 7145 7145 poly redtailBba (LObject* L, int end_pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize) 7146 7146 { 7147 #define REDTAIL_CANONICALIZE 1007148 7147 strat->redTailChange=FALSE; 7149 7148 if (strat->noTailReduction) return L->GetLmCurrRing(); -
kernel/GBEngine/kutil.h
r502859 r45cfb82 33 33 #define setmaxT ((4096-12)/sizeof(TObject)) 34 34 #define setmaxTinc ((4096)/sizeof(TObject)) 35 36 #define RED_CANONICALIZE 50 37 #define REDNF_CANONICALIZE 60 38 #define REDTAIL_CANONICALIZE 100 35 39 36 40 // if you want std computations as in Singular version < 2:
Note: See TracChangeset
for help on using the changeset viewer.