6 int Np, Iam, msgid, i, j;
14 mydist = (Np + Iam - src) % Np;
19 for (i=nbranches; i < Np; i *= nbranches);
20 for (i /= nbranches; (mydist%i); i /= nbranches);
26 while ( (i > 1) && !(mydist%i) )
32 destdist = mydist + j*i;
34 send(ctxt, (src+destdist)%Np, msgid, bp);
36 while(++j < nbranches);