Public Member Functions | Private Member Functions | Private Attributes

util::AggregMax2Dto1D< T, Pr, row > Class Template Reference

Reduces a 2D matrix with stripes into 1D dimension by returning the load of the most loaded stripe. More...

#include <util/prefix_sum_tools.hpp>


Detailed Description

template<typename T, typename Pr, bool row>
class util::AggregMax2Dto1D< T, Pr, row >

Reduces a 2D matrix with stripes into 1D dimension by returning the load of the most loaded stripe.

Reduces a 2D matrix with stripes into 1D dimension. Those stripes are created by partitioning in one dimension. Given any interval on the other dimension, returns the load of the most loaded stripe for that interval.

This provides a 1d prefix sum array using the interval notation as defined by util::PrefixSumArray1DOfTInterval.

Parameters:
row select the orientation of the summation. (e.g. If row is true and the rectangle is of size 10x20, then the equivalent 1darray is of size 10)

List of all members.

Public Member Functions

 AggregMax2Dto1D (const AggregMax2Dto1D &a)
 ~AggregMax2Dto1D ()
 AggregMax2Dto1D (const Pr &psum, int procY, int *ycuts)
T interval (int left, int right) const
 Returns the maximum partition in a given interval. (TODO: please document if this is ]i1:i2] or [i1:i2] or ]i1:i2[ or [i1:i2[).
int getLineCount ()

Private Member Functions

 AggregMax2Dto1D ()
const AggregMax2Dto1Doperator= (const AggregMax2Dto1D &a)

Private Attributes

int lineCount
 number of fixed rows or columns
Aggreg2Dto1D< T, Pr, row > ** lineSet

Constructor & Destructor Documentation

template<typename T, typename Pr, bool row>
util::AggregMax2Dto1D< T, Pr, row >::AggregMax2Dto1D (  )  [private]
template<typename T , typename Pr , bool row>
util::AggregMax2Dto1D< T, Pr, row >::AggregMax2Dto1D ( const AggregMax2Dto1D< T, Pr, row > &  a  ) 

Copy constructor for AggregMax2Dto1D

Parameters:
a 
template<typename T , typename Pr , bool row>
util::AggregMax2Dto1D< T, Pr, row >::~AggregMax2Dto1D (  ) 
template<typename T , typename Pr , bool row>
util::AggregMax2Dto1D< T, Pr, row >::AggregMax2Dto1D ( const Pr psum,
int  procY,
int *  ycuts 
)

Constructor

Parameters:
psum 2D prefix sum Matrix
procY number of processors in X or Y dimension (depending on orientation)
ycuts fixed cut points for X or Y dimension (TODO: format ?)

Member Function Documentation

template<typename T , typename Pr , bool row>
int util::AggregMax2Dto1D< T, Pr, row >::getLineCount (  ) 

AggregMax2Dto1D is built by defining a number of stripes in the first dimension. This method returns the number of stripes (chunk of rows/columns in the matrix).

Returns:
number of stripes
template<typename T , typename Pr , bool row>
T util::AggregMax2Dto1D< T, Pr, row >::interval ( int  left,
int  right 
) const

Returns the maximum partition in a given interval. (TODO: please document if this is ]i1:i2] or [i1:i2] or ]i1:i2[ or [i1:i2[).

Parameters:
left lower interval bound
right higher interval bound
Returns:
max partition weight in the given interval
template<typename T, typename Pr, bool row>
const AggregMax2Dto1D& util::AggregMax2Dto1D< T, Pr, row >::operator= ( const AggregMax2Dto1D< T, Pr, row > &  a  )  [private]

Member Data Documentation

template<typename T, typename Pr, bool row>
int util::AggregMax2Dto1D< T, Pr, row >::lineCount [private]

number of fixed rows or columns

template<typename T, typename Pr, bool row>
Aggreg2Dto1D<T,Pr,row>** util::AggregMax2Dto1D< T, Pr, row >::lineSet [private]

chunks of partitioned lines (can be row-wise or column-wise). For example: when we parition row-wise, we get line chunks like chunk[0]={l1,l2,l3} chunk[1]={l4} etc.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines