[BACK]Return to array.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / builtin

Diff for /OpenXM_contrib2/asir2000/builtin/array.c between version 1.20 and 1.21

version 1.20, 2001/09/17 03:33:57 version 1.21, 2001/09/17 07:16:58
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/builtin/array.c,v 1.19 2001/09/17 02:47:07 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/builtin/array.c,v 1.20 2001/09/17 03:33:57 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "base.h"  #include "base.h"
Line 1399  int md;
Line 1399  int md;
 }  }
   
 /*  /*
         rlist : reducers list  
         ht(BDY(rlist)) < ht(BDY(NEXT(rlist)) < ...  w.r.t. the term order  
 */  
   
 void reduce_reducers_mod_compress(rlist,nred,at,col,md,redmatp,indredp)  
 NODE rlist;  
 int nred;  
 DL *at;  
 int col,md;  
 CDP **redmatp;  
 int **indredp;  
 {  
         CDP *redmat;  
         CDP t;  
         int *indred,*w;  
         int i,k;  
         NODE r;  
   
         *redmatp = redmat = (CDP *)CALLOC(nred,sizeof(CDP));  
         *indredp = indred = (int *)CALLOC(nred,sizeof(int));  
         w = (int *)CALLOC(col,sizeof(int));  
   
         _dpmod_to_vect_compress(BDY(rlist),at,&redmat[0]);  
         indred[0] = redmat[0]->body[0].index;  
   
         for ( i = 1, r = NEXT(rlist); i < nred; i++, r = NEXT(r) ) {  
                 bzero(w,col*sizeof(int));  
                 _dpmod_to_vect(BDY(r),at,w);  
                 reduce_sp_by_red_mod_compress(w,redmat,indred,i,col,md);  
                 compress_vect(w,col,&redmat[i]);  
                 indred[i] = redmat[i]->body[0].index;  
         }  
 }  
   
 /*  
         mat[i] : compressed reducers (i=0,...,nred-1)          mat[i] : compressed reducers (i=0,...,nred-1)
         mat[0] < mat[1] < ... < mat[nred-1] w.r.t the term order          mat[0] < mat[1] < ... < mat[nred-1] w.r.t the term order
 */  */
   
 int red_by_compress(m,p,r,hc,len)  int red_by_compress(m,p,r,ri,hc,len)
 int m;  int m;
 unsigned int *p;  unsigned int *p;
 register struct oCM *r;  register unsigned int *r;
   register unsigned short *ri;
 unsigned int hc;  unsigned int hc;
 register int len;  register int len;
 {  {
Line 1449  register int len;
Line 1415  register int len;
         unsigned int dmy;          unsigned int dmy;
         unsigned int *pj;          unsigned int *pj;
   
         p[r->index] = 0; r++;          p[*ri] = 0; r++; ri++;
         for ( len--; len; len--, r++ ) {          for ( len--; len; len--, r++, ri++ ) {
                 pj = p+r->index;                  pj = p+ *ri;
                 DMA(r->c,hc,*pj,up,lo);                  DMA(*r,hc,*pj,up,lo);
                 if ( up ) {                  if ( up ) {
                         DSAB(m,up,lo,dmy,*pj);                          DSAB(m,up,lo,dmy,*pj);
                 } else                  } else
Line 1482  int len;
Line 1448  int len;
                 }                  }
 }  }
   
   extern unsigned int **psca;
   
 void reduce_sp_by_red_mod_compress (sp,redmat,ind,nred,col,md)  void reduce_sp_by_red_mod_compress (sp,redmat,ind,nred,col,md)
 int *sp;  int *sp;
 CDP *redmat;  CDP *redmat;
Line 1494  int md;
Line 1462  int md;
         CDP ri;          CDP ri;
         unsigned int hc,up,lo,up1,lo1,c;          unsigned int hc,up,lo,up1,lo1,c;
         unsigned int *usp;          unsigned int *usp;
         struct oCM *rib;  
   
         usp = (unsigned int *)sp;          usp = (unsigned int *)sp;
         /* reduce the spolys by redmat */          /* reduce the spolys by redmat */
Line 1506  int md;
Line 1473  int md;
                         hc = md-hc;                          hc = md-hc;
                         ri = redmat[i];                          ri = redmat[i];
                         len = ri->len;                          len = ri->len;
                         red_by_compress(md,usp,ri->body,hc,len);                          red_by_compress(md,usp,psca[ri->psindex],ri->body,hc,len);
                 }                  }
         }          }
         for ( i = 0; i < col; i++ )          for ( i = 0; i < col; i++ )

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>