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(
45 template <
typename LocalIndexType>
46 std::shared_ptr<const gko::detail::Event> apply_prepare(
48 gko::detail::GenericDenseCache& workspace);
51 template <
typename LocalIndexType>
54 std::shared_ptr<const gko::detail::Event>);
57 template <
typename LocalIndexType>
60 std::shared_ptr<const gko::detail::Event>,
61 gko::detail::GenericDenseCache& workspace);
97 template <
typename LocalIndexType =
int32>
102 template <
typename ValueT,
typename LocalIndexT,
typename GlobalIndexT>
105 friend std::shared_ptr<const gko::detail::Event>
106 detail::apply_prepare<LocalIndexType>(
const RowGatherer* rg,
108 friend std::shared_ptr<const gko::detail::Event> detail::apply_prepare<
110 gko::detail::GenericDenseCache& workspace);
111 friend mpi::request detail::apply_finalize<LocalIndexType>(
113 std::shared_ptr<const gko::detail::Event>);
114 friend mpi::request detail::apply_finalize<LocalIndexType>(
116 std::shared_ptr<const gko::detail::Event>,
117 gko::detail::GenericDenseCache& workspace);
160 gko::detail::GenericDenseCache& workspace)
const;
170 std::shared_ptr<const mpi::CollectiveCommunicator>
203 template <
typename GlobalIndexType =
int64,
204 typename = std::enable_if_t<
sizeof(GlobalIndexType) >=
205 sizeof(LocalIndexType)>>
206 static std::unique_ptr<RowGatherer>
create(
207 std::shared_ptr<const Executor> exec,
208 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm,
211 return std::unique_ptr<RowGatherer>(
212 new RowGatherer(std::move(exec), std::move(coll_comm), imap));
228 std::shared_ptr<const Executor> exec,
234 static std::unique_ptr<RowGatherer>
create(
253 static std::unique_ptr<RowGatherer>
create(
254 std::shared_ptr<const Executor> exec,
255 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm_template);
266 std::shared_ptr<const gko::detail::Event> apply_prepare(
269 std::shared_ptr<const gko::detail::Event> apply_prepare(
271 gko::detail::GenericDenseCache& workspace)
const;
275 std::shared_ptr<const gko::detail::Event>)
const;
279 std::shared_ptr<const gko::detail::Event>,
280 gko::detail::GenericDenseCache& workspace)
const;
288 template <
typename GlobalIndexType>
290 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm,
304 std::shared_ptr<const Executor> exec,
305 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm_template);
308 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm,
312 std::shared_ptr<const mpi::CollectiveCommunicator> coll_comm_;
314 mutable gko::detail::GenericDenseCache send_cache_;
323 #endif // GKO_PUBLIC_CORE_DISTRIBUTED_ROW_GATHERER_HPP_