Ginkgo: ginkgo/core/distributed/partition_helpers.hpp Source File

| Ginkgo Generated from branch based on main. Ginkgo version 1.11.0 A numerical linear algebra library targeting many-core architectures

Loading...
Searching...
No Matches
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
19namespace gko {
20namespace experimental {
21namespace distributed {
22
23template <typename LocalIndexType, typename GlobalIndexType>
24class Partition;
25
26
43template <typename LocalIndexType, typename GlobalIndexType>
44std::unique_ptr<Partition<LocalIndexType, GlobalIndexType>>
45build_partition_from_local_range(std::shared_ptr<const Executor> exec,
46 mpi::communicator comm, span local_range);
47
48
61template <typename LocalIndexType, typename GlobalIndexType>
62std::unique_ptr<Partition<LocalIndexType, GlobalIndexType>>
63build_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::Partition
Represents a partition of a range of indices [0, size) into a disjoint set of parts.
Definition partition.hpp:83
gko::experimental::mpi::communicator
A thin wrapper of MPI_Comm that supports most MPI calls.
Definition mpi.hpp:419
gko::experimental::distributed
The distributed namespace.
Definition polymorphic_object.hpp:19
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::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.
gko
The Ginkgo namespace.
Definition abstract_factory.hpp:20
gko::size_type
std::size_t size_type
Integral type used for allocation quantities.
Definition types.hpp:90
gko::span
A span is a lightweight structure used to create sub-ranges from other ranges.
Definition range.hpp:46