Changeset 157b51 in git for libpolys


Ignore:
Timestamp:
Feb 15, 2022, 2:17:18 PM (2 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
127ab7c44a0a74eb1424cf8dd7c0ca03bb9df6b8
Parents:
fd82c0bdecd7f9c58bae5d7b3a45808f0096fd55
Message:
xalloc: ringorder_am
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/ring.cc

    rfd82c0 r157b51  
    991991          if (r2->order[0]==ringorder_a64) l*=2;
    992992          else if (r2->order[0]==ringorder_M) l=l*l;
     993          else if (r2->order[0]==ringorder_am)
     994          {
     995            l+=r2->wvhdl[1][r2->block1[0]-r2->block0[0]+1]+1;
     996          }
    993997          tmpR.wvhdl[1]=(int*)omalloc(l*sizeof(int));
    994998          memcpy(tmpR.wvhdl[1],r2->wvhdl[0],l*sizeof(int));
     
    10791083            if (r1->order[i]==ringorder_a64) l*=2;
    10801084            else if (r1->order[i]==ringorder_M) l=l*l;
     1085            else if (r1->order[i]==ringorder_am)
     1086            {
     1087              l+=r1->wvhdl[i][r1->block1[i]-r1->block0[i]+1]+1;
     1088            }
    10811089            tmpR.wvhdl[i]=(int*)omalloc(l*sizeof(int));
    10821090            memcpy(tmpR.wvhdl[i],r1->wvhdl[i],l*sizeof(int));
     
    11091117                if (r2->order[i]==ringorder_a64) l*=2;
    11101118                else if (r2->order[i]==ringorder_M) l=l*l;
     1119                else if (r2->order[i]==ringorder_am)
     1120                {
     1121                  l+=r2->wvhdl[i][r2->block1[i]-r2->block0[i]+1]+1;
     1122                }
    11111123                tmpR.wvhdl[j]=(int*)omalloc(l*sizeof(int));
    11121124                memcpy(tmpR.wvhdl[j],r2->wvhdl[i],l*sizeof(int));
     
    11461158            if (r1->order[i]==ringorder_a64) l*=2;
    11471159            else if (r1->order[i]==ringorder_M) l=l*l;
     1160            else if (r1->order[i]==ringorder_am)
     1161            {
     1162              l+=r1->wvhdl[i][r1->block1[i]-r1->block0[i]+1]+1;
     1163            }
    11481164            tmpR.wvhdl[i]=(int*)omalloc(l*sizeof(int));
    11491165            memcpy(tmpR.wvhdl[i],r1->wvhdl[i],l*sizeof(int));
     
    14961512          if (r->order[j]==ringorder_a64) l*=2;
    14971513          else if (r->order[j]==ringorder_M) l=l*l;
     1514          else if (r->order[j]==ringorder_am)
     1515          {
     1516            l+=r->wvhdl[j][r->block1[j]-r->block0[j]+1]+1;
     1517          }
    14981518          res->wvhdl[j]=(int*)omalloc(l*sizeof(int));
    14991519          memcpy(res->wvhdl[j],r->wvhdl[j],l*sizeof(int));
     
    16361656          if (r->order[j]==ringorder_a64) l*=2;
    16371657          else if (r->order[j]==ringorder_M) l=l*l;
     1658          else if (r->order[j]==ringorder_am)
     1659          {
     1660            l+=r->wvhdl[j][r->block1[j]-r->block0[j]+1]+1;
     1661          }
    16381662          res->wvhdl[j+1]=(int*)omalloc(l*sizeof(int));
    16391663          memcpy(res->wvhdl[j+1],r->wvhdl[j],l*sizeof(int));
     
    45224546        if (r->order[j-1]==ringorder_a64) l*=2;
    45234547        else if (r->order[j-1]==ringorder_M) l=l*l;
    4524         wvhdl[j]=(int*)omalloc(l*sizeof(int)); /*l+1???*/
     4548        else if (r->order[j-1]==ringorder_am)
     4549        {
     4550          l+=r->wvhdl[j-1][r->block1[j-1]-r->block0[j-1]+1]+1;
     4551        }
     4552        wvhdl[j]=(int*)omalloc(l*sizeof(int));
    45254553        memcpy(wvhdl[j],r->wvhdl[j-1],l*sizeof(int));
    45264554      }
     
    47104738        if (r->order[j]==ringorder_a64) l*=2;
    47114739        else if (r->order[j]==ringorder_M) l=l*l;
     4740        else if (r->order[j]==ringorder_am)
     4741        {
     4742          l+=r->wvhdl[j][r->block1[j]-r->block0[j]+1]+1;
     4743        }
    47124744        new_r->wvhdl[j]=(int*)omalloc(l*sizeof(int));
    47134745        memcpy(new_r->wvhdl[j],r->wvhdl[j],l*sizeof(int));
     
    49444976        if (r->order[i]==ringorder_a64) l*=2;
    49454977        else if (r->order[i]==ringorder_M) l=l*l;
     4978        else if (r->order[i]==ringorder_am)
     4979        {
     4980          l+=r->wvhdl[j][r->block1[i]-r->block0[i]+1]+1;
     4981        }
    49464982        wvhdl[j]=(int*)omalloc(l*sizeof(int));
    49474983        memcpy(wvhdl[j],r->wvhdl[i],l*sizeof(int));
Note: See TracChangeset for help on using the changeset viewer.