1 /*
2  * Copyright (C) by Argonne National Laboratory
3  *     See COPYRIGHT in top-level directory
4  */
5 
6 #include "mpiimpl.h"
7 
8 /* generate gentran algo prototypes */
9 #include "tsp_gentran.h"
10 #include "ireduce_tsp_tree_algos_prototypes.h"
11 #include "tsp_undef.h"
12 
MPIR_Ireduce_intra_gentran_ring(const void * sendbuf,void * recvbuf,int count,MPI_Datatype datatype,MPI_Op op,int root,MPIR_Comm * comm_ptr,int chunk_size,int buffer_per_child,MPIR_Request ** request)13 int MPIR_Ireduce_intra_gentran_ring(const void *sendbuf, void *recvbuf, int count,
14                                     MPI_Datatype datatype, MPI_Op op, int root,
15                                     MPIR_Comm * comm_ptr, int chunk_size, int buffer_per_child,
16                                     MPIR_Request ** request)
17 {
18     int mpi_errno = MPI_SUCCESS;
19 
20     /* Ring algorithm is equivalent to kary tree with k = 1 */
21     mpi_errno = MPII_Gentran_Ireduce_intra_tree(sendbuf, recvbuf, count, datatype, op, root,
22                                                 comm_ptr, request, MPIR_TREE_TYPE_KARY,
23                                                 1, buffer_per_child, chunk_size);
24 
25     return mpi_errno;
26 }
27