|
template<typename index > |
box3d< index > | heffte::find_world (std::vector< box3d< index >> const &boxes) |
| Returns the box that encapsulates all other boxes. More...
|
|
template<typename index > |
bool | heffte::match (std::vector< box3d< index >> const &shape0, std::vector< box3d< index >> const &shape1) |
| Compares two vectors of boxes, returns true if all boxes match.
|
|
template<typename index > |
bool | heffte::world_complete (std::vector< box3d< index >> const &boxes, box3d< index > const world) |
| Returns true if the geometry of the world is as expected. More...
|
|
template<typename index > |
std::vector< box3d< index > > | heffte::split_world (box3d< index > const world, std::array< int, 3 > const proc_grid, rank_remap const &remap=rank_remap()) |
| Splits the world box into a set of boxes that will be assigned to a process in the process grid. More...
|
|
template<typename index > |
bool | heffte::is_pencils (box3d< index > const world, std::vector< box3d< index >> const &shape, int direction) |
| Returns true if the shape forms pencils in the given direction.
|
|
template<typename index > |
bool | heffte::is_slab (box3d< index > const world, std::vector< box3d< index >> const &shape, int direction1, int direction2) |
| Returns true if the shape forms slabs in the given directions.
|
|
template<typename index > |
std::vector< box3d< index > > | heffte::reorder (std::vector< box3d< index >> const &shape, std::array< int, 3 > order) |
| Returns the same shape, but sets a different order for each box.
|
|
template<typename index > |
std::vector< box3d< index > > | heffte::maximize_overlap (std::vector< box3d< index >> const &new_boxes, std::vector< box3d< index >> const &old_boxes, std::array< int, 3 > const order, rank_remap const &remap) |
| Shuffle the new boxes to maximize the overlap with the old boxes. More...
|
|
template<typename index > |
long long | heffte::count_connections (std::vector< box3d< index >> const &new_boxes, std::vector< box3d< index >> const &old_boxes) |
| Counts the number of point-to-point connections between the old and new box geometries. More...
|
|
template<typename index > |
std::vector< box3d< index > > | heffte::make_pencils (box3d< index > const world, std::array< int, 2 > const proc_grid, int const dimension, std::vector< box3d< index >> const &source, std::array< int, 3 > const order, rank_remap const &remap=rank_remap()) |
| Breaks the world into a grid of pencils and orders the pencils to the ranks that will minimize communication. More...
|
|
template<typename index > |
std::vector< box3d< index > > | heffte::make_slabs (box3d< index > const world, int num_slabs, int const dimension1, int const dimension2, std::vector< box3d< index >> const &source, std::array< int, 3 > const order, rank_remap const &remap) |
| Breaks the world into a set of slabs that span the given dimensions. More...
|
|
template<typename index > |
std::array< int, 3 > | heffte::proc_setup_min_surface (box3d< index > const world, int num_procs) |
| Creates a grid of mpi-ranks that will minimize the area of each of the boxes. More...
|
|
HeFFTe operates with indexes that are distributed in boxes across the mpi ranks. Several methods help manipulate such vectors of boxes, note that in each instance the order of the boxes in a single vector should always match.
template<typename index >
long long heffte::count_connections |
( |
std::vector< box3d< index >> const & |
new_boxes, |
|
|
std::vector< box3d< index >> const & |
old_boxes |
|
) |
| |
|
inline |
Counts the number of point-to-point connections between the old and new box geometries.
Given a grid factorization of (a, b) the split into pencils can be done as either (1, a, b) or (1, b, a), the heffte::make_pencils() method computes both factorizations and selects the one that will lead to fewer point-to-point communications. This allows the pencil rotations to be done within the rows/columns of the 2D grid as opposed to communicating between all available ranks.