![]() |
Ginkgo
Generated from pipelines/1764531644 branch based on develop. Ginkgo version 1.10.0
A numerical linear algebra library targeting many-core architectures
|
A CollectiveCommunicator that uses a dense communication. More...
#include <ginkgo/core/distributed/dense_communicator.hpp>
Public Member Functions | |
DenseCommunicator (const DenseCommunicator &other)=default | |
DenseCommunicator (DenseCommunicator &&other) | |
DenseCommunicator & | operator= (const DenseCommunicator &other)=default |
DenseCommunicator & | operator= (DenseCommunicator &&other) |
DenseCommunicator (communicator base) | |
Default constructor with empty communication pattern. More... | |
template<typename LocalIndexType , typename GlobalIndexType > | |
DenseCommunicator (communicator base, const distributed::index_map< LocalIndexType, GlobalIndexType > &imap) | |
Create a DenseCommunicator from an index map. More... | |
std::unique_ptr< CollectiveCommunicator > | create_with_same_type (communicator base, const distributed::index_map_variant &imap) const override |
Creates a new CollectiveCommunicator with the same dynamic type. More... | |
std::unique_ptr< CollectiveCommunicator > | create_inverse () const override |
Creates the inverse DenseCommunicator by switching sources and destinations. More... | |
comm_index_type | get_recv_size () const override |
Get the total number of received elements this communication patterns expects. More... | |
comm_index_type | get_send_size () const override |
Get the total number of sent elements this communication patterns expects. 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 |
Friends | |
bool | operator== (const DenseCommunicator &a, const DenseCommunicator &b) |
Compares two communicators for equality. More... | |
bool | operator!= (const DenseCommunicator &a, const DenseCommunicator &b) |
Compares two communicators for inequality. More... | |
A CollectiveCommunicator that uses a dense communication.
The dense communicator uses the MPI_Alltoall function for its communication.
|
explicit |
Default constructor with empty communication pattern.
base | the base communicator |
gko::experimental::mpi::DenseCommunicator::DenseCommunicator | ( | communicator | base, |
const distributed::index_map< LocalIndexType, GlobalIndexType > & | imap | ||
) |
Create a DenseCommunicator from an index map.
The receiving neighbors are defined by the remote indices and their owning ranks of the index map. The send neighbors are deduced from that through collective communication.
LocalIndexType | the local index type of the map |
GlobalIndexType | the global index type of the map |
base | the base communicator |
imap | the index map that defines the communication pattern |
|
overridevirtual |
Creates the inverse DenseCommunicator by switching sources and destinations.
Implements gko::experimental::mpi::CollectiveCommunicator.
|
overridevirtual |
Creates a new CollectiveCommunicator with the same dynamic type.
base | The base communicator |
imap | The index_map that defines the communication pattern |
Implements gko::experimental::mpi::CollectiveCommunicator.
|
overridevirtual |
Get the total number of received elements this communication patterns expects.
Implements gko::experimental::mpi::CollectiveCommunicator.
|
overridevirtual |
Get the total number of sent elements this communication patterns expects.
Implements gko::experimental::mpi::CollectiveCommunicator.
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.
SendType | the type of the elements to send |
RecvType | the type of the elements to receive |
exec | the executor for the communication |
send_buffer | the send buffer |
recv_buffer | the receive buffer |
request gko::experimental::mpi::CollectiveCommunicator::i_all_to_all_v |
|
friend |
Compares two communicators for inequality.
|
friend |
Compares two communicators for equality.
Equality is defined as having identical or congruent communicators and their communication pattern is equal. No communication is done, i.e. there is no reduction over the local equality check results.