diff --git a/core/distributed/device_partition.hpp b/core/distributed/device_partition.hpp index ba91019603f..e9c6cc255c6 100644 --- a/core/distributed/device_partition.hpp +++ b/core/distributed/device_partition.hpp @@ -2,8 +2,8 @@ // // SPDX-License-Identifier: BSD-3-Clause -#ifndef GINKGO_PARTITION_HPP -#define GINKGO_PARTITION_HPP +#ifndef GKO_CORE_DISTRIBUTED_PARTITION_HPP +#define GKO_CORE_DISTRIBUTED_PARTITION_HPP #include @@ -89,4 +89,4 @@ to_device_const( } // namespace gko -#endif // GINKGO_PARTITION_HPP +#endif // GKO_CORE_DISTRIBUTED_PARTITION_HPP diff --git a/include/ginkgo/core/base/types.hpp b/include/ginkgo/core/base/types.hpp index 6d8e2f3e928..3783d2c4b41 100644 --- a/include/ginkgo/core/base/types.hpp +++ b/include/ginkgo/core/base/types.hpp @@ -813,7 +813,7 @@ namespace distributed { /** - * Make mpi::comm_index_type avaiable in this namespace + * Make mpi::comm_index_type available in this namespace */ using mpi::comm_index_type; diff --git a/include/ginkgo/core/distributed/collective_communicator.hpp b/include/ginkgo/core/distributed/collective_communicator.hpp index f325283d42b..bdae36faadc 100644 --- a/include/ginkgo/core/distributed/collective_communicator.hpp +++ b/include/ginkgo/core/distributed/collective_communicator.hpp @@ -36,8 +36,9 @@ class CollectiveCommunicator { /** * Non-blocking all-to-all communication. * - * The send_buffer must have size get_send_size, and the recv_buffer - * must have size get_recv_size. + * 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. * * @tparam SendType the type of the elements to send * @tparam RecvType the type of the elements to receive diff --git a/include/ginkgo/core/distributed/index_map_fwd.hpp b/include/ginkgo/core/distributed/index_map_fwd.hpp index 1d40a0008ec..425e06ca16a 100644 --- a/include/ginkgo/core/distributed/index_map_fwd.hpp +++ b/include/ginkgo/core/distributed/index_map_fwd.hpp @@ -2,8 +2,8 @@ // // SPDX-License-Identifier: BSD-3-Clause -#ifndef GINKGO_INDEX_MAP_FWD_HPP -#define GINKGO_INDEX_MAP_FWD_HPP +#ifndef GKO_PUBLIC_CORE_INDEX_MAP_FWD_HPP +#define GKO_PUBLIC_CORE_INDEX_MAP_FWD_HPP #include @@ -27,4 +27,4 @@ using index_map_variant = } // namespace experimental } // namespace gko -#endif // GINKGO_INDEX_MAP_FWD_HPP +#endif // GKO_PUBLIC_CORE_INDEX_MAP_FWD_HPP diff --git a/include/ginkgo/core/distributed/neighborhood_communicator.hpp b/include/ginkgo/core/distributed/neighborhood_communicator.hpp index 379ba93a817..2c6987e6250 100644 --- a/include/ginkgo/core/distributed/neighborhood_communicator.hpp +++ b/include/ginkgo/core/distributed/neighborhood_communicator.hpp @@ -78,17 +78,10 @@ class NeighborhoodCommunicator final : public CollectiveCommunicator { const std::vector& send_offsets); /** - * Communicate data from all ranks to all other ranks using the - * neighboorhood communication MPI_Ineighbor_alltoallv. See MPI - * documentation for more details + * @copydoc CollectiveCommunicator::i_all_to_all_v * - * @param exec The executor, on which the message buffers are located. - * @param send_buffer the buffer to send - * @param send_type the MPI_Datatype for the send buffer - * @param recv_buffer the buffer to gather into - * @param recv_type the MPI_Datatype for the recv buffer - * - * @return the request handle for the call + * This implementation uses the neighborhood communication + * MPI_Ineighbor_alltoallv. See MPI documentation for more details. */ request i_all_to_all_v(std::shared_ptr exec, const void* send_buffer, MPI_Datatype send_type, @@ -98,6 +91,7 @@ class NeighborhoodCommunicator final : public CollectiveCommunicator { std::unique_ptr create_with_same_type( communicator base, const distributed::index_map_variant& imap) const override; + /** * Creates the inverse neighborhood_communicator by switching sources * and destinations. @@ -110,12 +104,12 @@ class NeighborhoodCommunicator final : public CollectiveCommunicator { /** * @copydoc collective_communicator::get_recv_size */ - comm_index_type get_recv_size() const override; + [[nodiscard]] comm_index_type get_recv_size() const override; /** * @copydoc collective_communicator::get_recv_size */ - comm_index_type get_send_size() const override; + [[nodiscard]] comm_index_type get_send_size() const override; private: communicator comm_;