Changeset b3594cb in git


Ignore:
Timestamp:
Nov 28, 2022, 4:48:26 PM (2 months ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
Children:
8b6880871eb7f0dea5b3bbc2efc8c11035bf5d3ba1848a8b477dcf2db252b506e9fd7ceba77fd054
Parents:
584b82fab1aca9df1e4e790a4ca42e6c4c2ff11a
Message:
removed unused routines from kstd2
Location:
kernel/GBEngine
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kChinese.cc

    r584b82 rb3594cb  
    375375}
    376376
     377#if 0
     378// debug for send_poly
    377379void test_n(poly n)
    378380{
     
    395397}
    396398#endif
     399#endif
  • kernel/GBEngine/kspoly.cc

    r584b82 rb3594cb  
    4242 *
    4343 ***************************************************************/
     44#ifdef STDZ_EXCHANGE_DURING_REDUCTION
    4445int ksReducePolyZ(LObject* PR,
    4546                 TObject* PW,
     
    184185  return ret;
    185186}
     187#endif
    186188
    187189int ksReducePoly(LObject* PR,
     
    342344
    343345#ifdef HAVE_RINGS
     346#ifdef STDZ_EXCHANGE_DURING_REDUCTION
    344347int ksReducePolyGCD(LObject* PR,
    345348                 TObject* PW,
     
    466469  return ret;
    467470}
     471#endif
    468472#endif
    469473
  • kernel/GBEngine/kstd2.cc

    r584b82 rb3594cb  
    8484                LObject* L,const kStrategy strat);
    8585
     86#ifdef STDZ_EXCHANGE_DURING_REDUCTION
    8687int kFindSameLMInT_Z(const kStrategy strat, const LObject* L, const int start)
    8788{
     
    139140  }
    140141}
     142#endif
     143
    141144// return -1 if T[0] (w/o coeff) does not divide the leading monomial
    142145// (only for euclidean rings (n_QuotRem)
     
    488491  int ende=strat->sl;
    489492#endif
    490   if(rField_is_Ring(currRing))
    491   {
    492     loop
    493     {
    494       if (j > ende) return -1;
    495 #if defined(PDEBUG) || defined(PDIV_DEBUG)
    496       if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j],
    497                              p, not_sev, currRing))
    498 #else
    499       if ( !(strat->sevS[j] & not_sev) &&
    500          p_LmDivisibleBy(strat->S[j], p, currRing))
    501 #endif
    502       {
    503         if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing->cf))
    504           return j;
    505       }
    506       j++;
    507     }
    508   }
    509   else
    510   {
    511     loop
    512     {
    513       if (j > ende) return -1;
    514 #if defined(PDEBUG) || defined(PDIV_DEBUG)
    515       if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j],
    516                              p, not_sev, currRing))
    517 #else
    518       if ( !(strat->sevS[j] & not_sev) &&
    519          p_LmDivisibleBy(strat->S[j], p, currRing))
    520 #endif
    521       {
    522         return j;
    523       }
    524       j++;
    525     }
    526   }
    527 }
    528 
    529 int kFindNextDivisibleByInS_noCF(const kStrategy strat, int start,int max_ind, LObject* L)
    530 {
    531   unsigned long not_sev = ~L->sev;
    532   poly p = L->GetLmCurrRing();
    533   int j = start;
    534 
    535   pAssume(~not_sev == p_GetShortExpVector(p, currRing));
    536 #if 1
    537   int ende=max_ind;
    538 #else
    539   int ende=strat->sl;
    540 #endif
    541493  loop
    542494  {
     
    557509
    558510#ifdef HAVE_RINGS
    559 static long ind2(long arg)
    560 {
    561   if (arg <= 0) return 0;
    562   long ind = 0;
    563   while (arg%2 == 0)
    564   {
    565     arg = arg / 2;
    566     ind++;
    567   }
    568   return ind;
    569 }
    570 
    571511static long ind_fact_2(long arg)
    572512{
     
    576516  while (arg > 0)
    577517  {
    578     ind += ind2(arg);
     518    ind += SI_LOG2_LONG(arg);
    579519    arg = arg - 2;
    580520  }
     
    595535
    596536  int k_ind2 = 0;
    597   int a_ind2 = ind2(a);
     537  int a_ind2 = SI_LOG2_LONG(a);
    598538
    599539  // unsigned long k = 1;
     
    621561        s_exp = s_exp - 1;
    622562      }
    623       while ( (0 < ind2(s_exp)) && (ind2(s_exp) <= too_much) )
    624       {
    625         too_much = too_much - ind2(s_exp);
     563      while ( (0 < SI_LOG2_LONG(s_exp)) && (SI_LOG2_LONG(s_exp) <= too_much) )
     564      {
     565        too_much = too_much - SI_LOG2_LONG(s_exp);
    626566        s_exp = s_exp - 2;
    627567      }
     
    22072147    && (nonorm)
    22082148    && (!n_DivBy(pGetCoeff(P.p),pGetCoeff(strat->S[j]),currRing->cf)))
    2209       j=kFindNextDivisibleByInS_noCF(strat,j+1,max_ind,&P);
     2149      j=kFindNextDivisibleByInS(strat,j+1,max_ind,&P);
    22102150    if (j>=0)
    22112151    {
     
    22152155      {
    22162156        int sll;
    2217         jj=kFindNextDivisibleByInS_noCF(strat,jj+1,max_ind,&P);
     2157        jj=kFindNextDivisibleByInS(strat,jj+1,max_ind,&P);
    22182158        if (jj<0) break;
    22192159        if ((!nonorm)
Note: See TracChangeset for help on using the changeset viewer.