OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
BinaryBalancer.hpp File Reference
Include dependency graph for BinaryBalancer.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<unsigned Dim>
static int FindCutAxis (const NDIndex< Dim > &domain, const FieldLayout< Dim > &layout)
 
template<class RandomIterator , class T >
static RandomIterator FindMedian (int nprocs, RandomIterator begin, RandomIterator end, T)
 
static double PerpReduce (BrickIterator< double, 3 > &data, int i, int cutAxis)
 
static double PerpReduce (BrickIterator< double, 2 > &data, int i, int cutAxis)
 
static double PerpReduce (BrickIterator< double, 1 > &data, int i, int)
 
template<unsigned Dim>
static void LocalReduce (double *reduced, int cutAxis, BrickIterator< double, Dim > data)
 
template<class IndexIterator , unsigned Dim>
static void SendReduce (IndexIterator domainsBegin, IndexIterator domainsEnd, BareField< double, Dim > &weights, int tag)
 
template<unsigned Dim>
static void ReceiveReduce (NDIndex< Dim > &domain, BareField< double, Dim > &weights, int reduce_tag, int nprocs, int &cutLoc, int &cutAxis)
 
void BcastCuts (int cutLoc, int cutAxis, int bcast_tag)
 
template<unsigned Dim>
static void ReceiveCuts (std::vector< NDIndex< Dim > > &domains, std::vector< int > &nprocs, int bcast_tag)
 
template<unsigned Dim>
static void CutEach (std::vector< NDIndex< Dim > > &domains, std::vector< int > &nprocs, BareField< double, Dim > &weights)
 
template<unsigned Dim>
NDIndex< DimCalcBinaryRepartition (FieldLayout< Dim > &layout, BareField< double, Dim > &weights)
 

Function Documentation

◆ BcastCuts()

void BcastCuts ( int  cutLoc,
int  cutAxis,
int  bcast_tag 
)
inline

Definition at line 454 of file BinaryBalancer.hpp.

References Communicate::broadcast_all(), IpplInfo::Comm, and Message::put().

Referenced by CutEach().

Here is the call graph for this function:

◆ CalcBinaryRepartition()

template<unsigned Dim>
NDIndex< Dim > CalcBinaryRepartition ( FieldLayout< Dim > &  layout,
BareField< double, Dim > &  weights 
)

Definition at line 586 of file BinaryBalancer.hpp.

References IpplInfo::Comm, CutEach(), Dim, FieldLayout< Dim >::getDomain(), Communicate::getNodes(), and Communicate::myNode().

Referenced by BinaryRepartition().

Here is the call graph for this function:

◆ CutEach()

template<unsigned Dim>
static void CutEach ( std::vector< NDIndex< Dim > > &  domains,
std::vector< int > &  nprocs,
BareField< double, Dim > &  weights 
)
static

Definition at line 551 of file BinaryBalancer.hpp.

References BcastCuts(), IpplInfo::Comm, F_REDUCE_PERP_TAG, F_TAG_CYCLE, Communicate::myNode(), TagMaker::next_tag(), ReceiveCuts(), ReceiveReduce(), and SendReduce().

Referenced by CalcBinaryRepartition().

Here is the call graph for this function:

◆ FindCutAxis()

template<unsigned Dim>
static int FindCutAxis ( const NDIndex< Dim > &  domain,
const FieldLayout< Dim > &  layout 
)
static

Definition at line 82 of file BinaryBalancer.hpp.

References Dim, FieldLayout< Dim >::getDistribution(), FieldLayout< Dim >::getRequestedDistribution(), and SERIAL.

Referenced by ReceiveReduce(), and SendReduce().

Here is the call graph for this function:

◆ FindMedian()

template<class RandomIterator , class T >
static RandomIterator FindMedian ( int  nprocs,
RandomIterator  begin,
RandomIterator  end,
 
)
static

Definition at line 125 of file BinaryBalancer.hpp.

References begin(), end(), and Attrib::Legacy::Distribution::T.

Referenced by ReceiveReduce().

Here is the call graph for this function:

◆ LocalReduce()

template<unsigned Dim>
static void LocalReduce ( double *  reduced,
int  cutAxis,
BrickIterator< double, Dim data 
)
static

Definition at line 263 of file BinaryBalancer.hpp.

References PerpReduce(), and BrickCounter< Dim >::size().

Referenced by SendReduce().

Here is the call graph for this function:

◆ PerpReduce() [1/3]

static double PerpReduce ( BrickIterator< double, 1 > &  data,
int  i,
int   
)
inlinestatic

Definition at line 251 of file BinaryBalancer.hpp.

References BrickIterator< T, Dim >::offset().

Here is the call graph for this function:

◆ PerpReduce() [2/3]

static double PerpReduce ( BrickIterator< double, 2 > &  data,
int  i,
int  cutAxis 
)
inlinestatic

Definition at line 226 of file BinaryBalancer.hpp.

References BrickIterator< T, Dim >::offset(), and BrickCounter< Dim >::size().

Here is the call graph for this function:

◆ PerpReduce() [3/3]

static double PerpReduce ( BrickIterator< double, 3 > &  data,
int  i,
int  cutAxis 
)
inlinestatic

Definition at line 188 of file BinaryBalancer.hpp.

References BrickIterator< T, Dim >::offset(), and BrickCounter< Dim >::size().

Referenced by LocalReduce().

Here is the call graph for this function:

◆ ReceiveCuts()

template<unsigned Dim>
static void ReceiveCuts ( std::vector< NDIndex< Dim > > &  domains,
std::vector< int > &  nprocs,
int  bcast_tag 
)
static

Definition at line 476 of file BinaryBalancer.hpp.

References IpplInfo::Comm, COMM_ANY_NODE, Message::get(), PAssert, PAssert_EQ, and Communicate::receive_block().

Referenced by CutEach().

Here is the call graph for this function:

◆ ReceiveReduce()

template<unsigned Dim>
static void ReceiveReduce ( NDIndex< Dim > &  domain,
BareField< double, Dim > &  weights,
int  reduce_tag,
int  nprocs,
int &  cutLoc,
int &  cutAxis 
)
static

◆ SendReduce()

template<class IndexIterator , unsigned Dim>
static void SendReduce ( IndexIterator  domainsBegin,
IndexIterator  domainsEnd,
BareField< double, Dim > &  weights,
int  tag 
)
static