Methods to measure communication cost.
More...
#include <util/comm_cost_2d.hpp>
Detailed Description
template<typename T, typename Pr>
class util::Comm_cost_2d< T, Pr >
Methods to measure communication cost.
Methods to measure communication cost which include maximum neighbor, average neighbor, maximum border length and average border length. A processor p2 is neighbor of processor p1 if and only if p1 and p2's borders are adjacent to each other.
List of all members.
Static Public Member Functions |
static double | avg_neighbor (RectList< T, Pr > &rl, int procCount) |
| Calculates average neighbor.
|
static int | max_neighbor (RectList< T, Pr > &rl) |
| Finds the maximum neighbor count over all processors in rl.
|
static int | tot_border (RectList< T, Pr > &rl, Pr &prefixSum) |
| Finds the total border length of all processors.
|
static int | max_border (RectList< T, Pr > &rl, Pr &prefixSum) |
| Finds the maximum border length over all processors.
|
Static Private Member Functions |
static bool | x_bounded (rectangle r1, rectangle r2) |
static bool | y_bounded (rectangle r1, rectangle r2) |
static bool | is_neighbor (rectangle r1, rectangle r2) |
static bool | check_neigh (rectangle r1, rectangle r2) |
Member Function Documentation
template<typename T , typename Pr >
Calculates average neighbor.
Total neighbor count divided by processor number. The number of processors procCount and number of elements in rl are independent. One rectangle can be neighbor of multiple rectangles, thus counted multiple times.
- Parameters:
-
| rl | A valid rectangle list to analyze. |
| procCount | Number of total processors. |
- Returns:
- average neighbor value of the partition.
template<typename T , typename Pr >
template<typename T , typename Pr >
template<typename T , typename Pr >
Finds the maximum border length over all processors.
The outermost borders of the partition excluded.
- Parameters:
-
| rl | A valid rectangle list to analyze. |
| prefixSum | The prefix sum array used in building rl. |
- Returns:
- maximum border length.
template<typename T , typename Pr >
Finds the maximum neighbor count over all processors in rl.
- Parameters:
-
| rl | A valid rectangle list to analyze. |
- Returns:
- Maximum neighbor count.
template<typename T , typename Pr >
Finds the total border length of all processors.
The outermost borders of the partition excluded.
- Parameters:
-
| rl | A valid rectangle list to analyze. |
| prefixSum | The prefix sum array used in building rl. |
- Returns:
- Total boerder length.
template<typename T , typename Pr >
template<typename T , typename Pr >
The documentation for this class was generated from the following files: