PPL Logo

topo::impl::TreeBoundingBoxOn3dTorus< Iterator > Class Template Reference

Utility class to partition the bounding box of a spanning (sub)tree on a 3D mesh machine and divide that into the necessary number of branches. More...

#include <treeStrategy_3dTorus_minHops.h>


Public Member Functions

void partition (const Iterator parent, const Iterator start, const Iterator end, const int numPartitions)
 Partition the range along the longest dimension into numPartitions parts.
void translateCoordinates (const Iterator start, const Iterator end, int nDims)

Protected Member Functions

void bisect (const Iterator parent, const Iterator start, const Iterator end, const int numPartitions)
 Bisect the range along the longest dimension.
void trisect (const Iterator parent, const Iterator start, const Iterator end, const int numPartitions)
 Trisect the range along the longest dimension.
int findMaxSpreadDimension (const Iterator start, const Iterator end)
 Returns the dimension along which the bounding box of a range of vertices has the longest side.

Data Structures

class  lessThan
 Configure a lessThan functor to compare vertices. More...


Detailed Description

template<typename Iterator>
class topo::impl::TreeBoundingBoxOn3dTorus< Iterator >

Utility class to partition the bounding box of a spanning (sub)tree on a 3D mesh machine and divide that into the necessary number of branches.

Definition at line 83 of file treeStrategy_3dTorus_minHops.h.


Member Function Documentation

template<typename Iterator>
void topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::partition ( const Iterator  parent,
const Iterator  start,
const Iterator  end,
const int  numPartitions 
) [inline]

Partition the range along the longest dimension into numPartitions parts.

Find the number of vertices in the range

If further partitioning is needed and there are vertices left to partition

else, just register the remaining vertex(ices) as a sub-tree

else if there are no vertices left, do nothing

else, if there are vertices remaining but no partitions to put them in

fall through case. Should never get here unless something is wrong

Definition at line 195 of file treeStrategy_3dTorus_minHops.h.

References topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::bisect(), std::distance(), and topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::trisect().

Referenced by topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::bisect(), topo::topo::SpanningTreeStrategy_3dTorus_minHops< Iterator, SpanningTreeVertex >::buildNextGen(), topo::topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, SpanningTreeVertex >::buildNextGen(), and topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::trisect().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Iterator>
void topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::translateCoordinates ( const Iterator  start,
const Iterator  end,
int  nDims 
) [inline]

template<typename Iterator>
void topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::bisect ( const Iterator  parent,
const Iterator  start,
const Iterator  end,
const int  numPartitions 
) [inline, protected]

Bisect the range along the longest dimension.

Find the number of vertices in the range

Find the dimension along which to bisect the bounding box

Partition the two pieces as necessary

Definition at line 252 of file treeStrategy_3dTorus_minHops.h.

References advance(), topo::impl::checkSection(), Converse::CkMyPe(), std::distance(), topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::findMaxSpreadDimension(), topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::partition(), and sort().

Referenced by topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::partition().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Iterator>
void topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::trisect ( const Iterator  parent,
const Iterator  start,
const Iterator  end,
const int  numPartitions 
) [inline, protected]

Trisect the range along the longest dimension.

If the number of partitions left really can be trisected, then do it

Find the number of vertices in the range

Find the dimension along which to bisect the bounding box

Partition the three pieces further

else simply call partition to let it handle things

Definition at line 289 of file treeStrategy_3dTorus_minHops.h.

References advance(), topo::impl::checkSection(), Converse::CkMyPe(), std::distance(), topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::findMaxSpreadDimension(), topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::partition(), and sort().

Referenced by topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::partition().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Iterator>
int topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::findMaxSpreadDimension ( const Iterator  start,
const Iterator  end 
) [inline, protected]

Returns the dimension along which the bounding box of a range of vertices has the longest side.

Find the min and max coordinates along each dimension of the bounding box

Todo:
: Assert that the dimensions of the coordinate vectors of the this vertex are the same as the parent's

Identify the dimension of the maximum spread in coordinates

Definition at line 353 of file treeStrategy_3dTorus_minHops.h.

References abs(), Converse::CkMyPe(), count, max(), and min().

Referenced by topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::bisect(), and topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::trisect().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file:

Generated on Mon Sep 21 08:34:31 2020 for Charm++ by  doxygen 1.5.5