ScaLAPACK 2.1  2.1
ScaLAPACK: Scalable Linear Algebra PACKage
blacs_pnum_.c
Go to the documentation of this file.
1 #include "Bdef.h"
2 
3 #if (INTFACE == C_CALL)
4 int Cblacs_pnum(int ConTxt, int prow, int pcol)
5 #else
6 F_INT_FUNC blacs_pnum_(int *ConTxt, int *prow, int *pcol)
7 #endif
8 {
9  BLACSCONTEXT *ctxt;
10 
11  MGetConTxt(Mpval(ConTxt), ctxt);
12  if ( (Mpval(prow) >= 0) && (Mpval(prow) < ctxt->cscp.Np) &&
13  (Mpval(pcol) >= 0) && (Mpval(pcol) < ctxt->rscp.Np) )
14  return( Mkpnum(ctxt, Mpval(prow), Mpval(pcol)) );
15  else return(-1);
16 }
bLaCsCoNtExT::rscp
BLACSSCOPE rscp
Definition: Bdef.h:25
F_INT_FUNC
#define F_INT_FUNC
Definition: Bdef.h:233
MGetConTxt
#define MGetConTxt(Context, ctxtptr)
Definition: Bdef.h:200
blacs_pnum_
F_INT_FUNC blacs_pnum_(int *ConTxt, int *prow, int *pcol)
Definition: blacs_pnum_.c:6
Mpval
#define Mpval(para)
Definition: Bdef.h:261
bLaCsCoNtExT
Definition: Bdef.h:23
Mkpnum
#define Mkpnum(ctxt, prow, pcol)
Definition: Bdef.h:173
Cblacs_pnum
int Cblacs_pnum()
bLaCsCoNtExT::cscp
BLACSSCOPE cscp
Definition: Bdef.h:25
Bdef.h
bLaCsScOpE::Np
int Np
Definition: Bdef.h:17