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
std::vector< 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]

Definition at line 366 of file arrayRedistributor.h.

References bufferedMsgs, fakeMemoryUsage, and incoming_count.

redistributor2D::redistributor2D ( CkMigrateMessage  )  [inline]

Definition at line 373 of file arrayRedistributor.h.

References bufferedMsgs.


Member Function Documentation

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

void redistributor2D::ckJustMigrated ( void   )  [inline]

Definition at line 174 of file arrayRedistributor.h.

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

Definition at line 210 of file arrayRedistributor.h.

References data_height.

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

Definition at line 214 of file arrayRedistributor.h.

References data_height.

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

Definition at line 218 of file arrayRedistributor.h.

References data_width.

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

Definition at line 222 of file arrayRedistributor.h.

References data_width.

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

Definition at line 227 of file arrayRedistributor.h.

References data_height, and y_chares.

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

Definition at line 231 of file arrayRedistributor.h.

References data_height, and y_chares.

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

Definition at line 235 of file arrayRedistributor.h.

References data_width, and x_chares.

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

Definition at line 239 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 244 of file arrayRedistributor.h.

References left_data_idx(), right_data_idx(), and PUP::w.

Referenced by resizeGranules().

Here is the call graph for this function:

Here is the caller graph for this function:

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 255 of file arrayRedistributor.h.

References bottom_data_idx(), top_data_idx(), and PUP::w.

Referenced by resizeGranules().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 270 of file arrayRedistributor.h.

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

Referenced by data_local().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 277 of file arrayRedistributor.h.

References data_arrays, data_arrays_sizes, and local_to_padded().

Here is the call graph for this function:

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

Definition at line 284 of file arrayRedistributor.h.

References left_data_idx().

Here is the call graph for this function:

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

Definition at line 289 of file arrayRedistributor.h.

References top_data_idx().

Here is the call graph for this function:

int redistributor2D::global_array_width (  )  [inline]

Definition at line 293 of file arrayRedistributor.h.

References data_width.

Referenced by global_array_size().

Here is the caller graph for this function:

int redistributor2D::global_array_height (  )  [inline]

Definition at line 297 of file arrayRedistributor.h.

References data_height.

Referenced by global_array_size().

Here is the caller graph for this function:

int redistributor2D::global_array_size (  )  [inline]

Definition at line 301 of file arrayRedistributor.h.

References global_array_height(), and global_array_width().

Here is the call graph for this function:

int redistributor2D::my_array_width (  )  [inline]

Definition at line 305 of file arrayRedistributor.h.

References data_x_ghost, and mywidth().

Referenced by my_array_size().

Here is the call graph for this function:

Here is the caller graph for this function:

int redistributor2D::my_array_height (  )  [inline]

Definition at line 309 of file arrayRedistributor.h.

References data_y_ghost, and myheight().

Referenced by my_array_size().

Here is the call graph for this function:

Here is the caller graph for this function:

int redistributor2D::my_array_size (  )  [inline]

Definition at line 314 of file arrayRedistributor.h.

References my_array_height(), and my_array_width().

Referenced by createDataArray().

Here is the call graph for this function:

Here is the caller graph for this function:

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 319 of file arrayRedistributor.h.

References data, data_arrays, data_arrays_sizes, my_array_size(), and PUP::t.

Here is the call graph for this function:

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

Definition at line 335 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 341 of file arrayRedistributor.h.

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

Here is the call graph for this function:

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

Definition at line 352 of file arrayRedistributor.h.

References thisElemActive, x_chares, and y_chares.

Referenced by resizeGranules(), and setInitialDimensions().

Here is the caller graph for this function:

void redistributor2D::startup (  )  [inline]

Definition at line 378 of file arrayRedistributor.h.

void redistributor2D::printArrays (  )  [inline]

Definition at line 387 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]

Definition at line 531 of file arrayRedistributor.h.

References Converse::CkMyPe(), controlPoint(), data, data_arrays, fakeMemoryUsage, free(), incoming_count, malloc(), resizeGranulesHasBeenCalled, thisElemActive, x_chares, and y_chares.

Referenced by receiveTransposeData(), and resizeGranules().

Here is the call graph for this function:

Here is the caller graph for this function:

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


Field Documentation

std::map<int,double*> redistributor2D::data_arrays

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 Mon Sep 21 08:29:27 2020 for Charm++ by  doxygen 1.5.5