source: proiecte/hpl/openmpi_compiled/include/openmpi/ompi/mpi/cxx/intercomm_inln.h @ 97

Last change on this file since 97 was 97, checked in by (none), 14 years ago

Adding compiled files

File size: 1.8 KB
Line 
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$
14//
15// Additional copyrights may follow
16//
17// $HEADER$
18//
19
20inline MPI::Intercomm
21MPI::Intercomm::Dup() const
22{
23  MPI_Comm newcomm;
24  (void)MPI_Comm_dup(mpi_comm, &newcomm);
25  return newcomm;
26}
27
28inline MPI::Intercomm&
29MPI::Intercomm::Clone() const
30{
31  MPI_Comm newcomm;
32  (void)MPI_Comm_dup(mpi_comm, &newcomm);
33  MPI::Intercomm* dup = new MPI::Intercomm(newcomm);
34  return *dup;
35}
36
37inline int
38MPI::Intercomm::Get_remote_size() const 
39{
40  int size;
41  (void)MPI_Comm_remote_size(mpi_comm, &size);
42  return size;
43}
44
45inline MPI::Group
46MPI::Intercomm::Get_remote_group() const 
47{
48  MPI_Group group;
49  (void)MPI_Comm_remote_group(mpi_comm, &group);
50  return group;
51}
52
53inline MPI::Intracomm
54MPI::Intercomm::Merge(bool high)
55{
56  MPI_Comm newcomm;
57  (void)MPI_Intercomm_merge(mpi_comm, (int)high, &newcomm);
58  return newcomm;
59}
60
61
62//
63// Extended Collective Operations
64//
65
66inline MPI::Intercomm
67MPI::Intercomm::Create(const Group& group) const
68{
69  MPI_Comm newcomm;
70  (void) MPI_Comm_create(mpi_comm, (MPI_Group) group, &newcomm);
71  return newcomm;
72}
73
74inline MPI::Intercomm
75MPI::Intercomm::Split(int color, int key) const
76{
77  MPI_Comm newcomm;
78  (void) MPI_Comm_split(mpi_comm, color, key, &newcomm);
79  return newcomm;
80}
Note: See TracBrowser for help on using the repository browser.