Changeset 6469c2 in git


Ignore:
Timestamp:
Oct 20, 2022, 2:27:54 PM (18 months ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
9a4aedf54793e6eefea03c9c5d55bce8aa414bc8
Parents:
8e2c77abbebad1448e16255fa312493d9602f376
Message:
opt: remove p_LmDivisible.. with different rings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.h

    r8e2c77 r6469c2  
    18221822  {
    18231823    if (p_GetExp(a,i,r_a) > p_GetExp(b,i,r_b))
     1824    {
    18241825      return FALSE;
     1826    }
    18251827    i--;
    18261828  }
     
    18751877  return FALSE;
    18761878}
    1877 static inline BOOLEAN _p_LmDivisibleBy(poly a, const ring r_a, poly b, const ring r_b)
    1878 {
    1879   if (p_GetComp(a, r_a) == 0 || p_GetComp(a,r_a) == p_GetComp(b,r_b))
    1880     return _p_LmDivisibleByNoComp(a, r_a, b, r_b);
    1881   return FALSE;
    1882 }
    18831879static inline BOOLEAN p_LmDivisibleByNoComp(poly a, poly b, const ring r)
    18841880{
     
    19131909  return FALSE;
    19141910}
    1915 static inline BOOLEAN p_DivisibleBy(poly a, const ring r_a, poly b, const ring r_b)
    1916 {
    1917   pIfThen1(b!=NULL, p_LmCheckPolyRing1(b, r_b));
    1918   pIfThen1(a!=NULL, p_LmCheckPolyRing1(a, r_a));
    1919   if (a != NULL) {
    1920       return _p_LmDivisibleBy(a, r_a, b, r_b);
    1921   }
    1922   return FALSE;
    1923 }
    1924 static inline BOOLEAN p_LmDivisibleBy(poly a, const ring r_a, poly b, const ring r_b)
    1925 {
    1926   p_LmCheckPolyRing(a, r_a);
    1927   p_LmCheckPolyRing(b, r_b);
    1928   return _p_LmDivisibleBy(a, r_a, b, r_b);
    1929 }
    19301911
    19311912static inline BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a,
     
    19661947#else
    19671948  return pDebugLmShortDivisibleByNoComp(a, sev_a, r, b, not_sev_b, r);
    1968 #endif
    1969 }
    1970 
    1971 static inline BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, const ring r_a,
    1972                                       poly b, unsigned long not_sev_b, const ring r_b)
    1973 {
    1974   p_LmCheckPolyRing1(a, r_a);
    1975   p_LmCheckPolyRing1(b, r_b);
    1976 #ifndef PDIV_DEBUG
    1977   _pPolyAssume2(p_GetShortExpVector(a, r_a) == sev_a, a, r_a);
    1978   _pPolyAssume2(p_GetShortExpVector(b, r_b) == ~ not_sev_b, b, r_b);
    1979 
    1980   if (sev_a & not_sev_b)
    1981   {
    1982     pAssume1(_p_LmDivisibleByNoComp(a, r_a, b, r_b) == FALSE);
    1983     return FALSE;
    1984   }
    1985   return _p_LmDivisibleBy(a, r_a, b, r_b);
    1986 #else
    1987   return pDebugLmShortDivisibleBy(a, sev_a, r_a, b, not_sev_b, r_b);
    19881949#endif
    19891950}
Note: See TracChangeset for help on using the changeset viewer.