SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ gridreshape() [2/2]

static2 void gridreshape ( Int ctxtp)

Definition at line 654 of file pdtrmr.c.

656{
657 Int ori, final; /* original context, and new context created, with
658 * line form */
659 Int nprow, npcol, myrow, mycol;
660 Int *usermap;
661 Int i, j;
662 ori = *ctxtp;
663 Cblacs_gridinfo(ori, &nprow, &npcol, &myrow, &mycol);
664 usermap = mr2d_malloc(sizeof(Int) * nprow * npcol);
665 for (i = 0; i < nprow; i++)
666 for (j = 0; j < npcol; j++) {
667 usermap[i + j * nprow] = Cblacs_pnum(ori, i, j);
668 }
669 /* Cblacs_get(0, 0, &final); */
670 Cblacs_get(ori, (Int)10, &final);
671 Cblacs_gridmap(&final, usermap, (Int)1, (Int)1, nprow * npcol);
672 *ctxtp = final;
673 free(usermap);
#define Int
Definition Bconfig.h:22
void Cblacs_gridmap()
Int Cblacs_pnum()
void Cblacs_get()
void Cblacs_gridinfo()
void * mr2d_malloc()
Here is the call graph for this function: