Commit 0743c396 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

Remove duplicate code.



Use MPIR_Bcast as an inline function, and let the compiler do its job,
instead of duplicating the code.
Signed-off-by: default avatarMichael Blocksome <blocksom@us.ibm.com>
parent 57e54ea3
......@@ -1454,19 +1454,8 @@ int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MP
}
else
{
if (comm_ptr->comm_kind == MPID_INTRACOMM)
{
/* intracommunicator */
mpi_errno = MPIR_Bcast_intra( buffer, count, datatype, root, comm_ptr, errflag );
mpi_errno = MPIR_Bcast(buffer, count, datatype, root, comm_ptr, errflag);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
}
else
{
/* intercommunicator */
mpi_errno = MPIR_Bcast_inter( buffer, count, datatype, root, comm_ptr, errflag );
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
}
}
......@@ -1483,7 +1472,7 @@ int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MP
#define FUNCNAME MPIR_Bcast
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, int *errflag)
inline int MPIR_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, int *errflag)
{
int mpi_errno = MPI_SUCCESS;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment