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

◆ gridreshape() [2/2]

static2 void gridreshape ( Int ctxtp)

Definition at line 657 of file pctrmr.c.

659{
660 Int ori, final; /* original context, and new context created, with
661 * line form */
662 Int nprow, npcol, myrow, mycol;
663 Int *usermap;
664 Int i, j;
665 ori = *ctxtp;
666 Cblacs_gridinfo(ori, &nprow, &npcol, &myrow, &mycol);
667 usermap = mr2d_malloc(sizeof(Int) * nprow * npcol);
668 for (i = 0; i < nprow; i++)
669 for (j = 0; j < npcol; j++) {
670 usermap[i + j * nprow] = Cblacs_pnum(ori, i, j);
671 }
672 /* Cblacs_get(0, 0, &final); */
673 Cblacs_get(ori, (Int)10, &final);
674 Cblacs_gridmap(&final, usermap, (Int)1, (Int)1, nprow * npcol);
675 *ctxtp = final;
676 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: