This source file includes following definitions.
- mca_coll_self_alltoallw_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 mca_coll_self_alltoallw_intra(const void *sbuf, const int *scounts, const int *sdisps,
37 struct ompi_datatype_t * const *sdtypes,
38 void *rbuf, const int *rcounts, const int *rdisps,
39 struct ompi_datatype_t * const *rdtypes,
40 struct ompi_communicator_t *comm,
41 mca_coll_base_module_t *module)
42 {
43 int err;
44 ptrdiff_t lb, rextent, sextent;
45
46 if (MPI_IN_PLACE == sbuf) {
47 return MPI_SUCCESS;
48 }
49
50 err = ompi_datatype_get_extent(sdtypes[0], &lb, &sextent);
51 if (OMPI_SUCCESS != err) {
52 return OMPI_ERROR;
53 }
54 err = ompi_datatype_get_extent(rdtypes[0], &lb, &rextent);
55 if (OMPI_SUCCESS != err) {
56 return OMPI_ERROR;
57 }
58
59 return ompi_datatype_sndrcv(((char *) sbuf) + sdisps[0] * sextent,
60 scounts[0], sdtypes[0],
61 ((char *) rbuf) + rdisps[0] * rextent,
62 rcounts[0], rdtypes[0]);
63 }