37 inline Comm_Null(
const PMPI::Comm_Null& data) : pmpi_comm(data) { }
43 pmpi_comm = data.pmpi_comm;
48 inline bool operator==(
const Comm_Null& data)
const {
49 return (
bool) (pmpi_comm == data.pmpi_comm); }
51 inline bool operator!=(
const Comm_Null& data)
const {
52 return (
bool) (pmpi_comm != data.pmpi_comm);}
55 inline operator MPI_Comm()
const {
return pmpi_comm; }
57 inline operator const PMPI::Comm_Null&()
const {
return pmpi_comm; }
62 inline Comm_Null() : mpi_comm(MPI_COMM_NULL) { }
73 inline bool operator==(
const Comm_Null& data)
const {
74 return (
bool) (mpi_comm == data.mpi_comm); }
76 inline bool operator!=(
const Comm_Null& data)
const {
77 return (
bool) !(*
this == data);}
80 inline operator MPI_Comm()
const {
return mpi_comm; }
88 PMPI::Comm_Null pmpi_comm;
100 typedef void Errhandler_function(
Comm&,
int*, ...);
101 typedef Errhandler_function Errhandler_fn
102 __mpi_interface_deprecated__(
"MPI::Comm::Errhandler_fn was deprecated in MPI-2.2; use MPI::Comm::Errhandler_function instead");
103 typedef int Copy_attr_function(
const Comm& oldcomm,
int comm_keyval,
104 void* extra_state,
void* attribute_val_in,
105 void* attribute_val_out,
107 typedef int Delete_attr_function(
Comm& comm,
int comm_keyval,
111 #define _MPI2CPP_ERRHANDLERFN_ Errhandler_function
112 #define _MPI2CPP_COPYATTRFN_ Copy_attr_function
113 #define _MPI2CPP_DELETEATTRFN_ Delete_attr_function
125 pmpi_comm((
const PMPI::Comm&) data) { }
130 Comm(
const PMPI::Comm& data) :
134 operator const PMPI::Comm&()
const {
return pmpi_comm; }
138 this->Comm_Null::operator=(data);
139 pmpi_comm = data.pmpi_comm;
143 this->Comm_Null::operator=(data);
150 this->Comm_Null::operator=(data);
166 virtual void Send(
const void *buf,
int count,
167 const Datatype & datatype,
int dest,
int tag)
const;
169 virtual void Recv(
void *buf,
int count,
const Datatype & datatype,
170 int source,
int tag,
Status & status)
const;
173 virtual void Recv(
void *buf,
int count,
const Datatype & datatype,
174 int source,
int tag)
const;
176 virtual void Bsend(
const void *buf,
int count,
177 const Datatype & datatype,
int dest,
int tag)
const;
179 virtual void Ssend(
const void *buf,
int count,
180 const Datatype & datatype,
int dest,
int tag)
const ;
182 virtual void Rsend(
const void *buf,
int count,
183 const Datatype & datatype,
int dest,
int tag)
const;
185 virtual Request Isend(
const void *buf,
int count,
186 const Datatype & datatype,
int dest,
int tag)
const;
188 virtual Request Ibsend(
const void *buf,
int count,
const
189 Datatype & datatype,
int dest,
int tag)
const;
191 virtual Request Issend(
const void *buf,
int count,
192 const Datatype & datatype,
int dest,
int tag)
const;
194 virtual Request Irsend(
const void *buf,
int count,
195 const Datatype & datatype,
int dest,
int tag)
const;
197 virtual Request Irecv(
void *buf,
int count,
198 const Datatype & datatype,
int source,
int tag)
const;
200 virtual bool Iprobe(
int source,
int tag,
Status & status)
const;
202 virtual bool Iprobe(
int source,
int tag)
const;
204 virtual void Probe(
int source,
int tag,
Status & status)
const;
206 virtual void Probe(
int source,
int tag)
const;
208 virtual Prequest Send_init(
const void *buf,
int count,
209 const Datatype & datatype,
int dest,
212 virtual Prequest Bsend_init(
const void *buf,
int count,
213 const Datatype & datatype,
int dest,
216 virtual Prequest Ssend_init(
const void *buf,
int count,
217 const Datatype & datatype,
int dest,
220 virtual Prequest Rsend_init(
const void *buf,
int count,
221 const Datatype & datatype,
int dest,
224 virtual Prequest Recv_init(
void *buf,
int count,
225 const Datatype & datatype,
int source,
228 virtual void Sendrecv(
const void *sendbuf,
int sendcount,
229 const Datatype & sendtype,
int dest,
int sendtag,
230 void *recvbuf,
int recvcount,
231 const Datatype & recvtype,
int source,
232 int recvtag,
Status & status)
const;
234 virtual void Sendrecv(
const void *sendbuf,
int sendcount,
235 const Datatype & sendtype,
int dest,
int sendtag,
236 void *recvbuf,
int recvcount,
237 const Datatype & recvtype,
int source,
240 virtual void Sendrecv_replace(
void *buf,
int count,
241 const Datatype & datatype,
int dest,
242 int sendtag,
int source,
243 int recvtag,
Status & status)
const;
245 virtual void Sendrecv_replace(
void *buf,
int count,
246 const Datatype & datatype,
int dest,
247 int sendtag,
int source,
254 virtual Group Get_group()
const;
256 virtual int Get_size()
const;
258 virtual int Get_rank()
const;
260 static int Compare(
const Comm & comm1,
const Comm & comm2);
262 virtual Comm& Clone()
const = 0;
264 virtual void Free(
void);
266 virtual bool Is_inter()
const;
281 Bcast(
void *buffer,
int count,
282 const Datatype& datatype,
int root)
const;
285 Gather(
const void *sendbuf,
int sendcount,
287 void *recvbuf,
int recvcount,
288 const Datatype & recvtype,
int root)
const;
291 Gatherv(
const void *sendbuf,
int sendcount,
292 const Datatype & sendtype,
void *recvbuf,
293 const int recvcounts[],
const int displs[],
294 const Datatype & recvtype,
int root)
const;
297 Scatter(
const void *sendbuf,
int sendcount,
299 void *recvbuf,
int recvcount,
300 const Datatype & recvtype,
int root)
const;
303 Scatterv(
const void *sendbuf,
const int sendcounts[],
304 const int displs[],
const Datatype & sendtype,
305 void *recvbuf,
int recvcount,
306 const Datatype & recvtype,
int root)
const;
309 Allgather(
const void *sendbuf,
int sendcount,
310 const Datatype & sendtype,
void *recvbuf,
311 int recvcount,
const Datatype & recvtype)
const;
314 Allgatherv(
const void *sendbuf,
int sendcount,
315 const Datatype & sendtype,
void *recvbuf,
316 const int recvcounts[],
const int displs[],
320 Alltoall(
const void *sendbuf,
int sendcount,
321 const Datatype & sendtype,
void *recvbuf,
322 int recvcount,
const Datatype & recvtype)
const;
325 Alltoallv(
const void *sendbuf,
const int sendcounts[],
326 const int sdispls[],
const Datatype & sendtype,
327 void *recvbuf,
const int recvcounts[],
328 const int rdispls[],
const Datatype & recvtype)
const;
331 Alltoallw(
const void *sendbuf,
const int sendcounts[],
332 const int sdispls[],
const Datatype sendtypes[],
333 void *recvbuf,
const int recvcounts[],
334 const int rdispls[],
const Datatype recvtypes[])
const;
337 Reduce(
const void *sendbuf,
void *recvbuf,
int count,
343 Allreduce(
const void *sendbuf,
void *recvbuf,
int count,
344 const Datatype & datatype,
const Op & op)
const;
347 Reduce_scatter(
const void *sendbuf,
void *recvbuf,
350 const Op & op)
const;
356 virtual void Disconnect();
366 virtual void Get_name(
char * comm_name,
int& resultlen)
const;
368 virtual void Set_name(
const char* comm_name);
374 virtual int Get_topology()
const;
380 virtual void Abort(
int errorcode);
386 static Errhandler Create_errhandler(Comm::Errhandler_function*
function);
388 virtual void Set_errhandler(
const Errhandler& errhandler);
392 void Call_errhandler(
int errorcode)
const;
401 static int Create_keyval(Copy_attr_function* comm_copy_attr_fn,
402 Delete_attr_function* comm_delete_attr_fn,
404 static int Create_keyval(MPI_Comm_copy_attr_function* comm_copy_attr_fn,
405 MPI_Comm_delete_attr_function* comm_delete_attr_fn,
407 static int Create_keyval(Copy_attr_function* comm_copy_attr_fn,
408 MPI_Comm_delete_attr_function* comm_delete_attr_fn,
410 static int Create_keyval(MPI_Comm_copy_attr_function* comm_copy_attr_fn,
411 Delete_attr_function* comm_delete_attr_fn,
415 static int do_create_keyval(MPI_Comm_copy_attr_function* c_copy_fn,
416 MPI_Comm_delete_attr_function* c_delete_fn,
417 Copy_attr_function* cxx_copy_fn,
418 Delete_attr_function* cxx_delete_fn,
419 void* extra_state,
int &keyval);
423 static void Free_keyval(
int& comm_keyval);
425 virtual void Set_attr(
int comm_keyval,
const void* attribute_val)
const;
427 virtual bool Get_attr(
int comm_keyval,
void* attribute_val)
const;
429 virtual void Delete_attr(
int comm_keyval);
431 static int NULL_COPY_FN(
const Comm& oldcomm,
int comm_keyval,
432 void* extra_state,
void* attribute_val_in,
433 void* attribute_val_out,
bool& flag);
435 static int DUP_FN(
const Comm& oldcomm,
int comm_keyval,
436 void* extra_state,
void* attribute_val_in,
437 void* attribute_val_out,
bool& flag);
439 static int NULL_DELETE_FN(
Comm& comm,
int comm_keyval,
void* attribute_val,
445 PMPI::Comm pmpi_comm;
454 MPI_Comm_copy_attr_function *c_copy_fn;
455 MPI_Comm_delete_attr_function *c_delete_fn;
456 Copy_attr_function* cxx_copy_fn;
457 Delete_attr_function* cxx_delete_fn;
Definition: datatype.h:24
Definition: errhandler.h:21
Definition: mutex_unix.h:53
Definition: intercomm.h:23
Definition: communicator.h:118
Definition: request.h:146