This source file includes following definitions.
- mca_coll_self_alltoallv_intra
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
31
32
33
34
35
36 int
37 mca_coll_self_alltoallv_intra(const void *sbuf, const int *scounts, const int *sdisps,
38 struct ompi_datatype_t *sdtype,
39 void *rbuf, const int *rcounts, const int *rdisps,
40 struct ompi_datatype_t *rdtype,
41 struct ompi_communicator_t *comm,
42 mca_coll_base_module_t *module)
43 {
44 int err;
45 ptrdiff_t lb, rextent, sextent;
46
47 if (MPI_IN_PLACE == sbuf) {
48 return MPI_SUCCESS;
49 }
50
51 err = ompi_datatype_get_extent(sdtype, &lb, &sextent);
52 if (OMPI_SUCCESS != err) {
53 return OMPI_ERROR;
54 }
55 err = ompi_datatype_get_extent(rdtype, &lb, &rextent);
56 if (OMPI_SUCCESS != err) {
57 return OMPI_ERROR;
58 }
59 return ompi_datatype_sndrcv(((char *) sbuf) + sdisps[0] * sextent,
60 scounts[0], sdtype,
61 ((char *) rbuf) + rdisps[0] * rextent,
62 rcounts[0], rdtype);
63 }