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>
32 template <
typename LocalIndexType>
40 template <
typename LocalIndexType>
41 std::shared_ptr<const gko::detail::Event> apply_prepare(
46 template <
typename LocalIndexType>
47 std::shared_ptr<const gko::detail::Event> apply_prepare(
50 gko::detail::GenericDenseCache& workspace);
53 template <
typename LocalIndexType>
57 std::shared_ptr<const gko::detail::Event>);
60 template <
typename LocalIndexType>
64 std::shared_ptr<const gko::detail::Event>,
65 gko::detail::GenericDenseCache& workspace);
101 template <
typename LocalIndexType =
int32>
106 template <
typename ValueT,
typename LocalIndexT,
typename GlobalIndexT>
109 friend std::shared_ptr<const gko::detail::Event>
110 detail::apply_prepare<LocalIndexType>(
112 friend std::shared_ptr<const gko::detail::Event>
113 detail::apply_prepare<LocalIndexType>(
115 gko::detail::GenericDenseCache& workspace);
116 friend mpi::request detail::apply_finalize<LocalIndexType>(
119 std::shared_ptr<const gko::detail::Event>);
120 friend mpi::request detail::apply_finalize<LocalIndexType>(
123 std::shared_ptr<const gko::detail::Event>,
124 gko::detail::GenericDenseCache& workspace);
169 gko::detail::GenericDenseCache& workspace)
const;
179 std::shared_ptr<const mpi::CollectiveCommunicator>
212 template <
typename GlobalIndexType =
int64,
213 typename = std::enable_if_t<
sizeof(GlobalIndexType) >=
214 sizeof(LocalIndexType)>>
215 static std::unique_ptr<RowGatherer>
create(
216 std::shared_ptr<const Executor> exec,
217 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm,
220 return std::unique_ptr<RowGatherer>(
221 new RowGatherer(std::move(exec), std::move(coll_comm), imap));
237 std::shared_ptr<const Executor> exec,
243 static std::unique_ptr<RowGatherer>
create(
262 static std::unique_ptr<RowGatherer>
create(
263 std::shared_ptr<const Executor> exec,
264 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm_template);
275 std::shared_ptr<const gko::detail::Event> apply_prepare(
278 std::shared_ptr<const gko::detail::Event> apply_prepare(
280 gko::detail::GenericDenseCache& workspace)
const;
285 std::shared_ptr<const gko::detail::Event>)
const;
290 std::shared_ptr<const gko::detail::Event>,
291 gko::detail::GenericDenseCache& workspace)
const;
299 template <
typename GlobalIndexType>
301 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm,
315 std::shared_ptr<const Executor> exec,
316 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm_template);
319 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm,
323 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm_;
325 mutable gko::detail::GenericDenseCache send_cache_;
334 #endif // GKO_PUBLIC_CORE_DISTRIBUTED_ROW_GATHERER_HPP_