Changeset efcd6fc in git


Ignore:
Timestamp:
Jul 24, 2008, 11:45:53 AM (16 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9a23ea12b6c62eb9f558b89d9b30faf7fd7880ef
Parents:
9049476e9a76ab4688fdc64ff41ea3059d12c45e
Message:
*motsak: testing different multiplication implemenations


git-svn-id: file:///usr/local/Singular/svn/trunk@10901 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/gring.cc

    r904947 refcd6fc  
    77 *  Author:  levandov (Viktor Levandovsky)
    88 *  Created: 8/00 - 11/00
    9  *  Version: $Id: gring.cc,v 1.65 2008-07-23 07:09:45 motsak Exp $
     9 *  Version: $Id: gring.cc,v 1.66 2008-07-24 09:45:53 motsak Exp $
    1010 *******************************************************************/
    1111
     
    4545#include <ncSAMult.h> // for CMultiplier etc classes
    4646#include <ncSAFormula.h> // for CFormulaPowerMultiplier and enum Enum_ncSAType
     47
     48
     49static const bool bNoPluralMultiplication = false;  // use only formula shortcuts in my OOP Multiplier
     50
     51// the following make sense only if bNoPluralMultiplication is false:
     52static const bool bNoFormula = true;  // don't use any formula shortcuts
     53static const bool bNoCache   = false; // only formula whenever possible, only make sanse if bNoFormula is false!
    4754
    4855
     
    978985
    979986
    980 
    981 inline poly gnc_uu_Mult_ww_formula (int i, int a, int j, int b, const ring r)
    982 {
    983 
     987static inline poly gnc_uu_Mult_ww_formula (int i, int a, int j, int b, const ring r)
     988{
     989  if(bNoFormula)
     990    return gnc_uu_Mult_ww_vert(i, a, j, b, r);
     991 
    984992  CFormulaPowerMultiplier* FormulaMultiplier = GetFormulaPowerMultiplier(r);
    985993  Enum_ncSAType PairType = _ncSA_notImplemented;
     
    10471055  p_Delete(&out,r);
    10481056
    1049 //   CFormulaPowerMultiplier* FormulaMultiplier = GetFormulaPowerMultiplier(r);
    1050 //
    1051 //   if( FormulaMultiplier != NULL )
    1052 //   {
    1053 //     Enum_ncSAType PairType = FormulaMultiplier->GetPair(j, i);
    1054 //
    1055 //     if( PairType != _ncSA_notImplemented )
    1056 // //    return FormulaMultiplier->Multiply(j, i, b, a);
    1057 //       return CFormulaPowerMultiplier::Multiply( PairType, j, i, b, a, r);
    1058 //   }
    1059 
     1057
     1058  if(bNoCache && !bNoFormula)
     1059  { // without cache!?
     1060    CFormulaPowerMultiplier* FormulaMultiplier = GetFormulaPowerMultiplier(r);
     1061    Enum_ncSAType PairType = _ncSA_notImplemented;
     1062
     1063     if( FormulaMultiplier != NULL )
     1064       PairType = FormulaMultiplier->GetPair(j, i);
     1065
     1066     if( PairType != _ncSA_notImplemented )
     1067  // //    return FormulaMultiplier->Multiply(j, i, b, a);
     1068       return CFormulaPowerMultiplier::Multiply( PairType, j, i, b, a, r);
     1069  }
     1070
     1071 
    10601072  /* we are here if  i>j and variables do not commute or quasicommute */
    10611073  /* in fact, now a>=1 and b>=1; and j<i */
     
    32473259  }
    32483260
    3249 //  ncInitSpecialPowersMultiplication(r);
    3250 
     3261
     3262  bool newmult = false;
     3263  if( bNoPluralMultiplication )
     3264    newmult = ncInitSpecialPairMultiplication(r);
     3265
     3266
     3267  if( !newmult )
     3268    if(!rIsSCA(r) && !bNoFormula)
     3269        newmult = ncInitSpecialPowersMultiplication(r);
     3270 
     3271 
    32513272  if (save != currRing)
    32523273    rChangeCurrRing(save);
Note: See TracChangeset for help on using the changeset viewer.