18 explicit Comm(MPI_Comm comm) noexcept : comm_(comm) {}
19 Comm() noexcept :
Comm(MPI_COMM_NULL) {}
20 virtual ~Comm() { free(); }
24 Comm& operator=(MPI_Comm c) {
return *
this =
Comm(c); }
25 Comm(
Comm&& o)
noexcept { *
this = std::move(o); }
29 Comm& operator=(
const Comm&) =
delete;
31 MPI_Comm get()
const noexcept {
return mpi_active() ? comm_ : MPI_COMM_NULL; }
34 operator MPI_Comm()
const noexcept {
return get(); }
36 explicit operator bool()
const noexcept {
return get() != MPI_COMM_NULL; }
39 MPI_Comm release()
noexcept;
44 bool is_revoked()
const;
52 static int size(MPI_Comm comm);
53 static int rank(MPI_Comm comm);
54 static bool is_revoked(MPI_Comm comm);
55 static int revoke(MPI_Comm comm);
56 static Group group(MPI_Comm comm);
60 Comm dup_with_info(MPI_Info info)
const;
62 Comm create(MPI_Group group)
const;
63 Comm create_group(MPI_Group group,
int tag)
const;
65 Comm split(
int color,
int key)
const;
66 Comm split_type(
int split_type,
int key, MPI_Info info)
const;
68 Comm intercomm_create(
69 int local_leader, MPI_Comm peer_comm,
int remote_leader,
int tag
75 static Comm dup(MPI_Comm comm);
76 static Comm dup_with_info(MPI_Comm comm, MPI_Info info);
78 static Comm create(MPI_Comm comm, MPI_Group group);
79 static Comm create_group(MPI_Comm comm, MPI_Group group,
int tag);
81 static Comm split(MPI_Comm comm,
int color,
int key);
82 static Comm split_type(MPI_Comm comm,
int split_type,
int key, MPI_Info info);
84 static Comm intercomm_create(
85 MPI_Comm local_comm,
int local_leader, MPI_Comm peer_comm,
86 int remote_leader,
int tag
89 static Comm shrink(MPI_Comm comm);
92 MPI_Comm comm_ = MPI_COMM_NULL;