ScaLAPACK  2.0.2
ScaLAPACK: Scalable Linear Algebra PACKage
blacs_init_.c File Reference
#include "Bdef.h"
Include dependency graph for blacs_init_.c:

Go to the source code of this file.


void Cblacs_gridinit (int *ConTxt, char *order, int nprow, int npcol)

Function/Subroutine Documentation

void Cblacs_gridinit ( int *  ConTxt,
char *  order,
int  nprow,
int  npcol 

Definition at line 4 of file blacs_init_.c.

   void Cblacs_gridmap(int *, int *, int, int, int);
   int *tmpgrid, *iptr;
   int i, j;

 * Grid can be row- or column-major natural ordering when blacs_gridinit is
 * called.  Define a tmpgrid to reflect this, and call blacs_gridmap to
 * set it up
   iptr = tmpgrid = (int*) malloc( Mpval(nprow)*Mpval(npcol)*sizeof(*tmpgrid) );
   if (Mlowcase(F2C_CharTrans(order)) == 'c')
      i = Mpval(npcol) * Mpval(nprow);
      for (j=0; j < i; j++) iptr[j] = j;
      for (j=0; j < Mpval(npcol); j++)
         for (i=0; i < Mpval(nprow); i++) iptr[i] = i * Mpval(npcol) + j;
         iptr += Mpval(nprow);
   Cblacs_gridmap(ConTxt, tmpgrid, nprow, nprow, npcol);
   blacs_gridmap_(ConTxt, tmpgrid, nprow, nprow, npcol);

Here is the call graph for this function:

Here is the caller graph for this function: