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

◆ gridreshape() [2/2]

static2 void gridreshape ( Int ctxtp)

Definition at line 699 of file pcgemr.c.

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