[BACK]Return to nd.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2018 / engine

Diff for /OpenXM_contrib2/asir2018/engine/nd.c between version 1.34 and 1.35

version 1.34, 2020/07/10 08:09:05 version 1.35, 2020/08/26 06:40:36
Line 1 
Line 1 
 /* $OpenXM: OpenXM_contrib2/asir2018/engine/nd.c,v 1.33 2020/07/09 02:33:38 noro Exp $ */  /* $OpenXM: OpenXM_contrib2/asir2018/engine/nd.c,v 1.34 2020/07/10 08:09:05 noro Exp $ */
   
 #include "nd.h"  #include "nd.h"
   
Line 18  NM _nm_free_list;
Line 18  NM _nm_free_list;
 ND _nd_free_list;  ND _nd_free_list;
 ND_pairs _ndp_free_list;  ND_pairs _ndp_free_list;
 NODE nd_hcf;  NODE nd_hcf;
 int Nsyz;  int Nsyz,Nsamesig;
   
 Obj nd_top_weight;  Obj nd_top_weight;
   
Line 1223  void print_sig(SIG s)
Line 1223  void print_sig(SIG s)
   fprintf(asir_out,">>*e%d",s->pos);    fprintf(asir_out,">>*e%d",s->pos);
 }  }
   
   // assuming increasing order wrt signature
   
 INLINE int ndl_find_reducer_s(UINT *dg,SIG sig)  INLINE int ndl_find_reducer_s(UINT *dg,SIG sig)
 {  {
   RHist r;    RHist r;
Line 1237  INLINE int ndl_find_reducer_s(UINT *dg,SIG sig)
Line 1239  INLINE int ndl_find_reducer_s(UINT *dg,SIG sig)
     tmp = (UINT *)MALLOC(wpd*sizeof(UINT));      tmp = (UINT *)MALLOC(wpd*sizeof(UINT));
   }    }
   d = ndl_hash_value(dg);    d = ndl_hash_value(dg);
   #if 1
   for ( r = nd_red[d], k = 0; r; r = NEXT(r), k++ ) {    for ( r = nd_red[d], k = 0; r; r = NEXT(r), k++ ) {
     if ( ndl_equal(dg,DL(r)) ) {      if ( ndl_equal(dg,DL(r)) ) {
       return r->index;        return r->index;
     }      }
   }    }
   #endif
   singular = 0;    singular = 0;
   for ( i = 0; i < nd_psn; i++ ) {    for ( i = 0; i < nd_psn; i++ ) {
     r = nd_psh[i];      r = nd_psh[i];
Line 2713  get_eg(&eg2); add_eg(&eg_remove,&eg1,&eg2);
Line 2717  get_eg(&eg2); add_eg(&eg_remove,&eg1,&eg2);
  }   }
  g = conv_ilist_s(nd_demand,0,indp);   g = conv_ilist_s(nd_demand,0,indp);
  if ( DP_Print ) {   if ( DP_Print ) {
    printf("\nnd_sba done. nd_add=%d,Nsyz=%d,Nredundant=%d\n",Nnd_add,Nsyz,Nredundant);     printf("\nnd_sba done. nd_add=%d,Nsyz=%d,Nsamesig=%d,Nredundant=%d\n",Nnd_add,Nsyz,Nsamesig,Nredundant);
    fflush(stdout);     fflush(stdout);
    print_eg("create",&eg_create);     print_eg("create",&eg_create);
    print_eg("merge",&eg_merge);     print_eg("merge",&eg_merge);
Line 3307  ND_pairs merge_pairs_s(ND_pairs p1,ND_pairs p2)
Line 3311  ND_pairs merge_pairs_s(ND_pairs p1,ND_pairs p2)
       r->next = q2; r = q2; q2 = q2->next;        r->next = q2; r = q2; q2 = q2->next;
     } else {      } else {
       ret = DL_COMPARE(q1->lcm,q2->lcm);        ret = DL_COMPARE(q1->lcm,q2->lcm);
         Nsamesig++;
       if ( ret < 0 ) {        if ( ret < 0 ) {
         r->next = q1; r = q1; q1 = q1->next;          r->next = q1; r = q1; q1 = q1->next;
         q2 = q2->next;          q2 = q2->next;
Line 4266  void nd_sba(LIST f,LIST v,int m,int homo,int retdp,int
Line 4271  void nd_sba(LIST f,LIST v,int m,int homo,int retdp,int
   nd_module = 0;    nd_module = 0;
   nd_demand = 0;    nd_demand = 0;
   parse_nd_option(current_option);    parse_nd_option(current_option);
     Nsamesig = 0;
   if ( DP_Multiple )    if ( DP_Multiple )
     nd_scale = ((double)DP_Multiple)/(double)(Denominator?Denominator:1);      nd_scale = ((double)DP_Multiple)/(double)(Denominator?Denominator:1);
   get_vars((Obj)f,&fv); pltovl(v,&vv); vlminus(fv,vv,&nd_vc);    get_vars((Obj)f,&fv); pltovl(v,&vv); vlminus(fv,vv,&nd_vc);

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

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