[BACK]Return to demo.rr CVS log [TXT][DIR] Up to [local] / OpenXM / doc / ascm2001p

Annotation of OpenXM/doc/ascm2001p/demo.rr, Revision 1.1

1.1     ! takayama    1: extern Proc1,Proc2$
        !             2: Proc1 = -1$ Proc2 = -1$
        !             3: /* G:set of polys; V:list of variables */
        !             4: /* Mod: the Ground field GF(Mod); O:type of order */
        !             5: def dgr(G,V,Mod,O)
        !             6: {
        !             7:   /* invoke servers if necessary */
        !             8:   if ( Proc1 == -1 ) Proc1 = ox_launch();
        !             9:   if ( Proc2 == -1 ) Proc2 = ox_launch();
        !            10:   P = [Proc1,Proc2];
        !            11:   map(ox_reset,P); /* reset servers */
        !            12:   /* P0 executes Buchberger algorithm over GF(Mod) */
        !            13:   ox_cmo_rpc(P[0],"dp_gr_mod_main",G,V,0,Mod,O);
        !            14:   /* P1 executes F4 algorithm over GF(Mod) */
        !            15:   ox_cmo_rpc(P[1],"dp_f4_mod_main",G,V,Mod,O);
        !            16:   map(ox_push_cmd,P,262); /* 262 = OX_popCMO */
        !            17:   F = ox_select(P); /* wait for data */
        !            18:   /* F[0] is a server's id which is ready */
        !            19:   R = ox_get(F[0]);
        !            20:   if ( F[0] == P[0] ) { Win = "Buchberger"; Lose = P[1]; }
        !            21:   else { Win = "F4"; Lose = P[0]; }
        !            22:   ox_reset(Lose); /* reset the loser */
        !            23:   return [Win,R];
        !            24: }
        !            25: /*
        !            26:   Try dgr(katsura(5),vars(katsura(5)),113,2);
        !            27: */
        !            28: end$
        !            29:

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