Ginkgo  Generated from pipelines/1589998975 branch based on develop. Ginkgo version 1.10.0
A numerical linear algebra library targeting many-core architectures
partition_helpers.hpp
1 // SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
2 //
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 #ifndef GKO_PUBLIC_CORE_DISTRIBUTED_PARTITION_HELPERS_HPP_
6 #define GKO_PUBLIC_CORE_DISTRIBUTED_PARTITION_HELPERS_HPP_
7 
8 
9 #include <ginkgo/config.hpp>
10 
11 
12 #if GINKGO_BUILD_MPI
13 
14 
15 #include <ginkgo/core/base/mpi.hpp>
16 #include <ginkgo/core/base/range.hpp>
17 
18 
19 namespace gko {
20 namespace experimental {
21 namespace distributed {
22 
23 template <typename LocalIndexType, typename GlobalIndexType>
24 class Partition;
25 
26 
43 template <typename LocalIndexType, typename GlobalIndexType>
44 std::unique_ptr<Partition<LocalIndexType, GlobalIndexType>>
45 build_partition_from_local_range(std::shared_ptr<const Executor> exec,
46  mpi::communicator comm, span local_range);
47 
48 
61 template <typename LocalIndexType, typename GlobalIndexType>
62 std::unique_ptr<Partition<LocalIndexType, GlobalIndexType>>
63 build_partition_from_local_size(std::shared_ptr<const Executor> exec,
64  mpi::communicator comm, size_type local_size);
65 
66 
67 } // namespace distributed
68 } // namespace experimental
69 } // namespace gko
70 
71 
72 #endif // GINKGO_BUILD_MPI
73 #endif // GKO_PUBLIC_CORE_DISTRIBUTED_PARTITION_HELPERS_HPP_
gko::experimental::distributed::build_partition_from_local_size
std::unique_ptr< Partition< LocalIndexType, GlobalIndexType > > build_partition_from_local_size(std::shared_ptr< const Executor > exec, mpi::communicator comm, size_type local_size)
Builds a partition from a local size.
gko::size_type
std::size_t size_type
Integral type used for allocation quantities.
Definition: types.hpp:89
gko
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
gko::experimental::distributed::build_partition_from_local_range
std::unique_ptr< Partition< LocalIndexType, GlobalIndexType > > build_partition_from_local_range(std::shared_ptr< const Executor > exec, mpi::communicator comm, span local_range)
Builds a partition from a local range.