OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

intercomm_inln.h
1 // -*- c++ -*-
2 //
3 // Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4 // University Research and Technology
5 // Corporation. All rights reserved.
6 // Copyright (c) 2004-2005 The University of Tennessee and The University
7 // of Tennessee Research Foundation. All rights
8 // reserved.
9 // Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10 // University of Stuttgart. All rights reserved.
11 // Copyright (c) 2004-2005 The Regents of the University of California.
12 // All rights reserved.
13 // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved.
14 // $COPYRIGHT$
15 //
16 // Additional copyrights may follow
17 //
18 // $HEADER$
19 //
20
21 inline MPI::Intercomm
22 MPI::Intercomm::Dup() const
23 {
24 MPI_Comm newcomm;
25 (void)MPI_Comm_dup(mpi_comm, &newcomm);
26 return newcomm;
27 }
28
29 inline MPI::Intercomm&
30 MPI::Intercomm::Clone() const
31 {
32 MPI_Comm newcomm;
33 (void)MPI_Comm_dup(mpi_comm, &newcomm);
34 MPI::Intercomm* dup = new MPI::Intercomm(newcomm);
35 return *dup;
36 }
37
38 inline int
39 MPI::Intercomm::Get_remote_size() const
40 {
41 int size;
42 (void)MPI_Comm_remote_size(mpi_comm, &size);
43 return size;
44 }
45
46 inline MPI::Group
47 MPI::Intercomm::Get_remote_group() const
48 {
49 MPI_Group group;
50 (void)MPI_Comm_remote_group(mpi_comm, &group);
51 return group;
52 }
53
54 inline MPI::Intracomm
55 MPI::Intercomm::Merge(bool high) const
56 {
57 MPI_Comm newcomm;
58 (void)MPI_Intercomm_merge(mpi_comm, (int)high, &newcomm);
59 return newcomm;
60 }
61
62
63 //
64 // Extended Collective Operations
65 //
66
67 inline MPI::Intercomm
68 MPI::Intercomm::Create(const Group& group) const
69 {
70 MPI_Comm newcomm;
71 (void) MPI_Comm_create(mpi_comm, (MPI_Group) group, &newcomm);
72 return newcomm;
73 }
74
75 inline MPI::Intercomm
76 MPI::Intercomm::Split(int color, int key) const
77 {
78 MPI_Comm newcomm;
79 (void) MPI_Comm_split(mpi_comm, color, key, &newcomm);
80 return newcomm;
81 }
ompi_group_t
Group structure Currently we have four formats for storing the process pointers that are members of t...
Definition: group.h:79
ompi_communicator_t
Definition: communicator.h:118
Group
Definition: group.h:21