Changeset 47e836b in git for kernel/tgb.cc
- Timestamp:
- Aug 3, 2011, 2:53:56 PM (13 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- b44f5efd50dcfa0bb89204f55621946bbb67238d
- Parents:
- 3342df1a96f6513ccd51901066e6cb096c2c9780
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-08-03 14:53:56+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 13:11:35+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/tgb.cc
r3342df r47e836b 15 15 ///@TODO: grade aus ecartS, setze dazu strat->honey; und nutze p.ecart 16 16 ///@TODO: no tail reductions in syz comp 17 #include <stdlib.h> 18 #include <stdio.h> 19 #include <queue> 17 20 #include <kernel/mod2.h> 18 21 #include <kernel/tgb.h> … … 27 30 #include <kernel/longrat.h> 28 31 #include <coeffs/modulop.h> 29 #include <stdlib.h>30 #include <stdio.h>31 #include <queue>32 32 #define BUCKETS_FOR_NORO_RED 1 33 33 #define SR_HDL(A) ((long)(A)) … … 176 176 } 177 177 #endif 178 struct snumber_dummy 179 { 180 mpz_t z; 181 mpz_t n; 182 #if defined(LDEBUG) 183 int debug; 184 #endif 185 BOOLEAN s; 186 }; 187 typedef struct snumber_dummy *number_dummy; 188 178 189 179 190 int QlogSize (number n) 180 191 { 181 if(SR_HDL (n) & SR_INT) 182 { 183 long i = SR_TO_INT (n); 184 if(i == 0) 185 return 0; 186 192 long nl=n_Size(n,currRing->cf); 193 if (nl==0L) return 0; 194 if (nl==1L) 195 { 196 long i = n_Int(n,currRing->cf); 187 197 unsigned long v; 188 198 v = (i >= 0) ? i : -i; … … 196 206 } 197 207 //assume denominator is 0 198 return mpz_sizeinbase (n->z, 2); 208 number_dummy nn=(number_dummy)n; 209 return mpz_sizeinbase (nn->z, 2); 199 210 } 200 211 … … 985 996 P.p = h; /*p_Copy(h,c->r); */ 986 997 P.ecart = ecart; 987 P.FDeg = pFDeg (P.p, c->r);998 P.FDeg = c->r->pFDeg (P.p, c->r); 988 999 if(!(simplified)) 989 1000 { … … 2589 2600 /*template <class number_type> SparseRow<number_type>* noro_red_to_non_poly(poly p, int &len, NoroCache<number_type>* cache,slimgb_alg* c) 2590 2601 * { 2591 if (n pPrimeM<255)2602 if (n_GetChar(currRing->cf)<255) 2592 2603 { 2593 2604 return noro_red_to_non_poly_t<tgb_uint8>(p,len,cache,c); … … 2595 2606 else 2596 2607 { 2597 if (n pPrimeM<65000)2608 if (n_GetChar(currRing->cf)<65000) 2598 2609 { 2599 2610 return noro_red_to_non_poly_t<tgb_uint16>(p,len,cache,c); … … 2835 2846 } 2836 2847 { 2837 if(n pPrimeM< 255)2848 if(n_GetChar(currRing->cf) < 255) 2838 2849 { 2839 2850 noro_step < tgb_uint8 > (p, pn, c); … … 2841 2852 else 2842 2853 { 2843 if(n pPrimeM< 65000)2854 if(n_GetChar(currRing->cf) < 65000) 2844 2855 { 2845 2856 noro_step < tgb_uint16 > (p, pn, c); … … 3353 3364 #ifdef USE_NORO 3354 3365 use_noro = ((!(nc)) && (S->rank <= 1) && (rField_is_Zp (r)) 3355 && (!(eliminationProblem)) && (n pPrimeM<= 32003));3366 && (!(eliminationProblem)) && (n_GetChar(currRing->cf) <= 32003)); 3356 3367 use_noro_last_block = false; 3357 3368 if((!(use_noro)) && (lastDpBlockStart <= (currRing->N))) 3358 3369 { 3359 3370 use_noro_last_block = ((!(nc)) && (S->rank <= 1) && (rField_is_Zp (r)) 3360 && (n pPrimeM<= 32003));3371 && (n_GetChar(currRing->cf) <= 32003)); 3361 3372 } 3362 3373 #else … … 3573 3584 { 3574 3585 rChangeCurrRing (new_ring); 3575 s_h = idrCopyR_NoSort (arg_I, orig_ring );3586 s_h = idrCopyR_NoSort (arg_I, orig_ring, new_ring); 3576 3587 idTest (s_h); 3577 3588 /*int i; … … 3597 3608 idTest (s_result); 3598 3609 rChangeCurrRing (orig_ring); 3599 result = idrMoveR_NoSort (s_result, new_ring );3610 result = idrMoveR_NoSort (s_result, new_ring, orig_ring); 3600 3611 3601 3612 idTest (result); … … 4717 4728 p_noro[i] = p; 4718 4729 } 4719 if(n pPrimeM< 255)4730 if(n_GetChar(currRing->cf) < 255) 4720 4731 { 4721 4732 noro_step < tgb_uint8 > (p_noro, pn_noro, c); … … 4723 4734 else 4724 4735 { 4725 if(n pPrimeM< 65000)4736 if(n_GetChar(currRing->cf) < 65000) 4726 4737 { 4727 4738 noro_step < tgb_uint16 > (p_noro, pn_noro, c);
Note: See TracChangeset
for help on using the changeset viewer.