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

◆ gridreshape() [2/2]

static2 void gridreshape ( Int ctxtp)

Definition at line 648 of file pstrmr.c.

650{
651 Int ori, final; /* original context, and new context created, with
652 * line form */
653 Int nprow, npcol, myrow, mycol;
654 Int *usermap;
655 Int i, j;
656 ori = *ctxtp;
657 Cblacs_gridinfo(ori, &nprow, &npcol, &myrow, &mycol);
658 usermap = mr2d_malloc(sizeof(Int) * nprow * npcol);
659 for (i = 0; i < nprow; i++)
660 for (j = 0; j < npcol; j++) {
661 usermap[i + j * nprow] = Cblacs_pnum(ori, i, j);
662 }
663 /* Cblacs_get(0, 0, &final); */
664 Cblacs_get(ori, (Int)10, &final);
665 Cblacs_gridmap(&final, usermap, (Int)1, (Int)1, nprow * npcol);
666 *ctxtp = final;
667 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: