Changeset f8fb93d in git


Ignore:
Timestamp:
May 17, 2016, 3:33:14 PM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'd1ba061a762c62d3a25159d8da8b6e17332291fa')
Children:
e6f1e67739dcb8bc40ce2fcd97b4b37cfe8f0302
Parents:
045cbe4a6ae2c0b09895eb1b2407beeb5c723e7e
Message:
removed unused debug stuff from bba/mora
Location:
kernel/GBEngine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kstd1.cc

    r045cbe rf8fb93d  
    1212#define MORA_USE_BUCKETS
    1313
    14 #define MYTEST 0
    15 
    1614#define ADIDEBUG 0
    1715#define ADIDEBUG_NF 0
     
    2321#include <misc/options.h>
    2422#include <misc/intvec.h>
    25 
    26 #if MYTEST
    27 #ifdef HAVE_TAIL_RING
    28 #undef HAVE_TAIL_RING
    29 #endif /* ifdef HAVE_TAIL_RING */
    30 #endif /* if MYTEST */
    3123
    3224#include <polys/weight.h>
     
    16161608  kTest_TS(strat);
    16171609  strat->use_buckets = kMoraUseBucket(strat);
    1618   /*- compute-------------------------------------------*/
    16191610
    16201611#ifdef HAVE_TAIL_RING
     
    16291620  }
    16301621
     1622  /*- compute-------------------------------------------*/
    16311623  while (strat->Ll >= 0)
    16321624  {
     
    18361828      if (strat->P.lcm!=NULL)
    18371829      {
    1838 #if defined(HAVE_RINGS)
    1839         pLmDelete(strat->P.lcm);
     1830#ifdef HAVE_RINGS
     1831        if (rField_is_Ring(currRing)) pLmDelete(strat->P.lcm);
     1832        else
    18401833#else
    1841         pLmFree(strat->P.lcm);
     1834          pLmFree(strat->P.lcm);
    18421835#endif
    18431836        strat->P.lcm=NULL;
    18441837      }
     1838
    18451839#ifdef KDEBUG
    18461840      // make sure kTest_TS does not complain about strat->P
     
    18661860    }
    18671861    kTest_TS(strat);
    1868 
    1869 #if ADIDEBUG
    1870     Print("\n    The new reducer list T -- at the end of loop %d -- is\n",loop_count);
    1871     for(int iii=0;iii<=strat->tl;iii++)
    1872     {
    1873       printf("\n    T[%d]:",iii);
    1874       p_Write(strat->T[iii].p,strat->tailRing);
    1875     }
    1876     PrintLn();
    1877 
    1878     loop_count++;
    1879 #endif /* ADIDEBUG */
    18801862  }
    18811863  /*- complete reduction of the standard basis------------------------ -*/
     
    22932275  idTest(F);
    22942276  if (Q!=NULL) idTest(Q);
    2295 
    2296 #if MYTEST
    2297   if (TEST_OPT_DEBUG)
    2298   {
    2299     PrintS("// kSTD: currRing: ");
    2300     rWrite(currRing);
    2301   }
    2302 #endif
    2303 
    23042277#endif
    23052278#ifdef HAVE_PLURAL
     
    25042477  idTest(F);
    25052478  idTest(Q);
    2506 
    2507 #if MYTEST
    2508   if (TEST_OPT_DEBUG)
    2509   {
    2510     PrintS("// kSTD: currRing: ");
    2511     rWrite(currRing);
    2512   }
    2513 #endif
    2514 
    25152479#endif
    25162480#ifdef HAVE_PLURAL
  • kernel/GBEngine/kstd2.cc

    r045cbe rf8fb93d  
    1414#include <kernel/mod2.h>
    1515
    16 #ifndef SING_NDEBUG
    17 # define MYTEST 0
    18 #else /* ifndef SING_NDEBUG */
    19 # define MYTEST 0
    20 #endif /* ifndef SING_NDEBUG */
    21 
    2216#define ADIDEBUG 0
    2317#define ADIDEBUG_COUNT 0
    24 
    25 #if MYTEST
    26 # ifdef HAVE_TAIL_RING
    27 #  undef HAVE_TAIL_RING
    28 # endif // ifdef HAVE_TAIL_RING
    29 #endif
    3018
    3119// define if no buckets should be used
     
    448436      }
    449437    }
    450     #if ADIDEBUG
    451     pWrite(h->p);
    452     printf("\nFound j = %i\n",j);pWrite(strat->T[j].p);
    453     #endif
    454438    //enterT(*h, strat);
    455439    ksReducePoly(h, &(strat->T[j]), NULL, NULL, strat); // with debug output
    456     #if ADIDEBUG
    457     printf("\nand after reduce: \n");pWrite(h->p);
    458     #endif
    459440
    460441    if (h->GetLmTailRing() == NULL)
     
    14941475  kTest_TS(strat);
    14951476
    1496 #ifdef KDEBUG
    1497 #if MYTEST
    1498   if (TEST_OPT_DEBUG)
    1499   {
    1500     PrintS("bba start GB: currRing: ");
    1501     // rWrite(currRing);PrintLn();
    1502     rDebugPrint(currRing);
    1503     PrintLn();
    1504   }
    1505 #endif /* MYTEST */
    1506 #endif /* KDEBUG */
    1507 
    15081477#ifdef HAVE_TAIL_RING
    15091478  if(!idIs0(F) &&(!rField_is_Ring(currRing)))  // create strong gcd poly computes with tailring and S[i] ->to be fixed
     
    15241493  while (strat->Ll >= 0)
    15251494  {
    1526     #if ADIDEBUG
    1527     printf("\n      ------------------------NEW LOOP\n");
    1528     printf("\nShdl = \n");
    1529     #if 0
    1530     idPrint(strat->Shdl);
    1531     #else
    1532     for(int ii = 0; ii<=strat->sl;ii++)
    1533         p_Write(strat->S[ii],strat->tailRing);
    1534     #endif
    1535     printf("\n   list   L\n");
    1536     int iii;
    1537     #if 1
    1538     for(iii = 0; iii<= strat->Ll; iii++)
    1539     {
    1540         printf("L[%i]:",iii);
    1541         p_Write(strat->L[iii].p, currRing);
    1542         p_Write(strat->L[iii].p1, currRing);
    1543         p_Write(strat->L[iii].p2, currRing);
    1544     }
    1545     #else
    1546     {
    1547         printf("L[%i]:",strat->Ll);
    1548         p_Write(strat->L[strat->Ll].p, strat->tailRing);
    1549         p_Write(strat->L[strat->Ll].p1, strat->tailRing);
    1550         p_Write(strat->L[strat->Ll].p2, strat->tailRing);
    1551     }
    1552     #endif
    1553     #if 1
    1554     for(iii = 0; iii<= strat->Bl; iii++)
    1555     {
    1556         printf("B[%i]:",iii);
    1557         p_Write(strat->B[iii].p, /*strat->tailRing*/currRing);
    1558         p_Write(strat->B[iii].p1, /*strat->tailRing*/currRing);
    1559         p_Write(strat->B[iii].p2, strat->tailRing);
    1560     }
    1561     #endif
    1562     getchar();
    1563     #endif
    15641495    #ifdef KDEBUG
    15651496      if (TEST_OPT_DEBUG) messageSets(strat);
     
    16361567
    16371568      /* reduction of the element chosen from L */
    1638       #if ADIDEBUG
    1639       printf("\nBefore \n");pWrite(strat->P.p);
    1640       #endif
    16411569      red_result = strat->red(&strat->P,strat);
    1642       #if ADIDEBUG
    1643       printf("\nAfter \n");pWrite(strat->P.p);
    1644       #endif
    16451570      if (errorreported)  break;
    16461571    }
     
    16661591      int pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
    16671592
    1668 #ifdef KDEBUG
    1669 #if MYTEST
    1670       PrintS("New S: "); p_DebugPrint(strat->P.p, currRing); PrintLn();
    1671 #endif /* MYTEST */
    1672 #endif /* KDEBUG */
    1673 
    16741593      // reduce the tail and normalize poly
    16751594      // in the ring case we cannot expect LC(f) = 1,
     
    16931612#ifdef KDEBUG
    16941613      if (TEST_OPT_DEBUG){PrintS("new s:");strat->P.wrp();PrintLn();}
    1695 #if MYTEST
    1696       PrintS("New (reduced) S: "); p_DebugPrint(strat->P.p, currRing); PrintLn();
    1697 #endif /* MYTEST */
    16981614#endif /* KDEBUG */
    16991615
     
    17301646          enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
    17311647        // posInS only depends on the leading term
    1732         #if ADIDEBUG
    1733         printf("\nThis element is added to S\n");
    1734         p_Write(strat->P.p, strat->tailRing);p_Write(strat->P.p1, strat->tailRing);p_Write(strat->P.p2, strat->tailRing);
    1735         #endif
    17361648        strat->enterS(strat->P, pos, strat, strat->tl);
    17371649#if 0
     
    17671679        }
    17681680      }
    1769       #if ADIDEBUG
    1770       for(int iii = 0; iii<=strat->tl;iii++)
    1771       {
    1772         printf("\nT[%i] = ",iii);pWrite(strat->T[iii].p);
    1773       }
    1774       #endif
    17751681
    17761682      if (hilb!=NULL) khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
    17771683//      Print("[%d]",hilbeledeg);
    17781684      if (strat->P.lcm!=NULL)
     1685      {
    17791686#ifdef HAVE_RINGS
    1780         pLmDelete(strat->P.lcm);
     1687        if (rField_is_Ring(currRing)) pLmDelete(strat->P.lcm);
     1688        else
    17811689#else
    1782         pLmFree(strat->P.lcm);
    1783 #endif
     1690          pLmFree(strat->P.lcm);
     1691#endif
     1692        strat->P.lcm=NULL;
     1693      }
    17841694    }
    17851695    else if (strat->P.p1 == NULL && strat->minim > 0)
     
    17941704  }
    17951705#ifdef KDEBUG
    1796 #if MYTEST
    1797   PrintS("bba finish GB: currRing: "); rWrite(currRing);
    1798 #endif /* MYTEST */
    17991706  if (TEST_OPT_DEBUG) messageSets(strat);
    18001707#endif /* KDEBUG */
     
    18681775  if (Q!=NULL) updateResult(strat->Shdl,Q,strat);
    18691776
    1870 #ifdef KDEBUG
    1871 #if MYTEST
    1872   PrintS("bba_end: currRing: "); rWrite(currRing);
    1873 #endif /* MYTEST */
    1874 #endif /* KDEBUG */
    18751777  idTest(strat->Shdl);
    18761778
     
    19661868  kTest_TS(strat);
    19671869
    1968 #ifdef KDEBUG
    1969 #if MYTEST
    1970   if (TEST_OPT_DEBUG)
    1971   {
    1972     PrintS("bba start GB: currRing: ");
    1973     // rWrite(currRing);PrintLn();
    1974     rDebugPrint(currRing);
    1975     PrintLn();
    1976   }
    1977 #endif /* MYTEST */
    1978 #endif /* KDEBUG */
    1979 
    19801870#ifdef HAVE_TAIL_RING
    19811871  if(!idIs0(F) &&(!rField_is_Ring(currRing)))  // create strong gcd poly computes with tailring and S[i] ->to be fixed
     
    21712061      int pos = strat->sl+1;
    21722062
    2173 #ifdef KDEBUG
    2174 #if MYTEST
    2175       PrintS("New S: "); pDebugPrint(strat->P.p); PrintLn();
    2176 #endif /* MYTEST */
    2177 #endif /* KDEBUG */
    2178 
    21792063      // reduce the tail and normalize poly
    21802064      // in the ring case we cannot expect LC(f) = 1,
     
    22212105#ifdef KDEBUG
    22222106      if (TEST_OPT_DEBUG){PrintS("new s:");strat->P.wrp();PrintLn();}
    2223 #if MYTEST
    2224 //#if 1
    2225       PrintS("New (reduced) S: "); pDebugPrint(strat->P.p); PrintLn();
    2226 #endif /* MYTEST */
    22272107#endif /* KDEBUG */
    22282108
     
    24532333  }
    24542334#ifdef KDEBUG
    2455 #if MYTEST
    2456   PrintS("bba finish GB: currRing: "); rWrite(currRing);
    2457 #endif /* MYTEST */
    24582335  if (TEST_OPT_DEBUG) messageSets(strat);
    24592336#endif /* KDEBUG */
     
    25172394  if (Q!=NULL) updateResult(strat->Shdl,Q,strat);
    25182395
    2519 #ifdef KDEBUG
    2520 #if MYTEST
    2521   PrintS("bba_end: currRing: "); rWrite(currRing);
    2522 #endif /* MYTEST */
    2523 #endif /* KDEBUG */
    25242396#if SBA_PRINT_SIZE_G
    25252397  size_g_non_red  = IDELEMS(strat->Shdl);
     
    29062778      int pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
    29072779
    2908 #ifdef KDEBUG
    2909 #if MYTEST
    2910       PrintS("New S: "); pDebugPrint(strat->P.p); PrintLn();
    2911 #endif /* MYTEST */
    2912 #endif /* KDEBUG */
    2913 
    29142780      // reduce the tail and normalize poly
    29152781      // in the ring case we cannot expect LC(f) = 1,
     
    29352801#ifdef KDEBUG
    29362802      if (TEST_OPT_DEBUG){PrintS("new s:");strat->P.wrp();PrintLn();}
    2937 #if MYTEST
    2938 //#if 1
    2939       PrintS("New (reduced) S: "); pDebugPrint(strat->P.p); PrintLn();
    2940 #endif /* MYTEST */
    29412803#endif /* KDEBUG */
    29422804
Note: See TracChangeset for help on using the changeset viewer.