1 /*
2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * Copyright (c) 2013 FUJITSU LIMITED. All rights reserved.
13 * Copyright (c) 2015 Research Organization for Information Science
14 * and Technology (RIST). All rights reserved.
15 * $COPYRIGHT$
16 *
17 * Additional copyrights may follow
18 *
19 * $HEADER$
20 */
21
22 #include "ompi_config.h"
23
24 #include "ompi/constants.h"
25 #include "ompi/datatype/ompi_datatype.h"
26 #include "coll_self.h"
27
28
29 /*
30 * alltoall_intra
31 *
32 * Function: - MPI_Alltoall
33 * Accepts: - same as MPI_Alltoall()
34 * Returns: - MPI_SUCCESS or an MPI error code
35 */
36 int mca_coll_self_alltoall_intra(const void *sbuf, int scount,
37 struct ompi_datatype_t *sdtype,
38 void *rbuf, int rcount,
39 struct ompi_datatype_t *rdtype,
40 struct ompi_communicator_t *comm,
41 mca_coll_base_module_t *module)
42 {
43 if (MPI_IN_PLACE == sbuf) {
44 return MPI_SUCCESS;
45 }
46
47 return ompi_datatype_sndrcv(sbuf, scount, sdtype,
48 rbuf, rcount, rdtype);
49 }