Changeset f59aaa in git


Ignore:
Timestamp:
Nov 22, 2013, 9:56:21 AM (9 years ago)
Author:
Christian Eder
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5bec8f88c9ee2573d328cf7c3aff2bcb301d2395')
Children:
b085fbae2501ff545f48d2d74ab896e6c2343f5b
Parents:
15b211774801614946ec57ba5d911f1b8f5edb9f
git-author:
Christian Eder <ederc@mathematik.uni-kl.de>2013-11-22 09:56:21+01:00
git-committer:
Christian Eder <ederc@mathematik.uni-kl.de>2013-12-12 13:51:25+01:00
Message:
adds new comparison checks in sba:
counts also number of steps during the interreduction process
of incremental sba variants
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/kstd2.cc

    r15b211 rf59aaa  
    5353#endif
    5454
    55 #define SBA_PRODUCT_CRITERION         0
    56 #define SBA_PRINT_ZERO_REDUCTIONS     1
    57 #define SBA_PRINT_REDUCTION_STEPS     1
    58 #define SBA_PRINT_OPERATIONS          1
    59 #define SBA_PRINT_SIZE_G              1
    60 #define SBA_PRINT_SIZE_SYZ            1
    61 #define SBA_PRINT_PRODUCT_CRITERION   0
    62 
     55#define SBA_PRODUCT_CRITERION               0
     56#define SBA_PRINT_ZERO_REDUCTIONS           1
     57#define SBA_PRINT_REDUCTION_STEPS           1
     58#define SBA_PRINT_OPERATIONS                1
     59#define SBA_PRINT_INTERREDUCTION_STEPS      1
     60#define SBA_PRINT_INTERREDUCTION_OPERATIONS 1
     61#define SBA_PRINT_SIZE_G                    1
     62#define SBA_PRINT_SIZE_SYZ                  1
     63#define SBA_PRINT_PRODUCT_CRITERION         0
     64
     65// counts sba's reduction steps
    6366long sba_reduction_steps;
    6467long sba_operations;
     68
     69// counts interreduction steps if sba is used incrementally
     70long sba_interreduction_steps;
     71long sba_interreduction_operations;
    6572/***********************************************
    6673 * SBA stuff -- done
     
    468475
    469476    ksReducePoly(h, &(strat->T[ii]), NULL, NULL, strat);
     477#if SBA_PRINT_INTERREDUCTION_STEPS
     478    sba_interreduction_steps++;
     479#endif
     480#if SBA_PRINT_INTERREDUCTION_OPERATIONS
     481    sba_interreduction_operations  +=  pLength(strat->T[ii].p);
     482#endif
    470483
    471484#ifdef KDEBUG
     
    779792
    780793    ksReducePoly(h, &(strat->T[ii]), NULL, NULL, strat);
     794#if SBA_PRINT_INTERREDUCTION_STEPS
     795    sba_interreduction_steps++;
     796#endif
     797#if SBA_PRINT_INTERREDUCTION_OPERATIONS
     798    sba_interreduction_operations  +=  pLength(strat->T[ii].p);
     799#endif
    781800
    782801#ifdef KDEBUG
     
    949968    number coef;
    950969    ksReducePoly(h,&(strat->T[ii]),strat->kNoetherTail(),&coef,strat);
     970#if SBA_PRINT_INTERREDUCTION_STEPS
     971    sba_interreduction_steps++;
     972#endif
     973#if SBA_PRINT_INTERREDUCTION_OPERATIONS
     974    sba_interreduction_operations  +=  pLength(strat->T[ii].p);
     975#endif
    951976#ifdef KDEBUG
    952977    if (TEST_OPT_DEBUG)
     
    15151540  // The corresponding orders are computed in sbaRing(), depending
    15161541  // on the flag strat->incremental
    1517   long zeroreductions     = 0;
    1518   long product_criterion  = 0;
    1519   long size_g             = 0;
    1520   long size_syz           = 0;
     1542  long zeroreductions           = 0;
     1543  long product_criterion        = 0;
     1544  long size_g                   = 0;
     1545  long size_syz                 = 0;
    15211546  // global variable
    1522   sba_reduction_steps     = 0;
    1523   sba_operations          = 0;
     1547  sba_reduction_steps           = 0;
     1548  sba_operations                = 0;
     1549  sba_interreduction_steps      = 0;
     1550  sba_interreduction_operations = 0;
    15241551
    15251552  ideal F = F0;
     
    20692096#endif
    20702097#if SBA_PRINT_ZERO_REDUCTIONS
    2071   printf("ZERO REDUCTIONS:   %ld\n",zeroreductions);
     2098  printf("----------------------------------------------------------\n");
     2099  printf("ZERO REDUCTIONS:            %ld\n",zeroreductions);
    20722100#endif
    20732101#if SBA_PRINT_REDUCTION_STEPS
    2074   printf("TOP S-REDUCTIONS:  %ld\n",sba_reduction_steps);
    2075 #endif
    2076 #if SBA_OPERATIONS
    2077   printf("OPERATIONS:        %ld\n",sba_operations);
     2102  printf("----------------------------------------------------------\n");
     2103  printf("TOP S-REDUCTIONS:           %ld\n",sba_reduction_steps);
     2104#endif
     2105#if SBA_PRINT_OPERATIONS
     2106  printf("OPERATIONS:                 %ld\n",sba_operations);
     2107#endif
     2108#if SBA_PRINT_INTERREDUCTION_STEPS
     2109  printf("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
     2110  printf("INTERREDUCTIONS:            %ld\n",sba_interreduction_steps);
     2111#endif
     2112#if SBA_PRINT_INTERREDUCTION_OPERATIONS
     2113  printf("INTERREDUCTION OPERATIONS:  %ld\n",sba_interreduction_operations);
     2114#endif
     2115#if SBA_PRINT_INTERREDUCTION_STEPS
     2116  printf("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
     2117  printf("ALL REDUCTIONS:             %ld\n",sba_reduction_steps+sba_interreduction_steps);
     2118#endif
     2119#if SBA_PRINT_INTERREDUCTION_OPERATIONS
     2120  printf("ALL OPERATIONS:             %ld\n",sba_operations+sba_interreduction_operations);
    20782121#endif
    20792122#if SBA_PRINT_SIZE_G
    2080   printf("SIZE OF G:         %ld\n",size_g);
     2123  printf("----------------------------------------------------------\n");
     2124  printf("SIZE OF G:                  %ld\n",size_g);
    20812125#endif
    20822126#if SBA_PRINT_SIZE_SYZ
    2083   printf("SIZE OF SYZ:       %ld\n",size_syz);
     2127  printf("SIZE OF SYZ:                %ld\n",size_syz);
     2128  printf("----------------------------------------------------------\n");
    20842129#endif
    20852130#if SBA_PRINT_PRODUCT_CRITERION
    2086   printf("PRODUCT CRITERIA:  %ld\n",product_criterion);
    2087 #endif
    2088   zeroreductions      = 0;
    2089   size_g              = 0;
    2090   size_syz            = 0;
    2091   product_criterion   = 0;
    2092   sba_reduction_steps = 0;
    2093   sba_operations      = 0;
     2131  printf("PRODUCT CRITERIA:           %ld\n",product_criterion);
     2132#endif
     2133  zeroreductions                = 0;
     2134  size_g                        = 0;
     2135  size_syz                      = 0;
     2136  product_criterion             = 0;
     2137  sba_reduction_steps           = 0;
     2138  sba_operations                = 0;
     2139  sba_interreduction_steps      = 0;
     2140  sba_interreduction_operations = 0;
    20942141  return (strat->Shdl);
    20952142}
Note: See TracChangeset for help on using the changeset viewer.