forked from pmodels/mpich
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ch4/coll: Move algorithms into *_coll_impl.h files
- Loading branch information
1 parent
8b8cb28
commit 48cf68f
Showing
9 changed files
with
927 additions
and
1,117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
/* -*- Mode: C ; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ | ||
/* | ||
* (C) 2006 by Argonne National Laboratory. | ||
* See COPYRIGHT in top-level directory. | ||
* | ||
* Portions of this code were written by Intel Corporation. | ||
* Copyright (C) 2011-2016 Intel Corporation. Intel provides this material | ||
* to Argonne National Laboratory subject to Software Grant and Corporate | ||
* Contributor License Agreement dated February 8, 2012. | ||
*/ | ||
#ifndef OFI_COLL_IMPL_H_INCLUDED | ||
#define OFI_COLL_IMPL_H_INCLUDED | ||
|
||
#include "ofi_coll_params.h" | ||
|
||
#undef FUNCNAME | ||
#define FUNCNAME MPIDI_OFI_Barrier_recursive_doubling | ||
#undef FCNAME | ||
#define FCNAME MPL_QUOTE(FUNCNAME) | ||
MPL_STATIC_INLINE_PREFIX | ||
int MPIDI_OFI_Barrier_recursive_doubling(MPIR_Comm * comm_ptr, | ||
MPIR_Errflag_t * errflag, | ||
MPIDI_OFI_coll_algo_container_t * params_container ATTRIBUTE((unused))) | ||
{ | ||
int mpi_errno = MPI_SUCCESS; | ||
|
||
mpi_errno = MPIR_Barrier_recursive_doubling(comm_ptr, errflag); | ||
|
||
return mpi_errno; | ||
} | ||
|
||
#undef FUNCNAME | ||
#define FUNCNAME MPIDI_OFI_Bcast_binomial | ||
#undef FCNAME | ||
#define FCNAME MPL_QUOTE(FUNCNAME) | ||
MPL_STATIC_INLINE_PREFIX | ||
int MPIDI_OFI_Bcast_binomial(void *buffer, | ||
int count, | ||
MPI_Datatype datatype, | ||
int root, | ||
MPIR_Comm * comm_ptr, | ||
MPIR_Errflag_t * errflag, | ||
MPIDI_OFI_coll_algo_container_t * params_container ATTRIBUTE((unused))) | ||
{ | ||
int mpi_errno = MPI_SUCCESS; | ||
|
||
mpi_errno = MPIR_Bcast_binomial(buffer, count, datatype, root, comm_ptr, errflag); | ||
|
||
return mpi_errno; | ||
} | ||
|
||
#undef FUNCNAME | ||
#define FUNCNAME MPIDI_OFI_Bcast_scatter_doubling_allgather | ||
#undef FCNAME | ||
#define FCNAME MPL_QUOTE(FUNCNAME) | ||
MPL_STATIC_INLINE_PREFIX | ||
int MPIDI_OFI_Bcast_scatter_doubling_allgather(void *buffer, | ||
int count, | ||
MPI_Datatype datatype, | ||
int root, | ||
MPIR_Comm * comm_ptr, | ||
MPIR_Errflag_t * errflag, | ||
MPIDI_OFI_coll_algo_container_t * params_container ATTRIBUTE((unused))) | ||
{ | ||
int mpi_errno = MPI_SUCCESS; | ||
|
||
mpi_errno = MPIR_Bcast_scatter_ring_allgather(buffer, count, datatype, root, comm_ptr, errflag); | ||
|
||
return mpi_errno; | ||
} | ||
|
||
#undef FUNCNAME | ||
#define FUNCNAME MPIDI_OFI_Bcast_scatter_ring_allgather | ||
#undef FCNAME | ||
#define FCNAME MPL_QUOTE(FUNCNAME) | ||
MPL_STATIC_INLINE_PREFIX | ||
int MPIDI_OFI_Bcast_scatter_ring_allgather(void *buffer, | ||
int count, | ||
MPI_Datatype datatype, | ||
int root, | ||
MPIR_Comm * comm_ptr, | ||
MPIR_Errflag_t * errflag, | ||
MPIDI_OFI_coll_algo_container_t * params_container ATTRIBUTE((unused))) | ||
{ | ||
int mpi_errno = MPI_SUCCESS; | ||
|
||
mpi_errno = MPIR_Bcast_scatter_ring_allgather(buffer, count, datatype, root, comm_ptr, errflag); | ||
|
||
return mpi_errno; | ||
} | ||
|
||
#undef FUNCNAME | ||
#define FUNCNAME MPIDI_OFI_allreduce_recursive_doubling | ||
#undef FCNAME | ||
#define FCNAME MPL_QUOTE(FUNCNAME) | ||
MPL_STATIC_INLINE_PREFIX | ||
int MPIDI_OFI_allreduce_recursive_doubling(const void *sendbuf, void *recvbuf, int count, | ||
MPI_Datatype datatype, MPI_Op op, | ||
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, | ||
MPIDI_OFI_coll_algo_container_t * params_container ATTRIBUTE((unused))) | ||
{ | ||
int mpi_errno = MPI_SUCCESS; | ||
|
||
mpi_errno = MPIR_Allreduce_recursive_doubling(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); | ||
|
||
return mpi_errno; | ||
} | ||
|
||
#undef FUNCNAME | ||
#define FUNCNAME MPIDI_OFI_allreduce_reduce_scatter_allgather | ||
#undef FCNAME | ||
#define FCNAME MPL_QUOTE(FUNCNAME) | ||
MPL_STATIC_INLINE_PREFIX | ||
int MPIDI_OFI_allreduce_reduce_scatter_allgather(const void *sendbuf, void *recvbuf, int count, | ||
MPI_Datatype datatype, MPI_Op op, | ||
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, | ||
MPIDI_OFI_coll_algo_container_t * params_container ATTRIBUTE((unused))) | ||
{ | ||
int mpi_errno = MPI_SUCCESS; | ||
|
||
mpi_errno = MPIR_Allreduce_reduce_scatter_allgather(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); | ||
|
||
return mpi_errno; | ||
} | ||
|
||
#undef FUNCNAME | ||
#define FUNCNAME MPIDI_OFI_reduce_redscat_gather | ||
#undef FCNAME | ||
#define FCNAME MPL_QUOTE(FUNCNAME) | ||
MPL_STATIC_INLINE_PREFIX | ||
int MPIDI_OFI_reduce_redscat_gather(const void *sendbuf, void *recvbuf, int count, | ||
MPI_Datatype datatype, MPI_Op op, int root, | ||
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, | ||
MPIDI_OFI_coll_algo_container_t * params_container ATTRIBUTE((unused))) | ||
{ | ||
int mpi_errno = MPI_SUCCESS; | ||
|
||
mpi_errno = MPIR_Reduce_redscat_gather(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag); | ||
|
||
return mpi_errno; | ||
} | ||
|
||
#undef FUNCNAME | ||
#define FUNCNAME MPIDI_OFI_reduce_binomial | ||
#undef FCNAME | ||
#define FCNAME MPL_QUOTE(FUNCNAME) | ||
MPL_STATIC_INLINE_PREFIX | ||
int MPIDI_OFI_reduce_binomial(const void *sendbuf, void *recvbuf, int count, | ||
MPI_Datatype datatype, MPI_Op op, int root, | ||
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, | ||
MPIDI_OFI_coll_algo_container_t * params_container ATTRIBUTE((unused))) | ||
{ | ||
int mpi_errno = MPI_SUCCESS; | ||
|
||
mpi_errno = MPIR_Reduce_binomial(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag); | ||
|
||
return mpi_errno; | ||
} | ||
|
||
#endif /* OFI_COLL_IMPL_H_INCLUDED */ |
Oops, something went wrong.