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

◆ gridreshape() [2/2]

static2 void gridreshape ( Int ctxtp)

Definition at line 706 of file pdgemr.c.

708{
709 Int ori, final; /* original context, and new context created, with
710 * line form */
711 Int nprow, npcol, myrow, mycol;
712 Int *usermap;
713 Int i, j;
714 ori = *ctxtp;
715 Cblacs_gridinfo(ori, &nprow, &npcol, &myrow, &mycol);
716 usermap = mr2d_malloc(sizeof(Int) * nprow * npcol);
717 for (i = 0; i < nprow; i++)
718 for (j = 0; j < npcol; j++) {
719 usermap[i + j * nprow] = Cblacs_pnum(ori, i, j);
720 }
721 /* Cblacs_get(0, 0, &final); */
722 Cblacs_get(ori, (Int)10, &final);
723 Cblacs_gridmap(&final, usermap, (Int)1, (Int)1, nprow * npcol);
724 *ctxtp = final;
725 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: