|
|
| NeighborhoodCommunicator (const NeighborhoodCommunicator &other)=default |
| |
|
| NeighborhoodCommunicator (NeighborhoodCommunicator &&other) |
| |
|
NeighborhoodCommunicator & | operator= (const NeighborhoodCommunicator &other)=default |
| |
|
NeighborhoodCommunicator & | operator= (NeighborhoodCommunicator &&other) |
| |
| | NeighborhoodCommunicator (communicator base) |
| | Default constructor with empty communication pattern. More...
|
| |
| template<typename LocalIndexType , typename GlobalIndexType > |
| | NeighborhoodCommunicator (communicator base, const distributed::index_map< LocalIndexType, GlobalIndexType > &imap) |
| | Create a NeighborhoodCommunicator from an index map. More...
|
| |
| std::unique_ptr< CollectiveCommunicator > | create_with_same_type (communicator base, index_map_ptr imap) const override |
| | Creates a new CollectiveCommunicator with the same dynamic type. More...
|
| |
| std::unique_ptr< CollectiveCommunicator > | create_inverse () const override |
| | Creates the inverse NeighborhoodCommunicator by switching sources and destinations. More...
|
| |
| std::pair< std::unique_ptr< CollectiveCommunicator >, std::vector< comm_index_type > > | resize (std::shared_ptr< const Executor > exec, const std::vector< comm_index_type > &send_factors) const override |
| | Create new communicator that sends and receives a different number of elements to/from each rank in its current pattern. More...
|
| |
| comm_index_type | get_recv_size () const override |
| | Get the number of elements received by this process within this communication pattern. More...
|
| |
| comm_index_type | get_send_size () const override |
| | Get the number of elements sent by this process within this communication pattern. More...
|
| |
| template<typename SendType , typename RecvType > |
| request | i_all_to_all_v (std::shared_ptr< const Executor > exec, const SendType *send_buffer, RecvType *recv_buffer) const |
| | Non-blocking all-to-all communication. More...
|
| |
| request | i_all_to_all_v (std::shared_ptr< const Executor > exec, const void *send_buffer, MPI_Datatype send_type, void *recv_buffer, MPI_Datatype recv_type) const |
| |
|
| CollectiveCommunicator (communicator base=MPI_COMM_NULL) |
| |
|
const communicator & | get_base_communicator () const |
| |
| template<typename SendType , typename RecvType > |
| request | i_all_to_all_v (std::shared_ptr< const Executor > exec, const SendType *send_buffer, RecvType *recv_buffer) const |
| | Non-blocking all-to-all communication. More...
|
| |
| request | i_all_to_all_v (std::shared_ptr< const Executor > exec, const void *send_buffer, MPI_Datatype send_type, void *recv_buffer, MPI_Datatype recv_type) const |
| |
A CollectiveCommunicator that uses a neighborhood topology.
The neighborhood communicator is defined by a list of neighbors this rank sends data to and a list of neighbors this rank receives data from. No communication with any ranks that is not in one of those lists will take place.
template<typename SendType , typename RecvType >
| request gko::experimental::mpi::CollectiveCommunicator::i_all_to_all_v |
( |
typename SendType |
, |
|
|
typename RecvType |
|
|
) |
| |
Non-blocking all-to-all communication.
The send_buffer must have allocated at least get_send_size number of elements, and the recv_buffer must have allocated at least get_recv_size number of elements.
- Template Parameters
-
| SendType | the type of the elements to send |
| RecvType | the type of the elements to receive |
- Parameters
-
| exec | the executor for the communication |
| send_buffer | the send buffer |
| recv_buffer | the receive buffer |
- Returns
- a request handle
Create new communicator that sends and receives a different number of elements to/from each rank in its current pattern.
The number of elements to send is deduces from the send_factors. If this communicator is used to send 2 elements to rank 0, and 3 elements to rank 1, then send_factors needs to have size 5, which is equal to get_send_size(). An send_factors = { 4, 2, 1, 3, 2} means that instead of the first element to send to rank 0, four elements are sent, instead of the second element to send to rank 0, two elements are sent, and so on. A visual representation of the transformation is:
[ 1 1 | 1 1 1 ] -> [ 4 2 | 1 3 2] -> [ 1 1 1 1 1 1 | 1 1 1 1 1 1 ]
The communication pattern will not change. Even if send_factors is zero for all elements of one rank, the rank will stay in the new pattern.
- Note
- This is a collective call.
- Parameters
-
| exec | the executor to use for the new communicator |
| send_factors | the new number of elements to send. |
- Returns
- The new communicator and the recv_factors implied by the send_factors
Implements gko::experimental::mpi::CollectiveCommunicator.