=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/lib/gr,v retrieving revision 1.1 retrieving revision 1.3 diff -u -p -r1.1 -r1.3 --- OpenXM_contrib2/asir2000/lib/gr 1999/12/03 07:39:11 1.1 +++ OpenXM_contrib2/asir2000/lib/gr 2000/06/05 02:26:48 1.3 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/asir99/lib/gr,v 1.1.1.1 1999/11/10 08:12:31 noro Exp $ */ +/* $OpenXM: OpenXM_contrib2/asir2000/lib/gr,v 1.2 2000/01/11 06:43:37 noro Exp $ */ extern INIT_COUNT,ITOR_FAIL$ extern REMOTE_MATRIX,REMOTE_NF,REMOTE_VARS$ @@ -1086,7 +1086,8 @@ def henleq_gsl(L,B,MOD) if ( !COUNT ) COUNT = 1; MOD2 = idiv(MOD,2); - for ( I = 0, C = BB, X = 0, PK = 1, CCC = 0, ITOR_FAIL = -1; ; + X = newvect(size(AA)[0]); + for ( I = 0, C = BB, PK = 1, CCC = 0, ITOR_FAIL = -1; ; I++, PK *= MOD ) { if ( zerovector(C) ) if ( zerovector(RESTA*X+RESTB) ) { @@ -1258,15 +1259,27 @@ def vs_dim(G,V,O) error("vs_dim : ideal is not zero-dimensional!"); } -def dgr(G,V,O,P) +def dgr(G,V,O) { + P = getopt(proc); + if ( type(P) == -1 ) + return gr(G,V,O); P0 = P[0]; P1 = P[1]; P = [P0,P1]; - flush(P0); flush(P1); - rpc(P0,"dp_gr_main",G,V,0,1,O); - rpc(P1,"dp_gr_main",G,V,1,1,O); - F = select(P); - R = rpcrecv(F[0]); flush(P0); flush(P1); - return R; + map(ox_reset,P); + ox_cmo_rpc(P0,"dp_gr_main",G,V,0,1,O); + ox_cmo_rpc(P1,"dp_gr_main",G,V,1,1,O); + map(ox_push_cmd,P,262); /* 262 = OX_popCMO */ + F = ox_select(P); + R = ox_get(F[0]); + if ( F[0] == P0 ) { + Win = "nonhomo"; + Lose = P1; + } else { + Win = "nhomo"; + Lose = P0; + } + ox_reset(Lose); + return [Win,R]; } /* functions for rpc */