PaCO++
0.05
|
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) |
static unsigned blockSize | ( | unsigned | glen, |
unsigned | total | ||
) | [inline, static] |
Definition at line 37 of file PC/DistributionBloc.h.
Referenced by computeBlockBoundInf(), computeBlockBounds(), computeBlockBoundSup(), and localBlockLength().
{
return (glen+total-1)/total;
}
static unsigned computeBlockBoundInf | ( | unsigned | glen, |
unsigned | rank, | ||
unsigned | total | ||
) | [inline, static] |
Definition at line 78 of file PC/DistributionBloc.h.
References blockSize(), and computeBlockBoundInf0().
{ return computeBlockBoundInf0(rank,blockSize(glen, total)); }
static unsigned computeBlockBoundInf0 | ( | unsigned | bsz, |
unsigned | rank | ||
) | [inline, static] |
Definition at line 74 of file PC/DistributionBloc.h.
Referenced by computeBlockBoundInf().
{
return rank * bsz;
}
static void computeBlockBounds | ( | unsigned * | low, |
unsigned * | high, | ||
unsigned | glen, | ||
unsigned | rank, | ||
unsigned | total | ||
) | [inline, static] |
Definition at line 64 of file PC/DistributionBloc.h.
References blockSize().
{ unsigned bsz = blockSize(glen, total); unsigned tmp = (rank+1) * bsz; *low = rank * bsz; *high = ((glen <= tmp)?glen:tmp); // min }
static void computeBlockBoundsO | ( | unsigned long * | low, |
unsigned long * | high, | ||
unsigned | glen, | ||
unsigned | rank, | ||
unsigned | bsz | ||
) | [inline, static] |
Definition at line 58 of file PC/DistributionBloc.h.
{ unsigned long tmp = (rank+1) * bsz; *low = rank * bsz; *high = ((glen <= tmp)?glen:tmp); // min }
static unsigned computeBlockBoundSup | ( | unsigned | glen, |
unsigned | rank, | ||
unsigned | total | ||
) | [inline, static] |
Definition at line 88 of file PC/DistributionBloc.h.
References blockSize(), and computeBlockBoundSup0().
{ unsigned bsz = blockSize(glen, total); return computeBlockBoundSup0(glen, bsz, rank); }
static unsigned computeBlockBoundSup0 | ( | unsigned | glen, |
unsigned | bsz, | ||
unsigned | rank | ||
) | [inline, static] |
Definition at line 82 of file PC/DistributionBloc.h.
Referenced by computeBlockBoundSup().
{ unsigned tmp = (rank+1) * bsz; return ((glen <= tmp)?glen:tmp); // min }
static unsigned localBlockLength | ( | unsigned | glen, |
unsigned | rank, | ||
unsigned | total | ||
) | [inline, static] |
Definition at line 49 of file PC/DistributionBloc.h.
References blockSize().
{ if (rank == total - 1) { return glen - rank * blockSize(glen, total); } else { return blockSize(glen, total); } }
static unsigned localBlockLengthO | ( | unsigned | glen, |
unsigned | rank, | ||
unsigned | total, | ||
unsigned | bsz | ||
) | [inline, static] |
Definition at line 42 of file PC/DistributionBloc.h.
Referenced by computeReceiveDataBlock1DServer(), and computeSendDataBlock1DClient().
{ if (rank == total - 1) { return glen - rank * bsz; } else { return bsz; } }