ScaLAPACK 2.1  2.1
ScaLAPACK: Scalable Linear Algebra PACKage
BI_HypBS.c
Go to the documentation of this file.
1 #include "Bdef.h"
2 int BI_HypBS(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send)
3 {
4  int bit, Np, Iam, msgid;
5 
6  Np = ctxt->scp->Np;
7  if (Np < 2) return(NORV);
8  Iam = ctxt->scp->Iam;
9  msgid = Mscopeid(ctxt);
10 
11  for (bit=2; bit < Np; bit <<= 1);
12  if (bit^Np) return(NPOW2); /* not a power of 2 */
13 
14  for(bit=1; (bit^Np); bit <<= 1)
15  send(ctxt, (Iam^bit), msgid, bp);
16 
17  return(0); /* error-free return */
18 }
bLaCbUfF
Definition: Bdef.h:54
bLaCsScOpE::Iam
int Iam
Definition: Bdef.h:17
BI_HypBS
int BI_HypBS(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send)
Definition: BI_HypBS.c:2
Mscopeid
#define Mscopeid(ctxt)
Definition: Bdef.h:179
bLaCsCoNtExT
Definition: Bdef.h:23
SDRVPTR
void(* SDRVPTR)(BLACSCONTEXT *, int, int, BLACBUFF *)
Definition: Bdef.h:69
bLaCsCoNtExT::scp
BLACSSCOPE * scp
Definition: Bdef.h:26
Bdef.h
bLaCsScOpE::Np
int Np
Definition: Bdef.h:17
NORV
#define NORV
Definition: Bdef.h:87
NPOW2
#define NPOW2
Definition: Bdef.h:88