Changeset b1bc24 in git for kernel/GBEngine/kutil.cc
- Timestamp:
- Dec 27, 2019, 10:50:09 AM (4 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 0c27e478f70c2768cfbc17e1a349338d9b343828
- Parents:
- 08b6c4fc9c411f9d7cb3e1c09916bac15398f2db
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kutil.cc
r08b6c4 rb1bc24 232 232 return 0; 233 233 } 234 235 #ifdef HAVE_SHIFTBBA 236 static inline int pLPDivComp(poly p, poly q) { 237 if ((currRing->pCompIndex < 0) || (__p_GetComp(p,currRing) == __p_GetComp(q,currRing))) 238 { 239 // maybe there is a more performant way to do this? This will get called quite often in bba. 240 if (_p_LPLmDivisibleByNoComp(p, q, currRing)) return 1; 241 if (_p_LPLmDivisibleByNoComp(q, p, currRing)) return -1; 242 } 243 244 return 0; 245 } 246 #endif 234 247 235 248 … … 12889 12902 { 12890 12903 if (j < 0) break; 12891 compare=p DivComp(strat->B[j].lcm,Lp.lcm);12904 compare=pLPDivComp(strat->B[j].lcm,Lp.lcm); 12892 12905 if ((compare==1) 12893 12906 &&(sugarDivisibleBy(strat->B[j].ecart,Lp.ecart))) … … 12898 12911 pLmFree(Lp.lcm); 12899 12912 #ifdef CRITERION_DEBUG 12900 if (TEST_OPT_DEBUG) Print("--- divided by B[%d]\n", j); 12913 if (TEST_OPT_DEBUG) { 12914 Print("--- chain crit using B[%d].lcm=%s\n", j, pString(strat->B[j].lcm)); 12915 } 12901 12916 #endif 12902 12917 return; … … 12908 12923 && sugarDivisibleBy(Lp.ecart,strat->B[j].ecart)) 12909 12924 { 12925 #ifdef CRITERION_DEBUG 12926 if (TEST_OPT_DEBUG) { 12927 Print("--- chain crit using pair to remove B[%d].lcm=%s\n", j, pString(strat->B[j].lcm)); 12928 } 12929 #endif 12910 12930 deleteInL(strat->B,&strat->Bl,j,strat); 12911 #ifdef CRITERION_DEBUG12912 if (TEST_OPT_DEBUG) Print("divides B[%d] -> delete B[%d]\n", j, j);12913 #endif12914 12931 strat->c3++; 12915 12932 } … … 12963 12980 for(j = strat->Bl;j>=0;j--) 12964 12981 { 12965 compare=p DivComp(strat->B[j].lcm,Lp.lcm);12982 compare=pLPDivComp(strat->B[j].lcm,Lp.lcm); 12966 12983 if (compare==1) 12967 12984 { … … 12971 12988 pLmFree(Lp.lcm); 12972 12989 #ifdef CRITERION_DEBUG 12973 if (TEST_OPT_DEBUG) Print("--- divided by B[%d]\n", j); 12990 if (TEST_OPT_DEBUG) { 12991 Print("--- chain crit using B[%d].lcm=%s\n", j, pString(strat->B[j].lcm)); 12992 } 12974 12993 #endif 12975 12994 return; … … 12980 12999 if (compare ==-1) 12981 13000 { 13001 #ifdef CRITERION_DEBUG 13002 if (TEST_OPT_DEBUG) { 13003 Print("--- chain crit using pair to remove B[%d].lcm=%s\n", j, pString(strat->B[j].lcm)); 13004 } 13005 #endif 12982 13006 deleteInL(strat->B,&strat->Bl,j,strat); 12983 #ifdef CRITERION_DEBUG12984 if (TEST_OPT_DEBUG) Print("divides B[%d] -> delete B[%d]\n", j, j);12985 #endif12986 13007 strat->c3++; 12987 13008 } … … 13006 13027 Lp.p=NULL; 13007 13028 #ifdef CRITERION_DEBUG 13008 if (TEST_OPT_DEBUG) PrintS("--- pair from Q\n");13029 if (TEST_OPT_DEBUG) PrintS("--- pair is from Q\n"); 13009 13030 #endif 13010 13031 }
Note: See TracChangeset
for help on using the changeset viewer.