version 1.206, 2013/09/10 02:10:00 |
version 1.207, 2013/09/12 06:46:16 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.205 2013/09/09 09:47:09 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.206 2013/09/10 02:10:00 noro Exp $ */ |
|
|
#include "nd.h" |
#include "nd.h" |
|
|
Line 3080 void nd_gr_postproc(LIST f,LIST v,int m,struct order_s |
|
Line 3080 void nd_gr_postproc(LIST f,LIST v,int m,struct order_s |
|
MKLIST(*rp,r0); |
MKLIST(*rp,r0); |
} |
} |
|
|
#if 0 |
|
NDV recompute_trace(NODE trace,NDV *p,int m); |
NDV recompute_trace(NODE trace,NDV *p,int m); |
void nd_gr_recompute_trace(LIST f,LIST v,int m,struct order_spec *ord,LIST tlist,LIST *rp); |
void nd_gr_recompute_trace(LIST f,LIST v,int m,struct order_spec *ord,LIST tlist,LIST *rp); |
|
|
Line 3221 void nd_gr_recompute_trace(LIST f,LIST v,int m,struct |
|
Line 3220 void nd_gr_recompute_trace(LIST f,LIST v,int m,struct |
|
MKLIST(*rp,r0); |
MKLIST(*rp,r0); |
if ( DP_Print ) fprintf(asir_out,"\n"); |
if ( DP_Print ) fprintf(asir_out,"\n"); |
} |
} |
#endif |
|
|
|
void nd_gr_trace(LIST f,LIST v,int trace,int homo,int f4,struct order_spec *ord,LIST *rp) |
void nd_gr_trace(LIST f,LIST v,int trace,int homo,int f4,struct order_spec *ord,LIST *rp) |
{ |
{ |
Line 7279 void parse_nd_option(NODE opt) |
|
Line 7277 void parse_nd_option(NODE opt) |
|
|
|
ND mdptond(DP d); |
ND mdptond(DP d); |
ND nd_mul_nm(int mod,NM m0,ND p); |
ND nd_mul_nm(int mod,NM m0,ND p); |
ND *recompute_trace(NODE ti,ND **p,int nb,int mod); |
ND *btog(NODE ti,ND **p,int nb,int mod); |
ND recompute_trace_one(NODE ti,ND *p,int nb,int mod); |
ND btog_one(NODE ti,ND *p,int nb,int mod); |
MAT nd_btog(LIST f,LIST v,int m,struct order_spec *ord,LIST tlist,MAT *rp); |
MAT nd_btog(LIST f,LIST v,int m,struct order_spec *ord,LIST tlist,MAT *rp); |
VECT nd_btog_one(LIST f,LIST v,int m,struct order_spec *ord,LIST tlist,int pos,MAT *rp); |
VECT nd_btog_one(LIST f,LIST v,int m,struct order_spec *ord,LIST tlist,int pos,MAT *rp); |
|
|
Line 7323 ND nd_mul_nm(int mod,NM m0,ND p) |
|
Line 7321 ND nd_mul_nm(int mod,NM m0,ND p) |
|
return r; |
return r; |
} |
} |
|
|
ND *recompute_trace(NODE ti,ND **p,int nb,int mod) |
ND *btog(NODE ti,ND **p,int nb,int mod) |
{ |
{ |
PGeoBucket *r; |
PGeoBucket *r; |
int i,ci; |
int i,ci; |
Line 7362 ND *recompute_trace(NODE ti,ND **p,int nb,int mod) |
|
Line 7360 ND *recompute_trace(NODE ti,ND **p,int nb,int mod) |
|
return rd; |
return rd; |
} |
} |
|
|
ND recompute_trace_one(NODE ti,ND *p,int nb,int mod) |
ND btog_one(NODE ti,ND *p,int nb,int mod) |
{ |
{ |
PGeoBucket r; |
PGeoBucket r; |
int i,ci,j; |
int i,ci,j; |
Line 7454 MAT nd_btog(LIST f,LIST v,int mod,struct order_spec *o |
|
Line 7452 MAT nd_btog(LIST f,LIST v,int mod,struct order_spec *o |
|
for ( t = trace,i=0; t; t = NEXT(t), i++ ) { |
for ( t = trace,i=0; t; t = NEXT(t), i++ ) { |
printf("%d ",i); fflush(stdout); |
printf("%d ",i); fflush(stdout); |
ti = BDY((LIST)BDY(t)); |
ti = BDY((LIST)BDY(t)); |
p[j=QTOS((Q)ARG0(ti))] = recompute_trace(BDY((LIST)ARG1(ti)),p,nb,mod); |
p[j=QTOS((Q)ARG0(ti))] = btog(BDY((LIST)ARG1(ti)),p,nb,mod); |
if ( j == 441 ) |
if ( j == 441 ) |
printf("afo"); |
printf("afo"); |
} |
} |
for ( t = intred, i=0; t; t = NEXT(t), i++ ) { |
for ( t = intred, i=0; t; t = NEXT(t), i++ ) { |
printf("%d ",i); fflush(stdout); |
printf("%d ",i); fflush(stdout); |
ti = BDY((LIST)BDY(t)); |
ti = BDY((LIST)BDY(t)); |
p[j=QTOS((Q)ARG0(ti))] = recompute_trace(BDY((LIST)ARG1(ti)),p,nb,mod); |
p[j=QTOS((Q)ARG0(ti))] = btog(BDY((LIST)ARG1(ti)),p,nb,mod); |
if ( j == 441 ) |
if ( j == 441 ) |
printf("afo"); |
printf("afo"); |
} |
} |
Line 7527 VECT nd_btog_one(LIST f,LIST v,int mod,struct order_sp |
|
Line 7525 VECT nd_btog_one(LIST f,LIST v,int mod,struct order_sp |
|
for ( t = trace,i=0; t; t = NEXT(t), i++ ) { |
for ( t = trace,i=0; t; t = NEXT(t), i++ ) { |
printf("%d ",i); fflush(stdout); |
printf("%d ",i); fflush(stdout); |
ti = BDY((LIST)BDY(t)); |
ti = BDY((LIST)BDY(t)); |
p[j=QTOS((Q)ARG0(ti))] = recompute_trace_one(BDY((LIST)ARG1(ti)),p,nb,mod); |
p[j=QTOS((Q)ARG0(ti))] = btog_one(BDY((LIST)ARG1(ti)),p,nb,mod); |
if ( Demand ) { |
if ( Demand ) { |
nd_save_mod(p[j],j); nd_free(p[j]); p[j] = 0; |
nd_save_mod(p[j],j); nd_free(p[j]); p[j] = 0; |
} |
} |
Line 7535 VECT nd_btog_one(LIST f,LIST v,int mod,struct order_sp |
|
Line 7533 VECT nd_btog_one(LIST f,LIST v,int mod,struct order_sp |
|
for ( t = intred, i=0; t; t = NEXT(t), i++ ) { |
for ( t = intred, i=0; t; t = NEXT(t), i++ ) { |
printf("%d ",i); fflush(stdout); |
printf("%d ",i); fflush(stdout); |
ti = BDY((LIST)BDY(t)); |
ti = BDY((LIST)BDY(t)); |
p[j=QTOS((Q)ARG0(ti))] = recompute_trace_one(BDY((LIST)ARG1(ti)),p,nb,mod); |
p[j=QTOS((Q)ARG0(ti))] = btog_one(BDY((LIST)ARG1(ti)),p,nb,mod); |
if ( Demand ) { |
if ( Demand ) { |
nd_save_mod(p[j],j); nd_free(p[j]); p[j] = 0; |
nd_save_mod(p[j],j); nd_free(p[j]); p[j] = 0; |
} |
} |