Changeset ef2729 in git for kernel/GBEngine/kstd2.cc


Ignore:
Timestamp:
Jul 26, 2016, 2:59:40 PM (8 years ago)
Author:
Adi Popescu <adi_popescum@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'fc741b6502fd8a97288eaa3eba6e5220f3c3df87')
Children:
e40da9f8133273ff0b3617f2e95f7bedfa0266bc
Parents:
d249822f7b7eb06239bfc2809c5847e0265ceb97
Message:
rep: #if ADIDEBUG with #ifdef ADIDEBUG
rem: wait in extra.cc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kstd2.cc

    rd249822 ref2729  
    1010#include <kernel/mod2.h>
    1111
    12 #define ADIDEBUG 0
    13 #define ADIDEBUG_COUNT 0
     12//#define ADIDEBUG 0
    1413#define GCD_SBA 1
    1514
     
    698697  //where the sig remains the same and replace h by this gcd poly
    699698  #if GCD_SBA
    700   #if ADIDEBUG
     699  #ifdef ADIDEBUG
    701700  printf("\nBefore sbaCheckGcdPair ");pWrite(h->p);
    702701  #endif
     
    704703  while(sbaCheckGcdPair(h,strat))
    705704  {
    706     #if ADIDEBUG
     705    #ifdef ADIDEBUG
    707706    printf("\nIntermidiate sbaCheckGcdPair ");pWrite(h->p);
    708707    #endif
    709708    h->sev = pGetShortExpVector(h->p);
    710709  }
    711   #if ADIDEBUG
     710  #ifdef ADIDEBUG
    712711  printf("\nAfter sbaCheckGcdPair ");pWrite(h->p);
    713712  #endif
     
    721720  //printf("FDEGS: %ld -- %ld\n",h->FDeg, h->pFDeg());
    722721  assume(h->FDeg == h->pFDeg());
    723   #if ADIDEBUG
     722  #ifdef ADIDEBUG
    724723  printf("\n--------------------------redSig-------------------------------------\n");
    725724  printf("\nBefore redSig:\n");
     
    756755    {
    757756      #if GCD_SBA
    758       #if ADIDEBUG
     757      #ifdef ADIDEBUG
    759758      printf("\nBefore sbaCheckGcdPair ");pWrite(h->p);
    760759      #endif
     
    762761      while(sbaCheckGcdPair(h,strat))
    763762      {
    764         #if ADIDEBUG
     763        #ifdef ADIDEBUG
    765764        printf("\nIntermidiate sbaCheckGcdPair ");pWrite(h->p);
    766765        #endif
     
    769768        start = 0;
    770769      }
    771       #if ADIDEBUG
     770      #ifdef ADIDEBUG
    772771      printf("\nAfter sbaCheckGcdPair ");pWrite(h->p);
    773772      #endif
     
    794793          if(pLtCmp(beforeredsig,h->sig) == 1)
    795794          {
    796             #if ADIDEBUG
     795            #ifdef ADIDEBUG
    797796            printf("\nSigDrop after reduce\n");pWrite(beforeredsig);pWrite(h->sig);
    798797            #endif
     
    803802            {
    804803              //It reduced to 0, cancel the sigdrop
    805               #if ADIDEBUG
     804              #ifdef ADIDEBUG
    806805              printf("\nReduced to 0 via redRing. Cancel sigdrop\n");
    807806              #endif
     
    812811            else
    813812            {
    814               #if ADIDEBUG
     813              #ifdef ADIDEBUG
    815814              printf("\nReduced to this via redRing.SIGDROP\n");pWrite(h->p);
    816815              #endif
     
    906905    printf("INDEX OF REDUCER T: %d\n",ii);
    907906#endif
    908     #if ADIDEBUG
     907    #ifdef ADIDEBUG
    909908    printf("\nWe reduce it with:\n");p_Write(strat->T[ii].p,strat->tailRing);pWrite(strat->T[ii].sig);
    910909    #endif
    911910    sigSafe = ksReducePolySig(h, &(strat->T[ii]), strat->S_2_R[ii], NULL, NULL, strat);
    912     #if ADIDEBUG
     911    #ifdef ADIDEBUG
    913912    printf("\nAfter small reduction:\n");pWrite(h->p);pWrite(h->sig);
    914913    #endif
     
    923922    if(rField_is_Ring(currRing) && h->p != NULL && pLmCmp(h->p,strat->T[ii].p)==0)
    924923    {
    925       #if ADIDEBUG
     924      #ifdef ADIDEBUG
    926925      printf("\nReducer and Original have same LT. Force it with redRing!\n");
    927926      #endif
     
    929928      if(red_result == 0)
    930929      {
    931         #if ADIDEBUG
     930        #ifdef ADIDEBUG
    932931        printf("\nRedRing reduced it to 0. Perfect\n");
    933932        #endif
     
    937936      else
    938937      {
    939         #if ADIDEBUG
     938        #ifdef ADIDEBUG
    940939        printf("\nRedRing reduced it to *.\nHave to sigdrop now\n");pWrite(h->p);
    941940        #endif
     
    10801079      }
    10811080      strat->redTailChange=TRUE;
    1082       #if ADIDEBUG
     1081      #ifdef ADIDEBUG
    10831082      printf("\nWill TAILreduce * with *:\n");pWrite(Ln.p);pWrite(Ln.sig);
    10841083      pWrite(With->p);pWrite(With->sig);pWrite(L->sig);
     
    10891088      //Because Ln.sig is set to L->sig, but in ksReducePolyTailSig -> ksReducePolySig
    10901089      // I delete it an then set Ln.sig. Hence L->sig is lost
    1091       #if ADIDEBUG
     1090      #ifdef ADIDEBUG
    10921091      printf("\nAfter small TAILreduce:\n");pWrite(Ln.p);pWrite(Ln.sig);pWrite(L->sig);
    10931092      #endif
     
    17061705  while (strat->Ll >= 0)
    17071706  {
    1708     #if ADIDEBUG
     1707    #ifdef ADIDEBUG
    17091708    printf("\n      ------------------------NEW LOOP\n");
    17101709    printf("\nShdl = \n");
     
    18941893        // posInS only depends on the leading term
    18951894        strat->enterS(strat->P, pos, strat, strat->tl);
    1896         #if ADIDEBUG
     1895        #ifdef ADIDEBUG
    18971896        printf("\nThis element has been added to S:\n");pWrite(strat->P.p);pWrite(strat->P.p1);pWrite(strat->P.p2);
    18981897        #endif
     
    22172216  while (strat->Ll >= 0)
    22182217  {
    2219     #if ADIDEBUG
     2218    #ifdef ADIDEBUG
    22202219    printf("\n      ------------------------NEW LOOP\n");
    22212220    printf("\nShdl = \n");
     
    23122311      strat->sbaEnterS = pGetComp(strat->P.sig) - 1;
    23132312   
    2314     #if ADIDEBUG
     2313    #ifdef ADIDEBUG
    23152314    printf("\n-------------------------\nThis is the current element P\n");
    23162315    pWrite(strat->P.p);
     
    24232422        strat->P.sev = pGetShortExpVector(strat->P.p);
    24242423    }
    2425     #if ADIDEBUG
     2424    #ifdef ADIDEBUG
    24262425    printf("\nAfter reduce (redresult=%i): \n",red_result);pWrite(strat->P.p);pWrite(strat->P.sig);
    24272426    #endif
     
    24302429    {
    24312430      //First reduce it as much as one can
    2432       #if ADIDEBUG
     2431      #ifdef ADIDEBUG
    24332432      printf("\nSigdrop in the reduce. Trying redring\n");
    24342433      #endif
     
    24362435      if(red_result == 0)
    24372436      {
    2438         #if ADIDEBUG
     2437        #ifdef ADIDEBUG
    24392438        printf("\nSigdrop cancelled since redRing reduced to 0\n");
    24402439        #endif
     
    24452444      else
    24462445      {
    2447         #if ADIDEBUG
     2446        #ifdef ADIDEBUG
    24482447        printf("\nStill Sigdrop - redRing reduced to:\n");pWrite(strat->P.p);
    24492448        #endif
     
    24562455    if(strat->blockred > strat->blockredmax)
    24572456    {
    2458       #if ADIDEBUG
     2457      #ifdef ADIDEBUG
    24592458      printf("\nToo many blocked reductions\n");
    24602459      #endif
     
    25502549      if(rField_is_Ring(currRing) && strat->sigdrop)     
    25512550      {
    2552         #if ADIDEBUG
     2551        #ifdef ADIDEBUG
    25532552        printf("\n Still sigdrop after redtailSba - it reduced to \n");pWrite(strat->P.p);
    25542553        #endif
     
    25612560      if(strat->P.sig == NULL || pLtCmp(beforetailred,strat->P.sig) == 1)
    25622561      {
    2563         #if ADIDEBUG
     2562        #ifdef ADIDEBUG
    25642563        printf("\nSigDrop after TAILred\n");pWrite(beforetailred);pWrite(strat->P.sig);
    25652564        #endif
     
    25702569        {
    25712570          //It reduced to 0, cancel the sigdrop
    2572           #if ADIDEBUG
     2571          #ifdef ADIDEBUG
    25732572          printf("\nReduced to 0 via redRing. Cancel sigdrop\n");
    25742573          #endif
     
    25782577        else
    25792578        {
    2580           #if ADIDEBUG
     2579          #ifdef ADIDEBUG
    25812580          printf("\nReduced to this via redRing.SIGDROP\n");pWrite(strat->P.p);
    25822581          #endif
     
    25902589        goto case_when_red_result_changed;
    25912590    }
    2592     #if ADIDEBUG
     2591    #ifdef ADIDEBUG
    25932592    printf("\nNach redTailSba: \n");
    25942593    pWrite(strat->P.p);pWrite(strat->P.sig);
     
    26512650      else
    26522651        enterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl);
    2653       #if ADIDEBUG
     2652      #ifdef ADIDEBUG
    26542653        printf("\nThis element is added to S\n");
    26552654        p_Write(strat->P.p, strat->tailRing);p_Write(strat->P.p1, strat->tailRing);p_Write(strat->P.p2, strat->tailRing);pWrite(strat->P.sig);
Note: See TracChangeset for help on using the changeset viewer.