Changeset a3cc3fc in git
 Timestamp:
 Dec 15, 2014, 5:19:38 PM (9 years ago)
 Branches:
 (u'spielwiese', 'd0474371d8c5d8068ab70bfb42719c97936b18a6')
 Children:
 fe6b623ec279088e48111ca37e0592c7d7a54822
 Parents:
 8104914d2d708e24127bd8e7c8155a42a11e2ee4
 gitauthor:
 Oleksandr Motsak <motsak@mathematik.unikl.de>20141215 17:19:38+01:00
 gitcommitter:
 Oleksandr Motsak <motsak@mathematik.unikl.de>20141215 18:49:40+01:00
 Location:
 kernel/GBEngine
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

kernel/GBEngine/tgb.cc
r810491 ra3cc3fc 25 25 #include <polys/nc/sca.h> 26 26 #include <polys/prCopy.h> 27 #include <coeffs/longrat.h> 28 #include <coeffs/ modulop.h>27 28 #include <coeffs/longrat.h> // nlQlogSize 29 29 30 30 #include <stdlib.h> 
kernel/GBEngine/tgb_internal.h
r810491 ra3cc3fc 53 53 #include <stdlib.h> 54 54 55 #include <misc/options.h> 56 57 #include <coeffs/modulop.h> 58 55 59 #include <polys/monomials/p_polys.h> 60 #include <polys/monomials/ring.h> 61 #include <polys/kbuckets.h> 56 62 57 63 #include <kernel/ideals.h> 58 #include <polys/monomials/ring.h>59 #include <misc/options.h>60 64 #include <kernel/polys.h> 65 61 66 #include <kernel/GBEngine/kutil.h> 62 67 #include <kernel/GBEngine/kInline.h> 63 68 #include <kernel/GBEngine/kstd1.h> 64 #include <polys/kbuckets.h> 65 #include <coeffs/modulop.h> 69 70 71 #if 1 72 73 #define npInit n_Init 74 #define npNeg n_InpNeg 75 #define npInvers n_Invers 76 #define npMult n_Mult 77 #define npIsOne n_IsOne 78 #define npIsZero n_IsZero 79 80 #else 81 #error Please do NOT call internal functions directly! 82 #endif 83 66 84 67 85 class PolySimple … … 925 943 assume(bpos<256); 926 944 assume(!(npIsZero((number)(long) buffer[bpos],currRing>cf))); 927 temp_array[idx]=F4mat_to_number_type(npAddM((number)(long) temp_array[idx], (number)(long) buffer[bpos++],currRing>cf));945 STATISTIC(n_Add); temp_array[idx]=F4mat_to_number_type(npAddM((number)(long) temp_array[idx], (number)(long) buffer[bpos++],currRing>cf)); 928 946 assume(idx<temp_size); 929 947 } … … 971 989 assume(bpos<256); 972 990 //assume(!(npIsZero((number) buffer[bpos]))); 973 temp_array[i]=F4mat_to_number_type(npAddM((number)(long) temp_array[i], (number)(long) buffer[bpos++],currRing>cf));991 STATISTIC(n_Add); temp_array[i]=F4mat_to_number_type(npAddM((number)(long) temp_array[i], (number)(long) buffer[bpos++],currRing>cf)); 974 992 assume(i<temp_size); 975 993 } … … 996 1014 for(i=0;i<len;i++) 997 1015 { 998 temp_array[i]=F4mat_to_number_type(npAddM((number)(long) temp_array[i], (number)(long) row[i],currRing>cf));1016 STATISTIC(n_Add); temp_array[i]=F4mat_to_number_type(npAddM((number)(long) temp_array[i], (number)(long) row[i],currRing>cf)); 999 1017 assume(i<temp_size); 1000 1018 } … … 1021 1039 { 1022 1040 1023 temp_array[i]=F4mat_to_number_type(npSubM((number)(long) temp_array[i], (number)(long) row[i],currRing>cf));1041 STATISTIC(n_Sub); temp_array[i]=F4mat_to_number_type(npSubM((number)(long) temp_array[i], (number)(long) row[i],currRing>cf)); 1024 1042 assume(i<temp_size); 1025 1043 } … … 1041 1059 { 1042 1060 int idx=idx_array[j]; 1043 temp_array[idx]=F4mat_to_number_type( (number_type)(long)npAddM((number) (long)temp_array[idx],(number)(long) coef_array[j],currRing>cf));1061 STATISTIC(n_Add); temp_array[idx]=F4mat_to_number_type( (number_type)(long)npAddM((number) (long)temp_array[idx],(number)(long) coef_array[j],currRing>cf)); 1044 1062 assume(idx<temp_size); 1045 1063 } … … 1059 1077 { 1060 1078 int idx=idx_array[j]; 1061 temp_array[idx]=F4mat_to_number_type( (number_type)(long) npSubM((number) (long)temp_array[idx],(number)(long) coef_array[j],currRing>cf));1079 STATISTIC(n_Sub); temp_array[idx]=F4mat_to_number_type( (number_type)(long) npSubM((number) (long)temp_array[idx],(number)(long) coef_array[j],currRing>cf)); 1062 1080 assume(idx<temp_size); 1063 1081 } … … 1122 1140 if (red.ref>value_len==NoroCache<number_type>::backLinkCode) 1123 1141 { 1124 temp_array[red.ref>term_index]=F4mat_to_number_type( npAddM((number)(long) temp_array[red.ref>term_index],red.coef,currRing>cf));1142 STATISTIC(n_Add); temp_array[red.ref>term_index]=F4mat_to_number_type( npAddM((number)(long) temp_array[red.ref>term_index],red.coef,currRing>cf)); 1125 1143 } 1126 1144 else … … 1170 1188 assume(coef_array[j]!=0); 1171 1189 CoefIdx<number_type> ci; 1172 ci.coef=F4mat_to_number_type(npMultM((number)(long) coef,(number)(long) coef_array[j],currRing>cf));1190 STATISTIC(n_Mult); ci.coef=F4mat_to_number_type(npMultM((number)(long) coef,(number)(long) coef_array[j],currRing>cf)); 1173 1191 ci.idx=idx_array[j]; 1174 1192 pairs[pos++]=ci; … … 1185 1203 assume(coef_array[j]!=0); 1186 1204 CoefIdx<number_type> ci; 1187 ci.coef=F4mat_to_number_type(npMultM((number)(long) coef,(number)(long) coef_array[j],currRing>cf));1205 STATISTIC(n_Mult); ci.coef=F4mat_to_number_type(npMultM((number)(long) coef,(number)(long) coef_array[j],currRing>cf)); 1188 1206 assume(ci.coef!=0); 1189 1207 ci.idx=j; … … 1220 1238 assume(coef_array[j]!=0); 1221 1239 CoefIdx<number_type> ci; 1222 ci.coef=F4mat_to_number_type(npNegM((number)(long) coef_array[j],currRing>cf));1240 STATISTIC(n_InpNeg); ci.coef=F4mat_to_number_type(npNegM((number)(long) coef_array[j],currRing>cf)); // FIXME: inplace negation! // TODO: check if this is not a bug!? 1223 1241 assume(ci.coef!=0); 1224 1242 ci.idx=j; … … 1247 1265 assume(coef_array[j]!=0); 1248 1266 CoefIdx<number_type> ci; 1249 ci.coef=F4mat_to_number_type(npNegM((number)(unsigned long)coef_array[j],currRing>cf));1267 STATISTIC(n_InpNeg); ci.coef=F4mat_to_number_type(npNegM((number)(unsigned long)coef_array[j],currRing>cf)); // FIXME: inplace negation! // TODO: check if this is not a bug!? 1250 1268 ci.idx=idx_array[j]; 1251 1269 pairs[pos++]=ci; … … 1355 1373 else 1356 1374 { 1357 pairs[act].coef=F4mat_to_number_type(npAddM((number)(long)pairs[act].coef,(number)(long)pairs[i].coef,currRing>cf));1375 STATISTIC(n_Add); pairs[act].coef=F4mat_to_number_type(npAddM((number)(long)pairs[act].coef,(number)(long)pairs[i].coef,currRing>cf)); 1358 1376 } 1359 1377 } … … 1552 1570 { 1553 1571 if (row_array[i]!=zero) 1572 { STATISTIC(n_Sub); 1554 1573 other_row_array[i]=F4mat_to_number_type(npSubM((number)(long) other_row_array[i], (number)(long) row_array[i],currRing>cf)); 1574 } 1575 1555 1576 } 1556 1577 } … … 1561 1582 { 1562 1583 if (row_array[i]!=zero) 1563 other_row_array[i]=F4mat_to_number_type(npAddM(npMult(coef2,(number)(long) row_array[i],currRing>cf),(number)(long) other_row_array[i],currRing>cf)); 1584 { STATISTIC(n_Add); 1585 other_row_array[i]=F4mat_to_number_type(npAddM(npMult(coef2,(number)(long) row_array[i],currRing>cf),(number)(long) other_row_array[i],currRing>cf)); 1586 } 1587 1564 1588 } 1565 1589 } … … 1709 1733 { 1710 1734 if (row_array[i]!=zero) 1735 { 1736 STATISTIC(n_Add); 1711 1737 other_row_array[i]=F4mat_to_number_type(npAddM(npMult(coef,(number)(long)row_array[i],currRing>cf),(number)(long)other_row_array[i],currRing>cf)); 1738 } 1712 1739 } 1713 1740 updateLastReducibleIndex(other_row,r);
Note: See TracChangeset
for help on using the changeset viewer.