Changeset 220277f in git


Ignore:
Timestamp:
Aug 30, 2018, 10:36:25 AM (5 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'spielwiese', 'a719bcf0b8dbc648b128303a49777a094b57592c')
Children:
a0f2b6b7a8139ad5ce4fb16d58135c9558ba191a
Parents:
0b5677c6b2f8865b896a99cadd2973168d436443
Message:
Support components in letterplace kernel multiplication
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/shiftgb.cc

    r0b5677 r220277f  
    9595  int lV = r->isLPring;
    9696
    97   if (sh == 0 || p == NULL || p_LmIsConstant(p,r)) return(p);
     97  if (sh == 0 || p == NULL || p_LmIsConstantComp(p,r)) return(p);
    9898
    9999  int L = p_mLastVblock(p,r);
     
    148148int p_mLastVblock(poly p, const ring r)
    149149{
    150   if (p == NULL || p_LmIsConstant(p,r))
     150  if (p == NULL || p_LmIsConstantComp(p,r))
    151151  {
    152152    return(0);
     
    192192int p_mFirstVblock(poly p, const ring r)
    193193{
    194   if (p == NULL || p_LmIsConstant(p,r))
     194  if (p == NULL || p_LmIsConstantComp(p,r))
    195195  {
    196196    return(0);
  • libpolys/polys/shiftop.cc

    r0b5677 r220277f  
    308308void p_mLPUnShift(poly m, const ring ri)
    309309{
    310   if (m == NULL || p_LmIsConstant(m,ri)) return;
     310  if (m == NULL || p_LmIsConstantComp(m,ri)) return;
    311311
    312312  int lV = ri->isLPring;
     
    345345
    346346// appends m2ExpV to m1ExpV where m1Last is the last Vblock of m1 and m2Last the last Vblock of m2
     347// also adds their components (one of them is always zero)
    347348void p_LPExpVappend(int *m1ExpV, int *m2ExpV, int m1Length, int m2Length, const ring ri) {
    348349#ifdef SHIFT_MULT_DEBUG
     
    357358    m1ExpV[i] = m2ExpV[i - m1Length];
    358359  }
     360
     361  assume(m1ExpV[0] == 0 || m2ExpV[0] == 0); // one component should be zero (otherwise this doesn't make any sense)
     362  m1ExpV[0] += m2ExpV[0]; // as in the commutative variant (they use MemAdd)
    359363#ifdef SHIFT_MULT_DEBUG
    360364  PrintLn(); WriteLPExpV(m1ExpV, ri);
     
    363367
    364368// prepends m2ExpV to m1ExpV where m1Last is the last Vblock of m1 and m2Last the last Vblock of m2
     369// also adds their components (one of them is always zero)
    365370void p_LPExpVprepend(int *m1ExpV, int *m2ExpV, int m1Length, int m2Length, const ring ri) {
    366371#ifdef SHIFT_MULT_DEBUG
     
    388393  }
    389394  omFreeSize((ADDRESS) m1Tmp, (m1Length+1)*sizeof(int));
     395
     396  assume(m1ExpV[0] == 0 || m2ExpV[0] == 0); // one component should be zero (otherwise this doesn't make any sense)
     397  m1ExpV[0] += m2ExpV[0]; // as in the commutative variant (they use MemAdd)
    390398#ifdef SHIFT_MULT_DEBUG
    391399  PrintLn(); WriteLPExpV(m1ExpV, ri);
Note: See TracChangeset for help on using the changeset viewer.