12 int Np, Iam, msgid, Np_1, dest;
19 if (npaths ==
FULLCON) npaths = Np_1;
24 mydist = (Np + Iam - src) % Np;
28 dest = (Np_1+Iam) % Np;
29 mydist = (Np + src - Iam) % Np;
35 if (npaths > Np_1) npaths = Np_1;
37 pathlen = Np_1 / npaths;
38 lastlong = (Np_1%npaths) * (pathlen+1);
41 if (mydist <= lastlong) faredge = ((mydist-1)/(pathlen+1)+1)*(pathlen+1);
42 else faredge = ((lastlong-1)/(pathlen+1)+1) * (pathlen+1)
43 + ((mydist-lastlong-1)/pathlen + 1) * pathlen;
45 else faredge = ((mydist-1)/pathlen + 1) * pathlen;
48 if (mydist < faredge) send(ctxt, dest, msgid, bp);