Ginkgo
Generated from pipelines/1330831941 branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
ginkgo
core
distributed
base.hpp
1
// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
2
//
3
// SPDX-License-Identifier: BSD-3-Clause
4
5
#ifndef GKO_PUBLIC_CORE_DISTRIBUTED_BASE_HPP_
6
#define GKO_PUBLIC_CORE_DISTRIBUTED_BASE_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
17
18
namespace
gko
{
19
namespace
experimental {
20
namespace
distributed {
21
22
32
class
DistributedBase
{
33
public
:
34
virtual
~
DistributedBase
() =
default
;
35
36
DistributedBase
(
const
DistributedBase
& other) =
default
;
37
38
DistributedBase
(
DistributedBase
&& other) =
default
;
39
44
DistributedBase
&
operator=
(
const
DistributedBase
&) {
return
*
this
; }
45
50
DistributedBase
&
operator=
(
DistributedBase
&&) noexcept {
return
*
this
; }
51
56
mpi::communicator
get_communicator
()
const
{
return
comm_; }
57
58
protected
:
63
explicit
DistributedBase
(
mpi::communicator
comm) : comm_{std::move(comm)} {}
64
65
private
:
66
mpi::communicator comm_;
67
};
68
69
70
}
// namespace distributed
71
}
// namespace experimental
72
}
// namespace gko
73
74
75
#endif // GINKGO_BUILD_MPI
76
77
78
#endif // GKO_PUBLIC_CORE_DISTRIBUTED_BASE_HPP_
gko::experimental::distributed::DistributedBase::operator=
DistributedBase & operator=(DistributedBase &&) noexcept
Move assignment that doesn't change the used mpi::communicator.
Definition:
base.hpp:50
gko
The Ginkgo namespace.
Definition:
abstract_factory.hpp:20
gko::experimental::mpi::communicator
A thin wrapper of MPI_Comm that supports most MPI calls.
Definition:
mpi.hpp:409
gko::experimental::distributed::DistributedBase::get_communicator
mpi::communicator get_communicator() const
Access the used mpi::communicator.
Definition:
base.hpp:56
gko::experimental::distributed::DistributedBase
A base class for distributed objects.
Definition:
base.hpp:32
gko::experimental::distributed::DistributedBase::operator=
DistributedBase & operator=(const DistributedBase &)
Copy assignment that doesn't change the used mpi::communicator.
Definition:
base.hpp:44
Generated by
1.8.16