File: blacs_pnum_.c

package info (click to toggle)
scalapack 2.0.2-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 36,300 kB
  • sloc: fortran: 338,514; ansic: 75,307; makefile: 1,385; sh: 56
file content (16 lines) | stat: -rw-r--r-- 427 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "Bdef.h"

#if (INTFACE == C_CALL)
int Cblacs_pnum(int ConTxt, int prow, int pcol)
#else
F_INT_FUNC blacs_pnum_(int *ConTxt, int *prow, int *pcol)
#endif
{
   BLACSCONTEXT *ctxt;

   MGetConTxt(Mpval(ConTxt), ctxt);
   if ( (Mpval(prow) >= 0) && (Mpval(prow) < ctxt->cscp.Np) &&
        (Mpval(pcol) >= 0) && (Mpval(pcol) < ctxt->rscp.Np) )
      return( Mkpnum(ctxt, Mpval(prow), Mpval(pcol)) );
   else return(-1);
}