1
1

Remove the use of all deprecated functions so that we don't induce

warnings about using deprecated functions in our C++ inline functions.

This commit was SVN r25994.
Этот коммит содержится в:
Jeff Squyres 2012-02-21 21:52:23 +00:00
родитель 81bd5eee8d
Коммит d595ec2ef2

Просмотреть файл

@ -10,7 +10,7 @@
// University of Stuttgart. All rights reserved. // University of Stuttgart. All rights reserved.
// Copyright (c) 2004-2005 The Regents of the University of California. // Copyright (c) 2004-2005 The Regents of the University of California.
// All rights reserved. // All rights reserved.
// Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
// Copyright (c) 2011 FUJITSU LIMITED. All rights reserved. // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved.
// $COPYRIGHT$ // $COPYRIGHT$
// //
@ -618,27 +618,27 @@ MPI::Comm::Create_keyval(MPI_Comm_copy_attr_function* comm_copy_attr_fn,
inline void inline void
MPI::Comm::Free_keyval(int& comm_keyval) MPI::Comm::Free_keyval(int& comm_keyval)
{ {
(void) MPI_Keyval_free(&comm_keyval); (void) MPI_Comm_free_keyval(&comm_keyval);
} }
inline void inline void
MPI::Comm::Set_attr(int comm_keyval, const void* attribute_val) const MPI::Comm::Set_attr(int comm_keyval, const void* attribute_val) const
{ {
(void)MPI_Attr_put(mpi_comm, comm_keyval, const_cast<void*>(attribute_val)); (void)MPI_Comm_set_attr(mpi_comm, comm_keyval, const_cast<void*>(attribute_val));
} }
inline bool inline bool
MPI::Comm::Get_attr(int comm_keyval, void* attribute_val) const MPI::Comm::Get_attr(int comm_keyval, void* attribute_val) const
{ {
int flag; int flag;
(void)MPI_Attr_get(mpi_comm, comm_keyval, attribute_val, &flag); (void)MPI_Comm_get_attr(mpi_comm, comm_keyval, attribute_val, &flag);
return OPAL_INT_TO_BOOL(flag); return OPAL_INT_TO_BOOL(flag);
} }
inline void inline void
MPI::Comm::Delete_attr(int comm_keyval) MPI::Comm::Delete_attr(int comm_keyval)
{ {
(void)MPI_Attr_delete(mpi_comm, comm_keyval); (void)MPI_Comm_delete_attr(mpi_comm, comm_keyval);
} }
// Comment out the unused parameters so that compilers don't warn // Comment out the unused parameters so that compilers don't warn
@ -664,13 +664,14 @@ MPI::Comm::DUP_FN(const MPI::Comm& oldcomm, int comm_keyval,
if (sizeof(bool) != sizeof(int)) { if (sizeof(bool) != sizeof(int)) {
int f = (int)flag; int f = (int)flag;
int ret; int ret;
ret = MPI_DUP_FN(oldcomm, comm_keyval, extra_state, attribute_val_in, ret = MPI_COMM_DUP_FN(oldcomm, comm_keyval, extra_state,
attribute_val_out, &f); attribute_val_in, attribute_val_out, &f);
flag = OPAL_INT_TO_BOOL(f); flag = OPAL_INT_TO_BOOL(f);
return ret; return ret;
} else { } else {
return MPI_DUP_FN(oldcomm, comm_keyval, extra_state, attribute_val_in, return MPI_COMM_DUP_FN(oldcomm, comm_keyval, extra_state,
attribute_val_out, (int*)&flag); attribute_val_in, attribute_val_out,
(int*)&flag);
} }
} }