Changeset 528d62 in git


Ignore:
Timestamp:
Dec 18, 2013, 6:12:53 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
b5bb857a49ad6ba995c35f60c39498abec0f46fc
Parents:
fdde2e377614577917edbcafe23d6ea9fa7af7647e2f2d4d596a804ea1786814516bb72ef3fa5d24
Message:
Merge pull request #453 from ederc/sba-optimizations

Brings back p_ExpVectorAddSub(): Used in sba
Files:
13 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/kspoly.cc

    rfdde2e3 r528d62  
    223223  if (!PW->is_sigsafe)
    224224  {
    225     poly ftmp;
    226     ring rtmp;
    227     PR->SetLmCurrRing();
    228     poly f1 = pCopy(PR->GetLmCurrRing());
    229     //PR->GetLm(ftmp,rtmp);
    230     //poly f1 = k_LmInit_tailRing_2_currRing(ftmp,rtmp);
    231     poly f2 = PW->GetLmCurrRing();
    232225    poly sigMult = pCopy(PW->sig);   // copy signature of reducer
    233     p_ExpVectorSub(f1, f2, currRing); // Calculate the Monomial we must multiply to p2
    234226//#if 1
    235227#ifdef DEBUGF5
     
    240232    printf("--------------\n");
    241233#endif
    242     sigMult = p_Mult_q(f1,sigMult,currRing);
     234    p_ExpVectorAddSub(sigMult,PR->GetLmCurrRing(),PW->GetLmCurrRing(),currRing);
    243235//#if 1
    244236#ifdef DEBUGF5
  • kernel/polys.h

    rfdde2e3 r528d62  
    8080 ***************************************************************/
    8181
    82 #define pExpVectorCopy(d_p, s_p)    p_ExpVectorCopy(d_p, s_p, currRing)
    83 #define pExpVectorAdd(p1, p2)       p_ExpVectorAdd(p1, p2, currRing)
    84 #define pExpVectorSub(p1, p2)       p_ExpVectorSub(p1, p2, currRing)
    85 #define pExpVectorAddSub(p1, p2, p3)p_ExpVectorAddSub(p1, p2, p3, currRing)
    86 #define pExpVectorSum(pr, p1, p2)   p_ExpVectorSum(pr, p1, p2, currRing)
    87 #define pExpVectorDiff(pr, p1, p2)  p_ExpVectorDiff(pr, p1, p2, currRing)
     82#define pExpVectorCopy(d_p, s_p)      p_ExpVectorCopy(d_p, s_p, currRing)
     83#define pExpVectorAdd(p1, p2)         p_ExpVectorAdd(p1, p2, currRing)
     84#define pExpVectorSub(p1, p2)         p_ExpVectorSub(p1, p2, currRing)
     85#define pExpVectorAddSub(p1, p2, p3)  p_ExpVectorAddSub(p1, p2, p3, currRing)
     86#define pExpVectorSum(pr, p1, p2)     p_ExpVectorSum(pr, p1, p2, currRing)
     87#define pExpVectorDiff(pr, p1, p2)    p_ExpVectorDiff(pr, p1, p2, currRing)
    8888
    8989// Gets a copy of (resp. set) the exponent vector, where e is assumed
  • libpolys/polys/monomials/p_polys.h

    rfdde2e3 r528d62  
    13761376}
    13771377// ExpVector(p1) += ExpVector(p2) - ExpVector(p3)
    1378 //static inline void p_ExpVectorAddSub(poly p1, poly p2, poly p3, const ring r)
    1379 //{
    1380 //  p_LmCheckPolyRing1(p1, r);
    1381 //  p_LmCheckPolyRing1(p2, r);
    1382 //  p_LmCheckPolyRing1(p3, r);
    1383 //#if PDEBUG >= 1
    1384 //  for (int i=1; i<=r->N; i++)
    1385 //    pAssume1(p_GetExp(p1, i, r) + p_GetExp(p2, i, r) >= p_GetExp(p3, i, r));
    1386 //  pAssume1(p_GetComp(p1, r) == 0 ||
    1387 //           (p_GetComp(p2, r) - p_GetComp(p3, r) == 0) ||
    1388 //           (p_GetComp(p1, r) == p_GetComp(p2, r) - p_GetComp(p3, r)));
    1389 //#endif
    1390 //
    1391 //  p_MemAddSub_LengthGeneral(p1->exp, p2->exp, p3->exp, r->ExpL_Size);
    1392 //  // no need to adjust in case of NegWeights
    1393 //}
     1378static inline void p_ExpVectorAddSub(poly p1, poly p2, poly p3, const ring r)
     1379{
     1380  p_LmCheckPolyRing1(p1, r);
     1381  p_LmCheckPolyRing1(p2, r);
     1382  p_LmCheckPolyRing1(p3, r);
     1383#if PDEBUG >= 1
     1384  for (int i=1; i<=r->N; i++)
     1385    pAssume1(p_GetExp(p1, i, r) + p_GetExp(p2, i, r) >= p_GetExp(p3, i, r));
     1386  pAssume1(p_GetComp(p1, r) == 0 ||
     1387           (p_GetComp(p2, r) - p_GetComp(p3, r) == 0) ||
     1388           (p_GetComp(p1, r) == p_GetComp(p2, r) - p_GetComp(p3, r)));
     1389#endif
     1390
     1391  p_MemAddSub_LengthGeneral(p1->exp, p2->exp, p3->exp, r->ExpL_Size);
     1392  // no need to adjust in case of NegWeights
     1393}
    13941394
    13951395// ExpVector(pr) = ExpVector(p1) - ExpVector(p2)
Note: See TracChangeset for help on using the changeset viewer.