an optimal PxQ-way jagged partitionning algorithm using a Dynamic Programming based algorithm. More...
#include <twod/jagged_dp_pq.hpp>
an optimal PxQ-way jagged partitionning algorithm using a Dynamic Programming based algorithm.
It is inspired from the algorithm in "Fredrik Manne and Tor Sorevik, Partitioning an Array onto a Mesh of Processors, PARA 1996". It selects the main dimension to get the best load balance. This classes implemets the algorithm as a wrapper to twod::JagPQOptHor and twod::JagPQOptVer.
T | type of the load | |
Pr | type of the prefix sum array |
Public Member Functions | |
virtual T | part (int procCount, const Pr &prefixSumArray, util::RectList< T, Pr > &parts) |
Applies a 2d partitioning algorithm to a given 2d prefixSumArray . | |
virtual | ~JagPQOptBest () |
virtual twod::JagPQOptBest< T, Pr >::~JagPQOptBest | ( | ) | [inline, virtual] |
T twod::JagPQOptBest< T, Pr >::part | ( | int | procCount, | |
const Pr & | prefixSumArray, | |||
util::RectList< T, Pr > & | parts | |||
) | [virtual] |
Applies a 2d partitioning algorithm to a given 2d prefixSumArray .
[in] | procCount | is the number of processors |
[in] | prefixSumArray | first column and first row consists of zero only. But the borders of rectangles in rect_list never touch this area (index 0 in row or column) |
[out] | parts | must be empty before calling this function. It will contain the partition after the function return |
Implements twod::PartBase< T, Pr >.