This source file includes following definitions.
- mca_coll_self_gatherv_intra
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #include "ompi_config.h"
22
23 #include "ompi/constants.h"
24 #include "ompi/datatype/ompi_datatype.h"
25 #include "coll_self.h"
26
27
28
29
30
31
32
33
34
35 int mca_coll_self_gatherv_intra(const void *sbuf, int scount,
36 struct ompi_datatype_t *sdtype,
37 void *rbuf, const int *rcounts, const int *disps,
38 struct ompi_datatype_t *rdtype, int root,
39 struct ompi_communicator_t *comm,
40 mca_coll_base_module_t *module)
41 {
42 if (MPI_IN_PLACE == sbuf) {
43 return MPI_SUCCESS;
44 } else {
45 int err;
46 ptrdiff_t lb, extent;
47 err = ompi_datatype_get_extent(rdtype, &lb, &extent);
48 if (OMPI_SUCCESS != err) {
49 return OMPI_ERROR;
50 }
51 return ompi_datatype_sndrcv(sbuf, scount, sdtype,
52 ((char *) rbuf) + disps[0]*extent,
53 rcounts[0], rdtype);
54 }
55 }