Implements the rectilinear partitioning algorithm with iterative refinement described in "David Nicol, Rectilinear Partitioning of Irregular Data Parallel Computations, JPDC, 1994".
More...
#include <twod/nicol_2d.hpp>
Detailed Description
template<typename T, typename Pr, bool DEBUG = false>
class twod::RectNicol< T, Pr, DEBUG >
Implements the rectilinear partitioning algorithm with iterative refinement described in "David Nicol, Rectilinear Partitioning of Irregular Data Parallel Computations, JPDC, 1994".
The number of processors in each dimension can be controlled by setP().
- Parameters:
-
| T | type of element of the array |
| Pr | type of the prefix sum array |
List of all members.
Public Member Functions |
| RectNicol () |
void | setP (int P) |
| selects the number of stripes in the first dimension
|
virtual T | part (int procCount, const Pr &prefixSumArray, util::RectList< T, Pr > &parts) |
| Implements the rectilinear partitioning algorithm with iterative refinement described in "David Nicol, Rectilinear Partitioning of Irregular Data Parallel Computations, JPDC, 1994".
|
virtual | ~RectNicol () |
Static Private Member Functions |
static T | nicol_2d_internal (int procX, int procY, const Pr &prefixSumArray, util::RectList< T, Pr > &parts) |
static T | fix_x_dimension (util::AggregMax2Dto1D< T, Pr, true > &array, int length, int procX, int *x_cuts) |
static T | fix_y_dimension (util::AggregMax2Dto1D< T, Pr, false > &array, int length, int procY, int *y_cuts) |
static void | convertToRectList (int lengthX, int lengthY, int *x_cuts, int *y_cuts, int procX, int procY, util::RectList< T, Pr > &parts) |
| TODO: that function should be in utils ?
|
Private Attributes |
int | P |
Constructor & Destructor Documentation
template<typename T , typename Pr , bool DEBUG = false>
template<typename T , typename Pr , bool DEBUG = false>
Member Function Documentation
template<typename T , typename Pr , bool DEBUG>
void twod::RectNicol< T, Pr, DEBUG >::convertToRectList |
( |
int |
lengthX, |
|
|
int |
lengthY, |
|
|
int * |
x_cuts, |
|
|
int * |
y_cuts, |
|
|
int |
procX, |
|
|
int |
procY, |
|
|
util::RectList< T, Pr > & |
parts | |
|
) |
| | [static, private] |
TODO: that function should be in utils ?
add the last rectangle
add the last rectangles
template<typename T , typename Pr , bool DEBUG>
template<typename T , typename Pr , bool DEBUG>
template<typename T , typename Pr , bool DEBUG>
template<typename T , typename Pr , bool DEBUG>
Implements the rectilinear partitioning algorithm with iterative refinement described in "David Nicol, Rectilinear Partitioning of Irregular Data Parallel Computations, JPDC, 1994".
- Parameters:
-
[in] | procCount | number of processors. |
[in] | prefixSumArray | input martix's prefix sum array. |
[out] | parts | rectangle list of partition results. |
- Returns:
- Maximum loaded processor's load.
Implements twod::PartBase< T, Pr >.
template<typename T , typename Pr , bool DEBUG = false>
selects the number of stripes in the first dimension
- Parameters:
-
| P | number of stripes in the first dimension. If 0, the number of stripes will be computed at runtime by taking the square root of the number of processors. |
Member Data Documentation
template<typename T , typename Pr , bool DEBUG = false>
The documentation for this class was generated from the following files: