PaCO++  0.05
PC/DistributionBloc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static unsigned blockSize (unsigned glen, unsigned total)
 
static unsigned computeBlockBoundInf (unsigned glen, unsigned rank, unsigned total)
 
static unsigned computeBlockBoundInf0 (unsigned bsz, unsigned rank)
 
static void computeBlockBounds (unsigned *low, unsigned *high, unsigned glen, unsigned rank, unsigned total)
 
static void computeBlockBoundsO (unsigned long *low, unsigned long *high, unsigned glen, unsigned rank, unsigned bsz)
 
static unsigned computeBlockBoundSup (unsigned glen, unsigned rank, unsigned total)
 
static unsigned computeBlockBoundSup0 (unsigned glen, unsigned bsz, unsigned rank)
 
static unsigned localBlockLength (unsigned glen, unsigned rank, unsigned total)
 
static unsigned localBlockLengthO (unsigned glen, unsigned rank, unsigned total, unsigned bsz)
 

Function Documentation

◆ blockSize()

static unsigned blockSize ( unsigned  glen,
unsigned  total 
)
inlinestatic

Definition at line 37 of file PC/DistributionBloc.h.

Referenced by computeBlockBoundInf(), computeBlockBounds(), computeBlockBoundSup(), and localBlockLength().

37  {
38  return (glen+total-1)/total;
39  }

◆ computeBlockBoundInf()

static unsigned computeBlockBoundInf ( unsigned  glen,
unsigned  rank,
unsigned  total 
)
inlinestatic

Definition at line 78 of file PC/DistributionBloc.h.

References blockSize(), and computeBlockBoundInf0().

78  {
79  return computeBlockBoundInf0(rank,blockSize(glen, total));
80  }
static unsigned blockSize(unsigned glen, unsigned total)
static unsigned computeBlockBoundInf0(unsigned bsz, unsigned rank)
Here is the call graph for this function:

◆ computeBlockBoundInf0()

static unsigned computeBlockBoundInf0 ( unsigned  bsz,
unsigned  rank 
)
inlinestatic

Definition at line 74 of file PC/DistributionBloc.h.

Referenced by computeBlockBoundInf(), and doSchedule().

74  {
75  return rank * bsz;
76  }

◆ computeBlockBounds()

static void computeBlockBounds ( unsigned *  low,
unsigned *  high,
unsigned  glen,
unsigned  rank,
unsigned  total 
)
inlinestatic

Definition at line 64 of file PC/DistributionBloc.h.

References blockSize().

65  {
66 
67  unsigned bsz = blockSize(glen, total);
68  unsigned tmp = (rank+1) * bsz;
69 
70  *low = rank * bsz;
71  *high = ((glen <= tmp)?glen:tmp); // min
72  }
static unsigned blockSize(unsigned glen, unsigned total)
Here is the call graph for this function:

◆ computeBlockBoundsO()

static void computeBlockBoundsO ( unsigned long *  low,
unsigned long *  high,
unsigned  glen,
unsigned  rank,
unsigned  bsz 
)
inlinestatic

Definition at line 58 of file PC/DistributionBloc.h.

59  {
60  unsigned long tmp = (rank+1) * bsz;
61  *low = rank * bsz;
62  *high = ((glen <= tmp)?glen:tmp); // min
63  }

◆ computeBlockBoundSup()

static unsigned computeBlockBoundSup ( unsigned  glen,
unsigned  rank,
unsigned  total 
)
inlinestatic

Definition at line 88 of file PC/DistributionBloc.h.

References blockSize(), and computeBlockBoundSup0().

88  {
89  unsigned bsz = blockSize(glen, total);
90  return computeBlockBoundSup0(glen, bsz, rank);
91  }
static unsigned computeBlockBoundSup0(unsigned glen, unsigned bsz, unsigned rank)
static unsigned blockSize(unsigned glen, unsigned total)
Here is the call graph for this function:

◆ computeBlockBoundSup0()

static unsigned computeBlockBoundSup0 ( unsigned  glen,
unsigned  bsz,
unsigned  rank 
)
inlinestatic

Definition at line 82 of file PC/DistributionBloc.h.

Referenced by computeBlockBoundSup().

82  {
83  unsigned tmp = (rank+1) * bsz;
84  return ((glen <= tmp)?glen:tmp); // min
85 
86  }

◆ localBlockLength()

static unsigned localBlockLength ( unsigned  glen,
unsigned  rank,
unsigned  total 
)
inlinestatic

Definition at line 49 of file PC/DistributionBloc.h.

References blockSize().

49  {
50  if (rank == total - 1) {
51  return glen - rank * blockSize(glen, total);
52  } else {
53  return blockSize(glen, total);
54  }
55  }
static unsigned blockSize(unsigned glen, unsigned total)
Here is the call graph for this function:

◆ localBlockLengthO()

static unsigned localBlockLengthO ( unsigned  glen,
unsigned  rank,
unsigned  total,
unsigned  bsz 
)
inlinestatic

Definition at line 42 of file PC/DistributionBloc.h.

Referenced by computeReceiveDataBlock1DServer(), computeSendDataBlock1DClient(), and doSchedule().

42  {
43  if (rank == total - 1) {
44  return glen - rank * bsz;
45  } else {
46  return bsz;
47  }
48  }