PPL Logo

redistributor2D Class Reference
[Automatic Performance Tuning and Steering Framework]

A chare group that can redistribute user data arrays. It is used by binding it to a user's Chare Array. More...

#include <arrayRedistributor.h>

Inheritance diagram for redistributor2D:

Inheritance graph
[legend]
Collaboration diagram for redistributor2D:

Collaboration graph
[legend]

Public Member Functions

void pup (PUP::er &p)
void ckJustMigrated ()
int top_data_idx ()
 The index in the global array for my top row.
int bottom_data_idx ()
int left_data_idx ()
int right_data_idx ()
int top_neighbor ()
int bottom_neighbor ()
int left_neighbor ()
int right_neighbor ()
int mywidth ()
 the width of the non-ghost part of the local partition
int myheight ()
 the height (Y dimension) of the non-ghost part of the local partition
int top_data_idx (int y, int y_total)
int bottom_data_idx (int y, int y_total)
int left_data_idx (int x, int x_total)
int right_data_idx (int x, int x_total)
int top_data_idx (int y)
int bottom_data_idx (int y)
int left_data_idx (int x)
int right_data_idx (int x)
int who_owns_idx_x (int i)
 Return which chare array element(x index) owns the global data item i.
int who_owns_idx_y (int i)
 Return which chare array element(y index) owns the global data item i.
int local_to_padded (int x, int y)
double data_local (int which, int x, int y)
int local_to_global_x (int x)
int local_to_global_y (int y)
int global_array_width ()
int global_array_height ()
int global_array_size ()
int my_array_width ()
int my_array_height ()
int my_array_size ()
template<typename t>
t * createDataArray (int which=0)
 Create an array. If multiple arrays are needed, each should have its own index.
template<typename t>
t * getDataArray (int which=0)
void setInitialDimensions (int width, int height, int x_chares_, int y_chares_, int x_ghosts=0, int y_ghosts=0)
 Constructor takes in the dimensions of the array, including any desired ghost layers The local part of the arrays will have (mywidth+x_ghosts*2)*(myheight+y_ghosts*2) elements.
void setDimensions (int x_chares_, int y_chares_)
 redistributor2D ()
 redistributor2D (CkMigrateMessage *)
void startup ()
void printArrays ()
void resizeGranules (int new_active_chare_cols, int new_active_chare_rows)
void continueToNextStep ()
void receiveTransposeData (redistributor2DMsg *msg)

Data Fields

std::map< int, double * > data_arrays
std::map< int, intdata_arrays_sizes
CProxyElement_ArrayElement associatedArray
 The array associated with this data redistribution.
int incoming_count
std::map< int, double * > data_arrays_incoming
std::map< int, intdata_arrays_incoming_sizes
bool thisElemActive
 Is this array element active.
bool resizeGranulesHasBeenCalled
CkVec< redistributor2DMsg * > bufferedMsgs

Private Attributes

void * fakeMemoryUsage
CkCallback dataRedistributedCallback
int x_chares
int y_chares
int data_width
int data_height
int data_x_ghost
int data_y_ghost

Detailed Description

A chare group that can redistribute user data arrays. It is used by binding it to a user's Chare Array.

Definition at line 61 of file arrayRedistributor.h.


Constructor & Destructor Documentation

redistributor2D::redistributor2D (  )  [inline]

redistributor2D::redistributor2D ( CkMigrateMessage  )  [inline]

Definition at line 375 of file arrayRedistributor.h.

References bufferedMsgs, and CkVec< T >::size().


Member Function Documentation

void redistributor2D::pup ( PUP::er p  )  [inline]

void redistributor2D::ckJustMigrated ( void   )  [inline]

Definition at line 176 of file arrayRedistributor.h.

int redistributor2D::top_data_idx ( int  y,
int  y_total 
) [inline]

Definition at line 212 of file arrayRedistributor.h.

References data_height.

int redistributor2D::bottom_data_idx ( int  y,
int  y_total 
) [inline]

Definition at line 216 of file arrayRedistributor.h.

References data_height.

int redistributor2D::left_data_idx ( int  x,
int  x_total 
) [inline]

Definition at line 220 of file arrayRedistributor.h.

References data_width.

int redistributor2D::right_data_idx ( int  x,
int  x_total 
) [inline]

Definition at line 224 of file arrayRedistributor.h.

References data_width.

int redistributor2D::top_data_idx ( int  y  )  [inline]

Definition at line 229 of file arrayRedistributor.h.

References data_height, and y_chares.

int redistributor2D::bottom_data_idx ( int  y  )  [inline]

Definition at line 233 of file arrayRedistributor.h.

References data_height, and y_chares.

int redistributor2D::left_data_idx ( int  x  )  [inline]

Definition at line 237 of file arrayRedistributor.h.

References data_width, and x_chares.

int redistributor2D::right_data_idx ( int  x  )  [inline]

Definition at line 241 of file arrayRedistributor.h.

References data_width, and x_chares.

int redistributor2D::who_owns_idx_x ( int  i  )  [inline]

Return which chare array element(x index) owns the global data item i.

Definition at line 246 of file arrayRedistributor.h.

References left_data_idx(), and right_data_idx().

Referenced by resizeGranules().

int redistributor2D::who_owns_idx_y ( int  i  )  [inline]

Return which chare array element(y index) owns the global data item i.

Definition at line 257 of file arrayRedistributor.h.

References bottom_data_idx(), and top_data_idx().

Referenced by resizeGranules().

int redistributor2D::local_to_padded ( int  x,
int  y 
) [inline]

Definition at line 272 of file arrayRedistributor.h.

References data_x_ghost, data_y_ghost, myheight(), mywidth(), and thisElemActive.

Referenced by data_local().

double redistributor2D::data_local ( int  which,
int  x,
int  y 
) [inline]

Definition at line 279 of file arrayRedistributor.h.

References data_arrays, data_arrays_sizes, and local_to_padded().

int redistributor2D::local_to_global_x ( int  x  )  [inline]

Definition at line 286 of file arrayRedistributor.h.

References left_data_idx().

int redistributor2D::local_to_global_y ( int  y  )  [inline]

Definition at line 291 of file arrayRedistributor.h.

References top_data_idx().

int redistributor2D::global_array_width (  )  [inline]

Definition at line 295 of file arrayRedistributor.h.

References data_width.

Referenced by global_array_size().

int redistributor2D::global_array_height (  )  [inline]

Definition at line 299 of file arrayRedistributor.h.

References data_height.

Referenced by global_array_size().

int redistributor2D::global_array_size (  )  [inline]

Definition at line 303 of file arrayRedistributor.h.

References global_array_height(), and global_array_width().

int redistributor2D::my_array_width (  )  [inline]

Definition at line 307 of file arrayRedistributor.h.

References data_x_ghost, and mywidth().

Referenced by my_array_size().

int redistributor2D::my_array_height (  )  [inline]

Definition at line 311 of file arrayRedistributor.h.

References data_y_ghost, and myheight().

Referenced by my_array_size().

int redistributor2D::my_array_size (  )  [inline]

Definition at line 316 of file arrayRedistributor.h.

References my_array_height(), and my_array_width().

Referenced by createDataArray().

template<typename t>
t* redistributor2D::createDataArray ( int  which = 0  )  [inline]

Create an array. If multiple arrays are needed, each should have its own index.

Definition at line 321 of file arrayRedistributor.h.

References data, data_arrays, data_arrays_sizes, and my_array_size().

template<typename t>
t* redistributor2D::getDataArray ( int  which = 0  )  [inline]

Definition at line 337 of file arrayRedistributor.h.

References data_arrays.

void redistributor2D::setInitialDimensions ( int  width,
int  height,
int  x_chares_,
int  y_chares_,
int  x_ghosts = 0,
int  y_ghosts = 0 
) [inline]

Constructor takes in the dimensions of the array, including any desired ghost layers The local part of the arrays will have (mywidth+x_ghosts*2)*(myheight+y_ghosts*2) elements.

Definition at line 343 of file arrayRedistributor.h.

References data_height, data_width, data_x_ghost, data_y_ghost, and setDimensions().

void redistributor2D::setDimensions ( int  x_chares_,
int  y_chares_ 
) [inline]

Definition at line 354 of file arrayRedistributor.h.

References thisElemActive, x_chares, and y_chares.

Referenced by resizeGranules(), and setInitialDimensions().

void redistributor2D::startup (  )  [inline]

Definition at line 380 of file arrayRedistributor.h.

void redistributor2D::printArrays (  )  [inline]

Definition at line 389 of file arrayRedistributor.h.

References data, and data_arrays.

void redistributor2D::resizeGranules ( int  new_active_chare_cols,
int  new_active_chare_rows 
) [inline]

void redistributor2D::continueToNextStep (  )  [inline]

void redistributor2D::receiveTransposeData ( redistributor2DMsg msg  )  [inline]


Field Documentation

CProxyElement_ArrayElement redistributor2D::associatedArray

The array associated with this data redistribution.

Definition at line 68 of file arrayRedistributor.h.

Referenced by pup().

Definition at line 71 of file arrayRedistributor.h.

Referenced by pup(), and receiveTransposeData().

Definition at line 72 of file arrayRedistributor.h.

Referenced by pup(), and receiveTransposeData().

Is this array element active.

Definition at line 75 of file arrayRedistributor.h.

Referenced by continueToNextStep(), local_to_padded(), myheight(), mywidth(), pup(), resizeGranules(), and setDimensions().

Definition at line 77 of file arrayRedistributor.h.

Referenced by continueToNextStep(), pup(), receiveTransposeData(), and resizeGranules().

Definition at line 79 of file arrayRedistributor.h.

Referenced by receiveTransposeData(), redistributor2D(), and resizeGranules().

Definition at line 84 of file arrayRedistributor.h.

Referenced by continueToNextStep(), pup(), and redistributor2D().

Definition at line 87 of file arrayRedistributor.h.

Referenced by pup().


The documentation for this class was generated from the following files:

Generated on Fri May 25 08:05:05 2012 for Charm++ by  doxygen 1.5.5