File: BI_ContxtNum.c

package info (click to toggle)
scalapack 2.2.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,724 kB
  • sloc: fortran: 339,123; ansic: 74,530; makefile: 1,494; sh: 33
file content (17 lines) | stat: -rw-r--r-- 394 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "Bdef.h"

Int BI_ContxtNum(BLACSCONTEXT *ctxt)
/*
 *  Returns the integer ID of ctxt
 */
{
   Int i;
   extern Int BI_MaxNCtxt;
   extern BLACSCONTEXT **BI_MyContxts;

   if (ctxt == NULL) return(-1);
   for (i=0; i < BI_MaxNCtxt; i++) if (BI_MyContxts[i] == ctxt) break;
   if (i == BI_MaxNCtxt)
      BI_BlacsErr(-1, -1, "BLACS INTERNAL ROUTINE", "illegal context");
   return(i);
}