|
ParGeMSLR
|
The data structure for parallel matvec helper, store communication inforamtion for parallel matvec, and working buffers. More...
#include <parallel_csr_matrix.hpp>
Public Member Functions | |
| CommunicationHelperClass () | |
| The constructor of CommunicationHelperClass. More... | |
| CommunicationHelperClass (const CommunicationHelperClass &comm_helper) | |
| The copy constructor of CommunicationHelperClass. More... | |
| CommunicationHelperClass (CommunicationHelperClass &&comm_helper) | |
| The move constructor of CommunicationHelperClass. More... | |
| CommunicationHelperClass & | operator= (const CommunicationHelperClass &comm_helper) |
| The = operator of CommunicationHelperClass. More... | |
| CommunicationHelperClass & | operator= (CommunicationHelperClass &&comm_helper) |
| The = operator of CommunicationHelperClass. More... | |
| ~CommunicationHelperClass () | |
| The destructor of CommunicationHelperClass. More... | |
| int | Clear () |
| Free the current matvec helper, set everything to 0. More... | |
| int | CreateHostBuffer (int unitsize) |
| Create buffer. More... | |
| int | MoveData (int location) |
| Move the index data to other location in the memory. More... | |
| int | MoveSendData (int location) |
| Move the send data to other location in the memory. More... | |
| int | MoveRecvData (int location) |
| Move the recv data to other location in the memory. More... | |
| template<typename T > | |
| int | DataTransfer (const VectorVirtualClass< T > &vec_in, VectorVirtualClass< T > &vec_out, int loc_in, int loc_out) |
| Apply communication using the buffer inside this comm helper. More... | |
| template<typename T > | |
| int | DataTransferStart (const VectorVirtualClass< T > &vec_in, int loc_in) |
| Start communication using the buffer inside this comm helper. More... | |
| template<typename T > | |
| int | DataTransferOver (VectorVirtualClass< T > &vec_out, int loc_out) |
| Finish communication using the buffer inside this comm helper. More... | |
| template<typename T , class VectorType > | |
| int | DataTransfer (const std::vector< VectorType > &vec_in, std::vector< VectorType > &vec_out, int loc_in, int loc_out) |
| Apply communication using the buffer inside this comm helper. More... | |
| template<typename T , class VectorType > | |
| int | DataTransferStart (const std::vector< VectorType > &vec_in, int loc_in) |
| Start communication using the buffer inside this comm helper. More... | |
| template<typename T , class VectorType > | |
| int | DataTransferOver (std::vector< VectorType > &vec_out, int loc_out) |
| Finish communication using the buffer inside this comm helper. More... | |
| template<typename T > | |
| int | DataTransferReverse (const VectorVirtualClass< T > &vec_in, VectorVirtualClass< T > &vec_out, int loc_in, int loc_out) |
| Apply communication using the buffer inside this comm helper in the opposite direction. More... | |
| template<typename T > | |
| int | DataTransferStartReverse (const VectorVirtualClass< T > &vec_in, int loc_in) |
| Start communication using the buffer inside this comm helper in the opposite direction. More... | |
| template<typename T > | |
| int | DataTransferOverReverse (VectorVirtualClass< T > &vec_out, int loc_out) |
| Finish communication using the buffer inside this comm helper in the opposite direction. More... | |
Public Attributes | |
| int | _n_in |
| The size of the input vector. More... | |
| int | _n_out |
| The size of the output vector. More... | |
| vector_int | _send_to_v |
| The vector stores the MPI ranks that myid needs to send local vector to. More... | |
| vector_int | _recv_from_v |
| The vector stores the MPI ranks that myid needs to recv external vector from. More... | |
| std::vector< vector_int > | _send_idx_v2 |
| 2D vector, send_idx_v2[i] is the index in local vector that need to be sent to proc. i. More... | |
| std::vector< vector_int > | _recv_idx_v2 |
| 2D vector, recv_idx_v2[i] is the index in external vector that need to be received from proc. i. More... | |
| std::vector< vector_int > | _idx_helper_v2 |
| Helper array for building the comm helper. More... | |
| vector< MPI_Request > | _requests_v |
| Vector of MPI_Request for communication. More... | |
| bool | _is_ready |
| Is true when the comm_helper ready to use. More... | |
| bool | _is_waiting |
| Is true when there is communication on going. More... | |
| bool | _is_nbhd_built |
| If the neiborhood information (send_to and recv_from) is set in advance. More... | |
The data structure for parallel matvec helper, store communication inforamtion for parallel matvec, and working buffers.
| pargemslr::CommunicationHelperClass::CommunicationHelperClass | ( | ) |
The constructor of CommunicationHelperClass.
| pargemslr::CommunicationHelperClass::CommunicationHelperClass | ( | const CommunicationHelperClass & | comm_helper | ) |
The copy constructor of CommunicationHelperClass.
| [in] | comm_helper | The target CommunicationHelperClass. |
| pargemslr::CommunicationHelperClass::CommunicationHelperClass | ( | CommunicationHelperClass && | comm_helper | ) |
The move constructor of CommunicationHelperClass.
| [in] | comm_helper | The target CommunicationHelperClass. |
| pargemslr::CommunicationHelperClass::~CommunicationHelperClass | ( | ) |
The destructor of CommunicationHelperClass, just a call to the free function.
| int pargemslr::CommunicationHelperClass::Clear | ( | ) |
Free the current matvec helper, set everything to 0.
| int pargemslr::CommunicationHelperClass::CreateHostBuffer | ( | int | unitsize | ) |
Create buffer.
| [in] | unitsize | The unit size in byte. |
| int pargemslr::CommunicationHelperClass::DataTransfer | ( | const std::vector< VectorType > & | vec_in, |
| std::vector< VectorType > & | vec_out, | ||
| int | loc_in, | ||
| int | loc_out | ||
| ) |
Apply communication using the buffer inside this comm helper.
| [in] | vec_in | The 2D vector we send information from. |
| [out] | vec_out | The 2D vector we recv information to. Space should be reserved before calling this function. |
| [in] | loc_in | The data location of the input data. For 2D array, this is the second dimension. The fist dimention std::vector is always on the host. |
| [in] | loc_out | The data location of the output data. For 2D array, this is the second dimension. The fist dimention std::vector is always on the host. |
| int pargemslr::CommunicationHelperClass::DataTransfer | ( | const VectorVirtualClass< T > & | vec_in, |
| VectorVirtualClass< T > & | vec_out, | ||
| int | loc_in, | ||
| int | loc_out | ||
| ) |
Apply communication using the buffer inside this comm helper.
| [in] | vec_in | The vector we send information from. |
| [out] | vec_out | The vector we recv information to. Space should be reserved before calling this function. |
| [in] | loc_in | The data location of the input data. |
| [in] | loc_out | The data location of the output data. |
| int pargemslr::CommunicationHelperClass::DataTransferOver | ( | std::vector< VectorType > & | vec_out, |
| int | loc_out | ||
| ) |
Finish communication using the buffer inside this comm helper.
| [out] | vec_out | The 2D vector we recv information to. Space should be reserved before calling this function. |
| [in] | loc_out | The data location of the output data. For 2D array, this is the second dimension. The fist dimention std::vector is always on the host. |
| int pargemslr::CommunicationHelperClass::DataTransferOver | ( | VectorVirtualClass< T > & | vec_out, |
| int | loc_out | ||
| ) |
Finish communication using the buffer inside this comm helper.
| [out] | vec_out | The vector we recv information to. Space should be reserved before calling this function. |
| [in] | loc_out | The data location of the output data. |
| template int pargemslr::CommunicationHelperClass::DataTransferOverReverse | ( | VectorVirtualClass< T > & | vec_out, |
| int | loc_out | ||
| ) |
Finish communication using the buffer inside this comm helper in the opposite direction.
| [out] | vec_out | The vector we recv information to. Space should be reserved before calling this function. |
| [in] | loc_out | The data location of the output data. |
| template int pargemslr::CommunicationHelperClass::DataTransferReverse | ( | const VectorVirtualClass< T > & | vec_in, |
| VectorVirtualClass< T > & | vec_out, | ||
| int | loc_in, | ||
| int | loc_out | ||
| ) |
Apply communication using the buffer inside this comm helper in the opposite direction.
| [in] | vec_in | The vector we send information from. |
| [out] | vec_out | The vector we recv information to. Space should be reserved before calling this function. |
| [in] | loc_in | The data location of the input data. |
| [in] | loc_out | The data location of the output data. |
| int pargemslr::CommunicationHelperClass::DataTransferStart | ( | const std::vector< VectorType > & | vec_in, |
| int | loc_in | ||
| ) |
Start communication using the buffer inside this comm helper.
| [in] | vec_in | The 2D vector we send information from. |
| [in] | loc_in | The data location of the input data. For 2D array, this is the second dimension. The fist dimention std::vector is always on the host. |
| int pargemslr::CommunicationHelperClass::DataTransferStart | ( | const VectorVirtualClass< T > & | vec_in, |
| int | loc_in | ||
| ) |
Start communication using the buffer inside this comm helper.
| [in] | vec_in | The vector we send information from. |
| [in] | loc_in | The data location of the input data. |
| template int pargemslr::CommunicationHelperClass::DataTransferStartReverse | ( | const VectorVirtualClass< T > & | vec_in, |
| int | loc_in | ||
| ) |
Start communication using the buffer inside this comm helper in the opposite direction.
| [in] | vec_in | The vector we send information from. |
| [in] | loc_in | The data location of the input data. |
| int pargemslr::CommunicationHelperClass::MoveData | ( | int | location | ) |
Move the index data to other location in the memory.
| int pargemslr::CommunicationHelperClass::MoveRecvData | ( | int | location | ) |
Move the recv data to other location in the memory.
| int pargemslr::CommunicationHelperClass::MoveSendData | ( | int | location | ) |
Move the send data to other location in the memory.
| CommunicationHelperClass & pargemslr::CommunicationHelperClass::operator= | ( | CommunicationHelperClass && | comm_helper | ) |
The = operator of CommunicationHelperClass.
| [in] | comm_helper | The target CommunicationHelperClass. |
| CommunicationHelperClass & pargemslr::CommunicationHelperClass::operator= | ( | const CommunicationHelperClass & | comm_helper | ) |
The = operator of CommunicationHelperClass.
| [in] | comm_helper | The target CommunicationHelperClass. |
| std::vector<vector_int > pargemslr::CommunicationHelperClass::_idx_helper_v2 |
Helper array for building the comm helper.
| bool pargemslr::CommunicationHelperClass::_is_nbhd_built |
If the neiborhood information (send_to and recv_from) is set in advance.
| bool pargemslr::CommunicationHelperClass::_is_ready |
Is true when the comm_helper ready to use.
| bool pargemslr::CommunicationHelperClass::_is_waiting |
Is true when there is communication on going.
| int pargemslr::CommunicationHelperClass::_n_in |
The size of the input vector.
| int pargemslr::CommunicationHelperClass::_n_out |
The size of the output vector.
| vector_int pargemslr::CommunicationHelperClass::_recv_from_v |
The vector stores the MPI ranks that myid needs to recv external vector from.
| std::vector<vector_int > pargemslr::CommunicationHelperClass::_recv_idx_v2 |
2D vector, recv_idx_v2[i] is the index in external vector that need to be received from proc. i.
The external vector can be directly used in matvec with offd_mat of trans(offd_mat) depending on the type of the current matvec helper.
| vector<MPI_Request> pargemslr::CommunicationHelperClass::_requests_v |
Vector of MPI_Request for communication.
| std::vector<vector_int > pargemslr::CommunicationHelperClass::_send_idx_v2 |
2D vector, send_idx_v2[i] is the index in local vector that need to be sent to proc. i.
| vector_int pargemslr::CommunicationHelperClass::_send_to_v |
The vector stores the MPI ranks that myid needs to send local vector to.
1.8.18