SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
blacs_info_.c
Go to the documentation of this file.
1#include "Bdef.h"
2
3#if (INTFACE == C_CALL)
4void Cblacs_gridinfo(Int ConTxt, Int *nprow, Int *npcol, Int *myrow, Int *mycol)
5#else
6F_VOID_FUNC blacs_gridinfo_(Int *ConTxt, Int *nprow, Int *npcol,
7 Int *myrow, Int *mycol)
8#endif
9{
11 extern Int BI_MaxNCtxt;
12 BLACSCONTEXT *ctxt;
13/*
14 * Make sure context handle is in range
15 */
16 if ( (Mpval(ConTxt) >= 0) && (Mpval(ConTxt) < BI_MaxNCtxt) )
17 {
18/*
19 * Make sure context is still defined
20 */
21 ctxt = BI_MyContxts[Mpval(ConTxt)];
22 if (ctxt != NULL)
23 {
24 *nprow = ctxt->cscp.Np;
25 *npcol = ctxt->rscp.Np;
26 *myrow = ctxt->cscp.Iam;
27 *mycol = ctxt->rscp.Iam;
28 }
29 else *nprow = *npcol = *myrow = *mycol = -1;
30 }
31 else *nprow = *npcol = *myrow = *mycol = -1;
32}
BLACSCONTEXT ** BI_MyContxts
Int BI_MaxNCtxt
#define Int
Definition Bconfig.h:22
#define F_VOID_FUNC
Definition Bdef.h:232
#define Mpval(para)
Definition Bdef.h:261
void Cblacs_gridinfo()
F_VOID_FUNC blacs_gridinfo_(Int *ConTxt, Int *nprow, Int *npcol, Int *myrow, Int *mycol)
Definition blacs_info_.c:6
BLACSSCOPE rscp
Definition Bdef.h:25
BLACSSCOPE cscp
Definition Bdef.h:25
Int Np
Definition Bdef.h:17
Int Iam
Definition Bdef.h:17