5 #ifndef GKO_PUBLIC_CORE_DISTRIBUTED_ROW_GATHERER_HPP_
6 #define GKO_PUBLIC_CORE_DISTRIBUTED_ROW_GATHERER_HPP_
9 #include <ginkgo/config.hpp>
15 #include <ginkgo/core/base/dense_cache.hpp>
16 #include <ginkgo/core/base/event.hpp>
17 #include <ginkgo/core/base/lin_op.hpp>
18 #include <ginkgo/core/base/mpi.hpp>
19 #include <ginkgo/core/distributed/base.hpp>
20 #include <ginkgo/core/distributed/collective_communicator.hpp>
21 #include <ginkgo/core/distributed/index_map.hpp>
25 namespace experimental {
26 namespace distributed {
29 template <
typename LocalIndexType>
37 template <
typename LocalIndexType>
38 std::shared_ptr<const gko::detail::Event> apply_prepare(
42 template <
typename LocalIndexType>
43 std::shared_ptr<const gko::detail::Event> apply_prepare(
45 gko::detail::GenericDenseCache& workspace);
48 template <
typename LocalIndexType>
51 std::shared_ptr<const gko::detail::Event>);
54 template <
typename LocalIndexType>
57 std::shared_ptr<const gko::detail::Event>,
58 gko::detail::GenericDenseCache& workspace);
90 template <
typename LocalIndexType =
int32>
96 template <
typename ValueT,
typename LocalIndexT,
typename GlobalIndexT>
99 friend std::shared_ptr<const gko::detail::Event>
100 detail::apply_prepare<LocalIndexType>(
const RowGatherer* rg,
102 friend std::shared_ptr<const gko::detail::Event> detail::apply_prepare<
104 gko::detail::GenericDenseCache& workspace);
105 friend mpi::request detail::apply_finalize<LocalIndexType>(
107 std::shared_ptr<const gko::detail::Event>);
108 friend mpi::request detail::apply_finalize<LocalIndexType>(
110 std::shared_ptr<const gko::detail::Event>,
111 gko::detail::GenericDenseCache& workspace);
152 gko::detail::GenericDenseCache& workspace)
const;
162 std::shared_ptr<const mpi::CollectiveCommunicator>
195 template <
typename GlobalIndexType =
int64,
196 typename = std::enable_if_t<
sizeof(GlobalIndexType) >=
197 sizeof(LocalIndexType)>>
198 static std::unique_ptr<RowGatherer>
create(
199 std::shared_ptr<const Executor> exec,
200 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm,
203 return std::unique_ptr<RowGatherer>(
204 new RowGatherer(std::move(exec), std::move(coll_comm), imap));
210 static std::unique_ptr<RowGatherer>
create(
229 static std::unique_ptr<RowGatherer>
create(
230 std::shared_ptr<const Executor> exec,
231 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm_template);
242 std::shared_ptr<const gko::detail::Event> apply_prepare(
245 std::shared_ptr<const gko::detail::Event> apply_prepare(
247 gko::detail::GenericDenseCache& workspace)
const;
251 std::shared_ptr<const gko::detail::Event>)
const;
255 std::shared_ptr<const gko::detail::Event>,
256 gko::detail::GenericDenseCache& workspace)
const;
264 template <
typename GlobalIndexType>
266 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm,
280 std::shared_ptr<const Executor> exec,
281 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm_template);
284 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm_;
286 mutable gko::detail::GenericDenseCache send_cache_;
295 #endif // GKO_PUBLIC_CORE_DISTRIBUTED_ROW_GATHERER_HPP_