 |
Ginkgo
Generated from pipelines/1868155508 branch based on main. Ginkgo version 1.10.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_CORE_DISTRIBUTED_COLLECTIVE_COMMUNICATOR_HPP_
6 #define GKO_PUBLIC_CORE_DISTRIBUTED_COLLECTIVE_COMMUNICATOR_HPP_
9 #include <ginkgo/config.hpp>
16 #include <ginkgo/core/base/mpi.hpp>
17 #include <ginkgo/core/distributed/index_map.hpp>
21 namespace experimental {
37 std::variant<const distributed::index_map<int32, int32>*,
45 [[nodiscard]]
const communicator& get_base_communicator()
const;
63 template <
typename SendType,
typename RecvType>
65 const SendType* send_buffer,
66 RecvType* recv_buffer)
const;
73 const void* send_buffer, MPI_Datatype send_type,
74 void* recv_buffer, MPI_Datatype recv_type)
const;
84 [[nodiscard]]
virtual std::unique_ptr<CollectiveCommunicator>
94 [[nodiscard]]
virtual std::unique_ptr<CollectiveCommunicator>
114 virtual request i_all_to_all_v_impl(std::shared_ptr<const Executor> exec,
115 const void* send_buffer,
116 MPI_Datatype send_type,
118 MPI_Datatype recv_type)
const = 0;
125 template <
typename SendType,
typename RecvType>
127 std::shared_ptr<const Executor> exec,
const SendType* send_buffer,
128 RecvType* recv_buffer)
const
142 #endif // GKO_PUBLIC_CORE_DISTRIBUTED_COLLECTIVE_COMMUNICATOR_HPP_
virtual std::unique_ptr< CollectiveCommunicator > create_with_same_type(communicator base, index_map_ptr imap) const =0
Creates a new CollectiveCommunicator with the same dynamic type.
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.
Definition: collective_communicator.hpp:126
The request class is a light, move-only wrapper around the MPI_Request handle.
Definition: mpi.hpp:331
Interface for a collective communicator.
Definition: collective_communicator.hpp:31
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
virtual std::unique_ptr< CollectiveCommunicator > create_inverse() const =0
Creates a CollectiveCommunicator with the inverse communication pattern than this object.
virtual comm_index_type get_send_size() const =0
Get the number of elements sent by this process within this communication pattern.
A thin wrapper of MPI_Comm that supports most MPI calls.
Definition: mpi.hpp:419
int comm_index_type
Index type for enumerating processes in a distributed application.
Definition: types.hpp:1060
A struct that is used to determine the MPI_Datatype of a specified type.
Definition: mpi.hpp:77
std::variant< const distributed::index_map< int32, int32 > *, const distributed::index_map< int32, int64 > *, const distributed::index_map< int64, int64 > * > index_map_ptr
All allowed index_map types (as const *)
Definition: collective_communicator.hpp:39
virtual comm_index_type get_recv_size() const =0
Get the number of elements received by this process within this communication pattern.
This class defines mappings between global and local indices.
Definition: index_map.hpp:68