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

◆ gridreshape() [2/2]

static2 void gridreshape ( Int ctxtp)

Definition at line 696 of file psgemr.c.

698{
699 Int ori, final; /* original context, and new context created, with
700 * line form */
701 Int nprow, npcol, myrow, mycol;
702 Int *usermap;
703 Int i, j;
704 ori = *ctxtp;
705 Cblacs_gridinfo(ori, &nprow, &npcol, &myrow, &mycol);
706 usermap = mr2d_malloc(sizeof(Int) * nprow * npcol);
707 for (i = 0; i < nprow; i++)
708 for (j = 0; j < npcol; j++) {
709 usermap[i + j * nprow] = Cblacs_pnum(ori, i, j);
710 }
711 /* Cblacs_get(0, 0, &final); */
712 Cblacs_get(ori, (Int)10, &final);
713 Cblacs_gridmap(&final, usermap, (Int)1, (Int)1, nprow * npcol);
714 *ctxtp = final;
715 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: