Changeset 35eef23 in git for kernel/ring.cc


Ignore:
Timestamp:
Jan 8, 2009, 11:21:35 AM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
836e3892f2bb1499edb74ed0c074c1de377b916d
Parents:
9d34f019dc4179e88a025827c58b4c5aeda1b454
Message:
*hannes: rCopy0: optimized


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

Legend:

Unmodified
Added
Removed
  • kernel/ring.cc

    r9d34f0 r35eef23  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.112 2009-01-08 09:42:48 Singular Exp $ */
     4/* $Id: ring.cc,v 1.113 2009-01-08 10:21:35 Singular Exp $ */
    55
    66/*
     
    14681468  memset(res,0,sizeof(ip_sring));
    14691469  //memcpy4(res,r,sizeof(ip_sring));
    1470   res->idroot=NULL; /* local objects */
     1470  //memset: res->idroot=NULL; /* local objects */
    14711471  //ideal      minideal;
    14721472  res->options=r->options; /* ring dependent options */
    14731473
    1474   // what follows below here should be set by rComplete, _only_
    1475   //long      *ordsgn;  /* array of +/- 1 (or 0) for comparing monomials */
    1476                        /*  ExpL_Size entries*/
    1477   res->ordsgn=NULL;
    1478 
    1479   // is NULL for lp or N == 1, otherwise non-NULL (with OrdSize > 0 entries) */
    1480   //sro_ord*   typ;   /* array of orderings + sizes, OrdSize entries */
    1481   res->typ=NULL;
    1482 
    1483 
    1484   //int*     VarOffset;
    1485   res->VarOffset=NULL;
    1486   //int*     firstwv;
    1487   res->firstwv=NULL;
     1474  //memset: res->ordsgn=NULL;
     1475  //memset: res->typ=NULL;
     1476  //memset: res->VarOffset=NULL;
     1477  //memset: res->firstwv=NULL;
    14881478
    14891479  //struct omBin_s*   PolyBin; /* Bin from where monoms are allocated */
    1490   res->PolyBin=NULL; // rComplete
     1480  //memset: res->PolyBin=NULL; // rComplete
    14911481  res->ch=r->ch;     /* characteristic */
    14921482#ifdef HAVE_RINGS
     
    14991489  res->ringflagb=r->ringflagb;
    15001490#endif
    1501   res->ref=0; /* reference counter to the ring */
     1491  //memset: res->ref=0; /* reference counter to the ring */
    15021492
    15031493  res->float_len=r->float_len; /* additional char-flags */
     
    15251515  res->ComponentOrder=r->ComponentOrder;
    15261516
    1527 
    1528   // what follows below here should be set by rComplete, _only_
    1529   // contains component, but no weight fields in E */
    1530   //short      ExpL_Size; // size of exponent vector in long
    1531   res->ExpL_Size=0;
    1532   //short      CmpL_Size; // portions which need to be compared
    1533   res->CmpL_Size=0;
    1534   /* number of long vars in exp vector:
    1535      long vars are those longs in the exponent vector which are
    1536      occupied by variables, only */
    1537   //short     VarL_Size;
    1538   res->VarL_Size=0;
    1539 
    1540   //short      pCompIndex; /* p->exp.e[pCompIndex] is the component */
    1541   res->pCompIndex=0;
    1542   //short      pOrdIndex; /* p->exp[pOrdIndex] is pGetOrd(p) */
    1543   res->pOrdIndex=0;
    1544 
    1545   //short      OrdSize; /* size of ord vector (in sro_ord) */
    1546   res->OrdSize=0;
    1547 
    1548 
    1549   /* if >= 0, long vars in exp vector are consecutive and start there
    1550      if <  0, long vars in exp vector are not consecutive */
    1551   //short     VarL_LowIndex;
    1552   res->VarL_LowIndex=0;
    1553   // number of exponents in r->VarL_Offset[0]
    1554   // is minimal number of exponents in a long var
    1555   //short     MinExpPerLong;
    1556   res->MinExpPerLong=0;
    1557 
    1558   /* if this is > 0, then NegWeightL_Offset[0..size_1] is index of longs in
    1559    ExpVector whose values need an offset due to negative weights */
    1560   //short     NegWeightL_Size;
    1561   res->NegWeightL_Size=0;
    1562   /* array of NegWeigtL_Size indicies */
    1563   //int*      NegWeightL_Offset;
    1564   res->NegWeightL_Offset=NULL;
    1565 
    1566   /* array of size VarL_Size,
    1567      VarL_Offset[i] gets i-th long var in exp vector */
    1568   //int*      VarL_Offset;
    1569   res->VarL_Offset=NULL;
     1517  //memset: res->ExpL_Size=0;
     1518  //memset: res->CmpL_Size=0;
     1519  //memset: res->VarL_Size=0;
     1520  //memset: res->pCompIndex=0;
     1521  //memset: res->pOrdIndex=0;
     1522  //memset: res->OrdSize=0;
     1523  //memset: res->VarL_LowIndex=0;
     1524  //memset: res->MinExpPerLong=0;
     1525  //memset: res->NegWeightL_Size=0;
     1526  //memset: res->NegWeightL_Offset=NULL;
     1527  //memset: res->VarL_Offset=NULL;
    15701528
    15711529  // the following are set by rComplete unless predefined
     
    15731531  /* mask for getting single exponents */
    15741532  res->bitmask=r->bitmask;
    1575   /* mask used for divisiblity tests */
    15761533  res->divmask=r->divmask;
    15771534  res->BitsPerExp = r->BitsPerExp;
    15781535  res->ExpPerLong =  r->ExpPerLong;
    15791536
    1580   //p_Procs_s*    p_Procs;
    1581   res->p_Procs=NULL;
    1582 
    1583   /* FDeg and LDeg */
    1584   //pFDegProc     pFDeg;
    1585   res->pFDeg=NULL;
    1586   //pLDegProc     pLDeg;
    1587   res->pLDeg=NULL;
    1588 
    1589   /* as it was determined by rComplete */
    1590   //pFDegProc     pFDegOrig;
    1591   res->pFDegOrig=NULL;
    1592   /* and as it was determined before rOptimizeLDeg */
    1593   //pLDegProc     pLDegOrig;
    1594   res->pLDegOrig=NULL;
    1595 
    1596   //p_SetmProc    p_Setm;
    1597   res->p_Setm=NULL;
    1598   //n_Procs_s*    cf;
    1599   res->cf=NULL;
     1537  //memset: res->p_Procs=NULL;
     1538  //memset: res->pFDeg=NULL;
     1539  //memset: res->pLDeg=NULL;
     1540  //memset: res->pFDegOrig=NULL;
     1541  //memset: res->pLDegOrig=NULL;
     1542  //memset: res->p_Setm=NULL;
     1543  //memset: res->cf=NULL;
    16001544  res->options=r->options;
    16011545  #ifdef HAVE_RINGS
     
    16061550    r->algring->ref++;
    16071551  res->algring=r->algring;
    1608   res->minideal=NULL;
     1552  //memset: res->minideal=NULL;
    16091553  if (r->parameter!=NULL)
    16101554  {
     
    16421586    memcpy4(res->block1,r->block1,i * sizeof(int));
    16431587  }
    1644   else
    1645   {
    1646     res->wvhdl = NULL;
    1647     res->order = NULL;
    1648     res->block0 = NULL;
    1649     res->block1 = NULL;
    1650   }
     1588  //memset: else
     1589  //memset: {
     1590  //memset:   res->wvhdl = NULL;
     1591  //memset:   res->order = NULL;
     1592  //memset:   res->block0 = NULL;
     1593  //memset:   res->block1 = NULL;
     1594  //memset: }
    16511595
    16521596  res->names   = (char **)omAlloc0(rVar(r) * sizeof(char_ptr));
     
    16581602  {
    16591603    if (copy_qideal) res->qideal= idrCopyR_NoSort(r->qideal, r);
    1660     else res->qideal = NULL;
    1661   }
    1662   else res->qideal = NULL;
     1604    //memset: else res->qideal = NULL;
     1605  }
     1606  //memset: else res->qideal = NULL;
    16631607#ifdef HAVE_PLURAL
    1664   res->GetNC() = NULL; // copy is purely commutative!!!
     1608  //memset: res->GetNC() = NULL; // copy is purely commutative!!!
    16651609//  if (rIsPluralRing(r))
    16661610//    nc_rCopy0(res, r); // is this correct??? imho: no!
Note: See TracChangeset for help on using the changeset viewer.