File: BI_HypBR.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 (21 lines) | stat: -rw-r--r-- 526 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "Bdef.h"

int BI_HypBR(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, int src)
{
   void BI_Srecv(BLACSCONTEXT *, int, int, BLACBUFF *);
   int relnode, bit, Np, Iam, msgid;

   Np = ctxt->scp->Np;
   Iam = ctxt->scp->Iam;
   msgid = Mscopeid(ctxt);

   for (bit=2; bit < Np; bit <<= 1);
   if (bit^Np) return(NPOW2);  /* not a power of 2 */
   relnode = Iam ^ src;

   BI_Srecv(ctxt, BANYNODE, msgid, bp);
   for(bit=1; (bit^Np); bit <<= 1)
      if (bit > relnode) send(ctxt, Iam^bit, msgid, bp);

   return(0);
}