|
ESyS-Particle
2.3.4
|
class for a cartesian communicator More...
#include <cart_comm.h>


Public Member Functions | |
| TML_CartComm (TML_Comm *comm, vector< unsigned int > dims, vector< bool > circular) | |
| TML_CartComm (TML_Comm *comm, unsigned int ndims, const vector< int > &dims, const vector< bool > &circular) | |
| TML_CartComm (TML_Comm *, unsigned int, int *, int *) | |
| vector< int > | get_coords (int) |
| get coords of a process More... | |
| vector< int > | get_coords () const |
| get own coords More... | |
| vector< int > | get_all_dims () const |
| get size of communicator in all directions More... | |
| int | get_dim (int) |
| get size of communicator in one direction More... | |
| int | get_ndim () const |
| template<typename T , typename P > | |
| void | shift (T, P &, int, int, int=0) |
| shift ops More... | |
| template<typename T , typename P > | |
| void | shift_array (T *, int, P *, int, int, int, int=0) |
| template<typename T , typename P > | |
| void | shift_cont (T, P &, int, int, int=0) |
| template<typename T , typename P > | |
| void | shift_packed (T, P &, int, int, int=0) |
| packed shift ops More... | |
| template<typename T , typename P > | |
| void | shift_array_packed (T *, int, P *, int, int, int, int=0) |
| template<typename T , typename P > | |
| void | shift_cont_packed (T, P &, int, int, int=0) |
Public Member Functions inherited from TML_Comm | |
| bool | isNull () const |
| int | rank () const |
| int | size () |
| MPI_Comm | comm () const |
| TML_Comm & | operator= (const TML_Comm &) |
| void | setComm (MPI_Comm) |
| TML_Comm () | |
| TML_Comm (MPI_Comm) | |
| TML_Comm | include (const vector< int > &) |
| TML_Comm | exclude (const vector< int > &) |
| template<typename T > | |
| void | send (T, int, int=0) |
| template<typename T > | |
| void | receive (T &, int, int=MPI_ANY_TAG) |
| template<typename T > | |
| void | send_array (T *, int, int, int=0) |
| template<typename T > | |
| void | receive_array (T *, int, int, int=MPI_ANY_TAG) |
| template<typename T > | |
| void | send_cont (const T &, int, int=0) |
| template<typename T > | |
| void | receive_cont (T &, int, int=MPI_ANY_TAG) |
| template<typename T > | |
| void | send_cont_packed (T, int, bool, int=0) |
| template<typename T > | |
| void | receive_cont_packed (T &, int, bool, int=MPI_ANY_TAG) |
| template<typename T , typename P > | |
| void | sendrecv (T, P &, int, int, int=0) |
| template<typename T , typename P > | |
| void | sendrecv_array (T *, int, P *, int, int, int, int=0) |
| template<typename T , typename P > | |
| void | sendrecv_cont (T, P &, int, int, int=0) |
| template<typename T > | |
| void | sendrecv_cont_replace (T &, int, int, int=0) |
| template<typename T , typename P > | |
| void | sendrecv_cont_packed (T, P &, int, int, bool, int=0) |
| template<typename T > | |
| void | sendrecv_cont_packed_replace (T &, int, int, bool, int=0) |
| template<typename T > | |
| void | broadcast (T) |
| template<typename T > | |
| void | broadcast_array (T *, int) |
| template<typename T > | |
| void | broadcast_cont (const T &) |
| template<typename T > | |
| void | broadcast_cont_packed (const T &) |
| template<typename T > | |
| void | recv_broadcast (T &, int) |
| template<typename T > | |
| void | recv_broadcast_array (T *, int, int) |
| template<typename T > | |
| void | recv_broadcast_cont (T &, int) |
| template<typename T > | |
| void | recv_broadcast_cont_packed (T &, int) |
| template<typename T > | |
| void | scatter (const multimap< int, T >) |
| template<typename T > | |
| void | recv_scatter (T &, int) |
| template<typename T > | |
| void | gather (multimap< int, T > &) |
| template<typename T > | |
| void | send_gather (T &, int) |
| template<typename T > | |
| void | gather_debug (multimap< int, T > &) |
| template<typename T > | |
| void | send_gather_debug (T &, int) |
| template<typename T > | |
| void | scatter_packed (const multimap< int, T >) |
| template<typename T > | |
| void | recv_scatter_packed (T &, int) |
| template<typename T > | |
| void | gather_packed (multimap< int, T > &) |
| template<typename T > | |
| void | send_gather_packed (const T &, int) |
| template<typename T > | |
| T | sum_all (const T &) |
| void | barrier () |
| void | barrier (const string &) |
Private Attributes | |
| int | m_ndims |
| vector< int > | m_dims |
Additional Inherited Members | |
Protected Attributes inherited from TML_Comm | |
| MPI_Status | m_status |
| MPI_Comm | m_comm |
class for a cartesian communicator
| TML_CartComm::TML_CartComm | ( | TML_Comm * | old_comm, |
| vector< unsigned int > | dims, | ||
| vector< bool > | circular | ||
| ) |
Constructor, using an STL vector for boundary conditions and optionally prescribing dimensions. Dimensions are choosen according to the size of the communicator via MPI_Create_dims.
| old_comm | the old communicator |
| dims | the dimensions |
| circular | circular boundaries |
References TML_Comm::comm(), console, Console::Debug(), TML_Comm::m_comm, m_dims, m_ndims, and TML_Comm::size().

| TML_CartComm::TML_CartComm | ( | TML_Comm * | old_comm, |
| unsigned int | ndims, | ||
| const vector< int > & | dims, | ||
| const vector< bool > & | circular | ||
| ) |
Constructor, using STL vectors for dimensions and boundary conditions
| old_comm | the old communicator |
| ndims | the number of dimensions |
| dims | the dimensions |
| circular | circular boundaries |
References TML_Comm::comm(), esys::lsm::bpu::iter(), TML_Comm::m_comm, m_dims, m_ndims, and TML_Comm::size().

| TML_CartComm::TML_CartComm | ( | TML_Comm * | old_comm, |
| unsigned int | ndims, | ||
| int * | dims, | ||
| int * | circular | ||
| ) |
Constructor, using C arrays for dimensions and boundary conditions
| old_comm | the old communicator |
| ndims | the number of dimensions |
| dims | the dimensions |
| circular | circular boundaries |
References TML_Comm::comm(), TML_Comm::m_comm, m_dims, m_ndims, and TML_Comm::size().

| vector< int > TML_CartComm::get_all_dims | ( | ) | const |
| vector< int > TML_CartComm::get_coords | ( | ) | const |
get own coords
Get cartesian coordinates of local process
References TML_Comm::m_comm, m_ndims, and TML_Comm::rank().

| vector< int > TML_CartComm::get_coords | ( | int | rank | ) |
get coords of a process
Get cartesian coordinates of a given process in the communicator
| rank | the rank of the process |
References TML_Comm::m_comm, m_ndims, and TML_Comm::rank().
Referenced by test_get_coords().


| int TML_CartComm::get_dim | ( | int | i | ) |
|
inline |
References m_ndims.
| void TML_CartComm::shift | ( | T | send_data, |
| P & | recv_data, | ||
| int | dir, | ||
| int | dist, | ||
| int | tag = 0 |
||
| ) |
shift ops
Shift a single value along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
| send_data | data to be sent |
| recv | data data to be received |
| dir | direction |
| dist | the shift distance along dir |
| tag | the message tag |
References TML_Comm::m_comm, m_ndims, and TML_Comm::sendrecv().

| void TML_CartComm::shift_array | ( | T * | send_data, |
| int | send_count, | ||
| P * | recv_data, | ||
| int | recv_count, | ||
| int | dir, | ||
| int | dist, | ||
| int | tag = 0 |
||
| ) |
Shift C-arrays of known size value along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
| send_data | data to be sent |
| size | of arry to be sent |
| recv | data data to be received |
| size | of arry to be received |
| dir | direction |
| dist | the shift distance along dir |
| tag | the message tag |
References TML_Comm::m_comm, m_ndims, and TML_Comm::sendrecv().

| void TML_CartComm::shift_array_packed | ( | T * | send_data, |
| int | send_count, | ||
| P * | recv_data, | ||
| int | recv_count, | ||
| int | dir, | ||
| int | dist, | ||
| int | tag = 0 |
||
| ) |
Shift C-arrays of packable objects of known size value along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
| send_data | data to be sent |
| size | of arry to be sent |
| recv | data data to be received |
| size | of arry to be received |
| dir | direction |
| dist | the shift distance along dir |
| tag | the message tag |
References TML_Comm::m_comm, and m_ndims.
| void TML_CartComm::shift_cont | ( | T | send_data, |
| P & | recv_data, | ||
| int | dir, | ||
| int | dist, | ||
| int | tag = 0 |
||
| ) |
Shift STL containers along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
| send_data | data to be sent |
| recv | data data to be received |
| dir | direction |
| dist | the shift distance along dir |
| tag | the message tag |
References TML_Comm::m_comm, m_ndims, and TML_Comm::sendrecv_cont().
Referenced by main(), and test_shift().


| void TML_CartComm::shift_cont_packed | ( | T | send_data, |
| P & | recv_data, | ||
| int | dir, | ||
| int | dist, | ||
| int | tag = 0 |
||
| ) |
Shift STL containers of packable objects along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
| send_data | data to be sent |
| recv | data data to be received |
| dir | direction |
| dist | the shift distance along dir |
| tag | the message tag |
References TML_Comm::m_comm, m_ndims, and TML_Comm::sendrecv_cont_packed().

| void TML_CartComm::shift_packed | ( | T | send_data, |
| P & | recv_data, | ||
| int | dir, | ||
| int | dist, | ||
| int | tag = 0 |
||
| ) |
packed shift ops
Shift a single packable object along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
| send_data | data to be sent |
| recv | data data to be received |
| dir | direction |
| dist | the shift distance along dir |
| tag | the message tag |
References TML_Comm::m_comm, and m_ndims.
|
private |
Referenced by get_all_dims(), get_dim(), and TML_CartComm().
|
private |
Referenced by get_all_dims(), get_coords(), get_dim(), get_ndim(), shift(), shift_array(), shift_array_packed(), shift_cont(), shift_cont_packed(), shift_packed(), and TML_CartComm().