Changeset 232bbd5 in git for libpolys/polys


Ignore:
Timestamp:
Feb 22, 2012, 9:51:21 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
f23ccea9a38ee5dfa1e6454e84dd4bd11cd5ce90
Parents:
64f0ca8d7049bea31d0e107cf5c613e0b6ffa5d3
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-22 21:51:21+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-23 20:35:08+01:00
Message:
switchable NC-extensions

add/chg: two more non-commutative (special multiplication) extensions and general Plural caching can be switched on&off now
Location:
libpolys/polys/nc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/nc/nc.h

    r64f0ca r232bbd5  
    352352
    353353
    354 // const int GRMASK = 1 << 1;
    355 const int SCAMASK = 1; // For backward compatibility
    356 const int TESTSYZSCAMASK = 0x0100 | SCAMASK; //
     354const int GENERICMASK = 0x000; // gnc... must do its dirty job first!
     355const int SCAMASK     = 0x001;
     356
     357#if 0
     358static const bool bNoPluralMultiplication = false;  // use only formula shortcuts in my OOP Multiplier
     359// the following make sense only if bNoPluralMultiplication is false:
     360static const bool bNoFormula = true;  // don't use any formula shortcuts
     361static const bool bNoCache   = false; // only formula whenever possible, only make sanse if bNoFormula is false!
     362#endif
     363
     364// false, true, false == old "good" Plural
     365// false, false ==>> Plural + Cache + Direct Formula - not much
     366// false, false, true ==>> Plural Mult + Direct Formula (no ~cache)
     367// true, *, *  == new OOP multiplication!
     368
     369const int NOPLURALMASK= 0x002; // bNoPluralMultiplication
     370const int NOFORMULAMASK=0x004; // bNoFormula
     371const int NOCACHEMASK = 0x008; // bNoCache
     372
     373const int TESTSYZSCAMASK = 0x0100 | SCAMASK;
     374
     375
    357376
    358377// NCExtensions Mask Property
  • libpolys/polys/nc/old.gring.cc

    r64f0ca r232bbd5  
    7272poly nc_p_Bracket_qq(poly p, const poly q, const ring r);
    7373
    74 int  iNCExtensions = 0; // SCAMASK; // only SCA can be used by default
    75 
     74// only SCA can be used by default, formulas are off by default
     75int  iNCExtensions = SCAMASK | NOFORMULAMASK;
    7676
    7777int& getNCExtensions()
     
    8787}
    8888
    89 
    9089bool ncExtensions(int iMask) //  = 0x0FFFF
    9190{
    9291  return ((getNCExtensions() & iMask) == iMask);
    9392}
    94 
    95 
    96 
    97 
    98 static const bool bNoPluralMultiplication = false;  // use only formula shortcuts in my OOP Multiplier
    99 
    100 // the following make sense only if bNoPluralMultiplication is false:
    101 static const bool bNoFormula = true;  // don't use any formula shortcuts
    102 static const bool bNoCache   = false; // only formula whenever possible, only make sanse if bNoFormula is false!
    103 
    104 
    105 // false, true, false == old "good" Plural
    106 // false, false ==>> Plural + Cache + Direct Formula - not much
    107 // false, false, true ==>> Plural Mult + Direct Formula (no ~cache)
    108 // true, *, *  == new OOP multiplication!
    109 
    11093
    11194/* global nc_macros : */
     
    10711054static inline poly gnc_uu_Mult_ww_formula (int i, int a, int j, int b, const ring r)
    10721055{
    1073   if(bNoFormula)
     1056  if(ncExtensions(NOFORMULAMASK))
    10741057    return gnc_uu_Mult_ww_vert(i, a, j, b, r);
    10751058
     
    11401123
    11411124
    1142   if(bNoCache && !bNoFormula) // don't use cache whenever possible!
     1125  if(ncExtensions(NOCACHEMASK) && !ncExtensions(NOFORMULAMASK)) // don't use cache whenever possible!
    11431126  { // without cache!?
    11441127    CFormulaPowerMultiplier* FormulaMultiplier = GetFormulaPowerMultiplier(r);
     
    32713254  }
    32723255
    3273   if( bNoPluralMultiplication )
     3256  if( ncExtensions(NOPLURALMASK) )
    32743257    ncInitSpecialPairMultiplication(rGR);
    32753258
    3276   if(!rIsSCA(rGR) && !bNoFormula)
     3259  if(!rIsSCA(rGR) && !ncExtensions(NOFORMULAMASK))
    32773260    ncInitSpecialPowersMultiplication(rGR);
    32783261
Note: See TracChangeset for help on using the changeset viewer.