Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 0490043

Browse files
author
rhc54
committed
Merge pull request #992 from jsquyres/pr/v1.10/cxx11-has-jumped-the-shark
v1.10: cxx: "rank" is now a function in C++11
2 parents 296f09f + 368891c commit 0490043

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

ompi/mpi/cxx/comm_inln.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// University of Stuttgart. All rights reserved.
1111
// Copyright (c) 2004-2005 The Regents of the University of California.
1212
// All rights reserved.
13-
// Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
13+
// Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
1414
// Copyright (c) 2011 FUJITSU LIMITED. All rights reserved.
1515
// $COPYRIGHT$
1616
//
@@ -271,9 +271,9 @@ MPI::Comm::Get_size() const
271271
inline int
272272
MPI::Comm::Get_rank() const
273273
{
274-
int rank;
275-
(void)MPI_Comm_rank (mpi_comm, &rank);
276-
return rank;
274+
int myrank;
275+
(void)MPI_Comm_rank (mpi_comm, &myrank);
276+
return myrank;
277277
}
278278

279279
inline int

ompi/mpi/cxx/group_inln.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// University of Stuttgart. All rights reserved.
1111
// Copyright (c) 2004-2005 The Regents of the University of California.
1212
// All rights reserved.
13+
// Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
1314
// $COPYRIGHT$
1415
//
1516
// Additional copyrights may follow
@@ -32,9 +33,9 @@ MPI::Group::Get_size() const
3233
inline int
3334
MPI::Group::Get_rank() const
3435
{
35-
int rank;
36-
(void)MPI_Group_rank(mpi_group, &rank);
37-
return rank;
36+
int myrank;
37+
(void)MPI_Group_rank(mpi_group, &myrank);
38+
return myrank;
3839
}
3940

4041
inline void

ompi/mpi/cxx/topology_inln.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// All rights reserved.
1313
// Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
1414
// Copyright (c) 2011 FUJITSU LIMITED. All rights reserved.
15+
// Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
1516
// $COPYRIGHT$
1617
//
1718
// Additional copyrights may follow
@@ -81,9 +82,9 @@ MPI::Cartcomm::Get_topo(int maxdims, int dims[], bool periods[],
8182
inline int
8283
MPI::Cartcomm::Get_cart_rank(const int coords[]) const
8384
{
84-
int rank;
85-
(void)MPI_Cart_rank(mpi_comm, const_cast<int *>(coords), &rank);
86-
return rank;
85+
int myrank;
86+
(void)MPI_Cart_rank(mpi_comm, const_cast<int *>(coords), &myrank);
87+
return myrank;
8788
}
8889

8990
inline void

0 commit comments

Comments
 (0)