#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... |
Definition at line 83 of file treeStrategy_3dTorus_minHops.h.
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().
void topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::translateCoordinates | ( | const Iterator | start, | |
const Iterator | end, | |||
int | nDims | |||
) | [inline] |
Definition at line 430 of file treeStrategy_3dTorus_minHops.h.
References c, Converse::CkMyPe(), count, direction, endl(), PUP::m, topo::impl::modulo(), TopoManager_getDims(), and x.
Referenced by topo::topo::SpanningTreeStrategy_3dTorus_minHops< Iterator, SpanningTreeVertex >::buildNextGen(), and topo::topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, SpanningTreeVertex >::buildNextGen().
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().
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().
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
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().