Changeset 220277f in git for libpolys/polys/shiftop.cc


Ignore:
Timestamp:
Aug 30, 2018, 10:36:25 AM (6 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
Children:
a0f2b6b7a8139ad5ce4fb16d58135c9558ba191a
Parents:
0b5677c6b2f8865b896a99cadd2973168d436443
Message:
Support components in letterplace kernel multiplication
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.