1 #include "Bdef.h" 2 3 #if (INTFACE == C_CALL) Cblacs_pnum(int ConTxt,int prow,int pcol)4int 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 } 17