9{
11 Int Ng, nprow, npcol, myrow, mycol;
12
13 Mgridinfo(ctxt, Ng, nprow, npcol, myrow, mycol);
14 if (rdest == -1) rdest = cdest = 0;
15
16 switch (scope)
17 {
18 case 'r':
19 for (j=0; j < n; j++)
20 {
21 for (i=0; i < m; i++)
22 {
23 rA[i] = myrow;
24 cA[i] = (
Int) (cdest + dist[i]) % npcol;
25 }
26 rA += ldrc;
27 cA += ldrc;
28 dist += m;
29 }
30 break;
31 case 'c':
32 for (j=0; j < n; j++)
33 {
34 for (i=0; i < m; i++)
35 {
36 rA[i] = (
Int) (rdest + dist[i]) % nprow;
37 cA[i] = mycol;
38 }
39 rA += ldrc;
40 cA += ldrc;
41 dist += m;
42 }
43 break;
44 case 'a':
45 dest =
Mvkpnum(ctxt, rdest, cdest);
46 for (j=0; j < n; j++)
47 {
48 for (i=0; i < m; i++)
49 {
50 k = (
Int) (dest + dist[i]) % Ng;
52 }
53 rA += ldrc;
54 cA += ldrc;
55 dist += m;
56 }
57 }
58}
#define Mgridinfo(ctxt, Ng0, nprow0, npcol0, myrow0, mycol0)
#define Mvkpnum(ctxt, prow, pcol)
#define Mvpcoord(ctxt, node, prow, pcol)