OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
BI_HypBR.c File Reference
#include "Bdef.h"

Go to the source code of this file.

Functions

Int BI_HypBR (BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, Int src)

Function Documentation

◆ BI_HypBR()

Int BI_HypBR ( BLACSCONTEXT * ctxt,
BLACBUFF * bp,
SDRVPTR send,
Int src )

Definition at line 3 of file BI_HypBR.c.

4{
6 Int relnode, bit, Np, Iam, msgid;
7
8 Np = ctxt->scp->Np;
9 Iam = ctxt->scp->Iam;
10 msgid = Mscopeid(ctxt);
11
12 for (bit=2; bit < Np; bit <<= 1);
13 if (bit^Np) return(NPOW2); /* not a power of 2 */
14 relnode = Iam ^ src;
15
16 BI_Srecv(ctxt, BANYNODE, msgid, bp);
17 for(bit=1; (bit^Np); bit <<= 1)
18 if (bit > relnode) send(ctxt, Iam^bit, msgid, bp);
19
20 return(0);
21}
void BI_Srecv(BLACSCONTEXT *ctxt, Int src, Int msgid, BLACBUFF *bp)
Definition BI_Srecv.c:3
#define Int
Definition Bconfig.h:22
struct bLaCbUfF BLACBUFF
Definition Bdef.h:53
struct bLaCsCoNtExT BLACSCONTEXT
Definition Bdef.h:22
#define Mscopeid(ctxt)
Definition Bdef.h:179
#define NPOW2
Definition Bdef.h:88
#define BANYNODE
Definition Bdef.h:76
#define bit(var, d)
Definition macros.h:46
BLACSSCOPE * scp
Definition Bdef.h:26
Int Np
Definition Bdef.h:17
Int Iam
Definition Bdef.h:17