#include <arrayRedistributor.h>
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, int > | data_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, int > | data_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 |
Definition at line 61 of file arrayRedistributor.h.
redistributor2D::redistributor2D | ( | ) | [inline] |
Definition at line 366 of file arrayRedistributor.h.
References bufferedMsgs, fakeMemoryUsage, and incoming_count.
redistributor2D::redistributor2D | ( | CkMigrateMessage * | ) | [inline] |
void redistributor2D::pup | ( | PUP::er & | p | ) | [inline] |
Definition at line 101 of file arrayRedistributor.h.
References associatedArray, data_arrays, data_arrays_incoming, data_arrays_incoming_sizes, data_arrays_sizes, data_height, data_width, data_x_ghost, data_y_ghost, dataRedistributedCallback, fakeMemoryUsage, free(), incoming_count, PUP::er::isPacking(), PUP::er::isUnpacking(), PUP::PUParray(), resizeGranulesHasBeenCalled, thisElemActive, x_chares, and y_chares.
void redistributor2D::ckJustMigrated | ( | void | ) | [inline] |
Definition at line 174 of file arrayRedistributor.h.
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().
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().
Definition at line 270 of file arrayRedistributor.h.
References data_x_ghost, data_y_ghost, myheight(), mywidth(), and thisElemActive.
Referenced by data_local().
Definition at line 277 of file arrayRedistributor.h.
References data_arrays, data_arrays_sizes, and local_to_padded().
Definition at line 284 of file arrayRedistributor.h.
References left_data_idx().
Definition at line 289 of file arrayRedistributor.h.
References top_data_idx().
int redistributor2D::global_array_width | ( | ) | [inline] |
Definition at line 293 of file arrayRedistributor.h.
References data_width.
Referenced by global_array_size().
int redistributor2D::global_array_height | ( | ) | [inline] |
Definition at line 297 of file arrayRedistributor.h.
References data_height.
Referenced by global_array_size().
int redistributor2D::global_array_size | ( | ) | [inline] |
Definition at line 301 of file arrayRedistributor.h.
References global_array_height(), and global_array_width().
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().
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().
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().
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.
t* redistributor2D::getDataArray | ( | int | which = 0 |
) | [inline] |
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().
Definition at line 352 of file arrayRedistributor.h.
References thisElemActive, x_chares, and y_chares.
Referenced by resizeGranules(), and setInitialDimensions().
void redistributor2D::startup | ( | ) | [inline] |
Definition at line 378 of file arrayRedistributor.h.
void redistributor2D::printArrays | ( | ) | [inline] |
void redistributor2D::resizeGranules | ( | int | new_active_chare_cols, | |
int | new_active_chare_rows | |||
) | [inline] |
Definition at line 400 of file arrayRedistributor.h.
References bottom_data_idx(), bufferedMsgs, Converse::CkMyPe(), Converse::CkNumPes(), continueToNextStep(), redistributor2DMsg::data, data_arrays, data_arrays_sizes, data_x_ghost, data_y_ghost, h, redistributor2DMsg::height, redistributor2DMsg::left, left_data_idx(), maxi(), mini(), msg, myheight(), mywidth(), redistributor2DMsg::new_chare_cols, redistributor2DMsg::new_chare_rows, receiveTransposeData(), resizeGranulesHasBeenCalled, right_data_idx(), PUP::s, setDimensions(), size, PUP::t, thisElemActive, redistributor2DMsg::top, top_data_idx(), PUP::w, redistributor2DMsg::which_array, who_owns_idx_x(), who_owns_idx_y(), and redistributor2DMsg::width.
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().
void redistributor2D::receiveTransposeData | ( | redistributor2DMsg * | msg | ) | [inline] |
Definition at line 579 of file arrayRedistributor.h.
References bottom_data_idx(), bufferedMsgs, continueToNextStep(), redistributor2DMsg::data, data_arrays, data_arrays_incoming, data_arrays_incoming_sizes, data_arrays_sizes, data_x_ghost, data_y_ghost, redistributor2DMsg::height, incoming_count, redistributor2DMsg::left, left_data_idx(), redistributor2DMsg::new_chare_cols, redistributor2DMsg::new_chare_rows, resizeGranulesHasBeenCalled, right_data_idx(), PUP::s, redistributor2DMsg::top, top_data_idx(), PUP::w, redistributor2DMsg::which_array, and redistributor2DMsg::width.
Referenced by resizeGranules().
std::map<int,double*> redistributor2D::data_arrays |
Definition at line 64 of file arrayRedistributor.h.
Referenced by continueToNextStep(), createDataArray(), data_local(), getDataArray(), printArrays(), pup(), receiveTransposeData(), and resizeGranules().
std::map<int,int> redistributor2D::data_arrays_sizes |
Definition at line 65 of file arrayRedistributor.h.
Referenced by createDataArray(), data_local(), pup(), receiveTransposeData(), and resizeGranules().
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 70 of file arrayRedistributor.h.
Referenced by continueToNextStep(), pup(), receiveTransposeData(), and redistributor2D().
std::map<int,double*> redistributor2D::data_arrays_incoming |
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().
std::vector<redistributor2DMsg *> redistributor2D::bufferedMsgs |
Definition at line 79 of file arrayRedistributor.h.
Referenced by receiveTransposeData(), redistributor2D(), and resizeGranules().
void* redistributor2D::fakeMemoryUsage [private] |
Definition at line 84 of file arrayRedistributor.h.
Referenced by continueToNextStep(), pup(), and redistributor2D().
int redistributor2D::x_chares [private] |
Definition at line 89 of file arrayRedistributor.h.
Referenced by continueToNextStep(), left_data_idx(), left_neighbor(), pup(), right_data_idx(), right_neighbor(), and setDimensions().
int redistributor2D::y_chares [private] |
Definition at line 90 of file arrayRedistributor.h.
Referenced by bottom_data_idx(), bottom_neighbor(), continueToNextStep(), pup(), setDimensions(), top_data_idx(), and top_neighbor().
int redistributor2D::data_width [private] |
Definition at line 92 of file arrayRedistributor.h.
Referenced by global_array_width(), left_data_idx(), pup(), right_data_idx(), and setInitialDimensions().
int redistributor2D::data_height [private] |
Definition at line 93 of file arrayRedistributor.h.
Referenced by bottom_data_idx(), global_array_height(), pup(), setInitialDimensions(), and top_data_idx().
int redistributor2D::data_x_ghost [private] |
Definition at line 95 of file arrayRedistributor.h.
Referenced by local_to_padded(), my_array_width(), pup(), receiveTransposeData(), resizeGranules(), and setInitialDimensions().
int redistributor2D::data_y_ghost [private] |
Definition at line 96 of file arrayRedistributor.h.
Referenced by local_to_padded(), my_array_height(), pup(), receiveTransposeData(), resizeGranules(), and setInitialDimensions().