1 /*
2  * Copyright (C) by Argonne National Laboratory
3  *     See COPYRIGHT in top-level directory
4  */
5 
6 #ifndef MPIR_COLL_H_INCLUDED
7 #define MPIR_COLL_H_INCLUDED
8 
9 #include "coll_impl.h"
10 
11 /* Internal point-to-point communication for collectives */
12 /* These functions are used in the implementation of collective and
13    other internal operations. They are wrappers around MPID send/recv
14    functions. They do sends/receives by setting the context offset to
15    MPIR_CONTEXT_INTRA(INTER)_COLL. */
16 int MPIC_Wait(MPIR_Request * request_ptr, MPIR_Errflag_t * errflag);
17 int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status * status);
18 
19 int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
20               MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
21 int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag,
22               MPIR_Comm * comm_ptr, MPI_Status * status, MPIR_Errflag_t * errflag);
23 int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
24                MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
25 int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
26                   int dest, int sendtag, void *recvbuf, MPI_Aint recvcount,
27                   MPI_Datatype recvtype, int source, int recvtag,
28                   MPIR_Comm * comm_ptr, MPI_Status * status, MPIR_Errflag_t * errflag);
29 int MPIC_Sendrecv_replace(void *buf, MPI_Aint count, MPI_Datatype datatype,
30                           int dest, int sendtag,
31                           int source, int recvtag,
32                           MPIR_Comm * comm_ptr, MPI_Status * status, MPIR_Errflag_t * errflag);
33 int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
34                MPIR_Comm * comm_ptr, MPIR_Request ** request, MPIR_Errflag_t * errflag);
35 int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
36                 MPIR_Comm * comm_ptr, MPIR_Request ** request, MPIR_Errflag_t * errflag);
37 int MPIC_Irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source,
38                int tag, MPIR_Comm * comm_ptr, MPIR_Request ** request);
39 int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[],
40                  MPIR_Errflag_t * errflag);
41 
42 
43 /******************************** Allgather ********************************/
44 int MPIR_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
45                    int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
46                    MPIR_Errflag_t * errflag);
47 int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
48                         int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
49                         MPIR_Errflag_t * errflag);
50 
51 /* intracomm-only functions */
52 int MPIR_Allgather_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
53                                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
54                                 MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
55 int MPIR_Allgather_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
56                                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
57                                 MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
58 int MPIR_Allgather_intra_recursive_doubling(const void *sendbuf, int sendcount,
59                                             MPI_Datatype sendtype, void *recvbuf, int recvcount,
60                                             MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
61                                             MPIR_Errflag_t * errflag);
62 int MPIR_Allgather_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
63                               void *recvbuf, int recvcount, MPI_Datatype recvtype,
64                               MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
65 
66 /* intercomm-only functions */
67 int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, int sendcount,
68                                                    MPI_Datatype sendtype, void *recvbuf,
69                                                    int recvcount, MPI_Datatype recvtype,
70                                                    MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
71 
72 /* anycomm functions */
73 int MPIR_Allgather_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
74                               void *recvbuf, int recvcount, MPI_Datatype recvtype,
75                               MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
76 
77 
78 /******************************** Allgatherv ********************************/
79 int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
80                     const int *recvcounts, const int *displs, MPI_Datatype recvtype,
81                     MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
82 int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
83                          const int *recvcounts, const int *displs, MPI_Datatype recvtype,
84                          MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
85 
86 /* intracomm-only functions */
87 int MPIR_Allgatherv_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
88                                  void *recvbuf, const int *recvcounts, const int *displs,
89                                  MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
90                                  MPIR_Errflag_t * errflag);
91 int MPIR_Allgatherv_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
92                                  void *recvbuf, const int *recvcounts, const int *displs,
93                                  MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
94                                  MPIR_Errflag_t * errflag);
95 int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, int sendcount,
96                                              MPI_Datatype sendtype, void *recvbuf,
97                                              const int *recvcounts, const int *displs,
98                                              MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
99                                              MPIR_Errflag_t * errflag);
100 int MPIR_Allgatherv_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
101                                void *recvbuf, const int *recvcounts, const int *displs,
102                                MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
103                                MPIR_Errflag_t * errflag);
104 
105 /* intercomm-only functions */
106 int MPIR_Allgatherv_inter_remote_gather_local_bcast(const void *sendbuf, int sendcount,
107                                                     MPI_Datatype sendtype, void *recvbuf,
108                                                     const int *recvcounts, const int *displs,
109                                                     MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
110                                                     MPIR_Errflag_t * errflag);
111 
112 /* anycomm functions */
113 int MPIR_Allgatherv_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
114                                void *recvbuf, const int *recvcounts, const int *displs,
115                                MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
116                                MPIR_Errflag_t * errflag);
117 
118 
119 /******************************** Allreduce ********************************/
120 int MPIR_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
121                    MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
122 int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
123                         MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
124 
125 /* intracomm-only functions */
126 int MPIR_Allreduce_allcomm_auto(const void *sendbuf, void *recvbuf, int count,
127                                 MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
128                                 MPIR_Errflag_t * errflag);
129 int MPIR_Allreduce_intra_recursive_doubling(const void *sendbuf, void *recvbuf, int count,
130                                             MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
131                                             MPIR_Errflag_t * errflag);
132 int MPIR_Allreduce_intra_reduce_scatter_allgather(const void *sendbuf, void *recvbuf, int count,
133                                                   MPI_Datatype datatype, MPI_Op op,
134                                                   MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
135 int MPIR_Allreduce_intra_smp(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
136                              MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
137 
138 /* intercomm-only functions */
139 int MPIR_Allreduce_inter_reduce_exchange_bcast(const void *sendbuf, void *recvbuf, int count,
140                                                MPI_Datatype datatype, MPI_Op op,
141                                                MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
142 
143 /* anycomm functions */
144 int MPIR_Allreduce_allcomm_nb(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
145                               MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
146 
147 
148 /******************************** Alltoall ********************************/
149 int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
150                   int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
151                   MPIR_Errflag_t * errflag);
152 int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
153                        int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
154                        MPIR_Errflag_t * errflag);
155 
156 /* intracomm-only functions */
157 int MPIR_Alltoall_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
158                                void *recvbuf, int recvcount, MPI_Datatype recvtype,
159                                MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
160 int MPIR_Alltoall_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
161                                void *recvbuf, int recvcount, MPI_Datatype recvtype,
162                                MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
163 int MPIR_Alltoall_intra_pairwise(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
164                                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
165                                  MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
166 int MPIR_Alltoall_intra_pairwise_sendrecv_replace(const void *sendbuf, int sendcount,
167                                                   MPI_Datatype sendtype, void *recvbuf,
168                                                   int recvcount, MPI_Datatype recvtype,
169                                                   MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
170 int MPIR_Alltoall_intra_scattered(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
171                                   void *recvbuf, int recvcount, MPI_Datatype recvtype,
172                                   MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
173 
174 /* intercomm-only functions */
175 int MPIR_Alltoall_inter_pairwise_exchange(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
176                                           void *recvbuf, int recvcount, MPI_Datatype recvtype,
177                                           MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
178 
179 /* anycomm functions */
180 int MPIR_Alltoall_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
181                              void *recvbuf, int recvcount, MPI_Datatype recvtype,
182                              MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
183 
184 
185 /******************************** Alltoallv ********************************/
186 int MPIR_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls,
187                    MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls,
188                    MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
189 int MPIR_Alltoallv_impl(const void *sendbuf, const int *sendcounts, const int *sdispls,
190                         MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
191                         const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
192                         MPIR_Errflag_t * errflag);
193 
194 /* intracomm-only functions */
195 int MPIR_Alltoallv_allcomm_auto(const void *sendbuf, const int *sendcounts, const int *sdispls,
196                                 MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
197                                 const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
198                                 MPIR_Errflag_t * errflag);
199 int MPIR_Alltoallv_intra_pairwise_sendrecv_replace(const void *sendbuf, const int *sendcounts,
200                                                    const int *sdispls, MPI_Datatype sendtype,
201                                                    void *recvbuf, const int *recvcounts,
202                                                    const int *rdispls, MPI_Datatype recvtype,
203                                                    MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
204 int MPIR_Alltoallv_intra_scattered(const void *sendbuf, const int *sendcounts, const int *sdispls,
205                                    MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
206                                    const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
207                                    MPIR_Errflag_t * errflag);
208 
209 /* intercomm-only functions */
210 int MPIR_Alltoallv_inter_pairwise_exchange(const void *sendbuf, const int *sendcounts,
211                                            const int *sdispls, MPI_Datatype sendtype, void *recvbuf,
212                                            const int *recvcounts, const int *rdispls,
213                                            MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
214                                            MPIR_Errflag_t * errflag);
215 
216 /* anycomm functions */
217 int MPIR_Alltoallv_allcomm_nb(const void *sendbuf, const int *sendcounts, const int *sdispls,
218                               MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
219                               const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
220                               MPIR_Errflag_t * errflag);
221 
222 
223 /******************************** Alltoallw ********************************/
224 int MPIR_Alltoallw(const void *sendbuf, const int *sendcounts, const int *sdispls,
225                    const MPI_Datatype * sendtypes, void *recvbuf, const int *recvcounts,
226                    const int *rdispls, const MPI_Datatype * recvtypes, MPIR_Comm * comm_ptr,
227                    MPIR_Errflag_t * errflag);
228 int MPIR_Alltoallw_impl(const void *sendbuf, const int *sendcounts, const int *sdispls,
229                         const MPI_Datatype * sendtypes, void *recvbuf, const int *recvcounts,
230                         const int *rdispls, const MPI_Datatype * recvtypes, MPIR_Comm * comm_ptr,
231                         MPIR_Errflag_t * errflag);
232 
233 /* intracomm-only functions */
234 int MPIR_Alltoallw_allcomm_auto(const void *sendbuf, const int *sendcounts, const int *sdispls,
235                                 const MPI_Datatype * sendtypes, void *recvbuf,
236                                 const int *recvcounts, const int *rdispls,
237                                 const MPI_Datatype * recvtypes, MPIR_Comm * comm_ptr,
238                                 MPIR_Errflag_t * errflag);
239 int MPIR_Alltoallw_intra_pairwise_sendrecv_replace(const void *sendbuf, const int *sendcounts,
240                                                    const int *sdispls,
241                                                    const MPI_Datatype * sendtypes, void *recvbuf,
242                                                    const int *recvcounts, const int *rdispls,
243                                                    const MPI_Datatype * recvtypes,
244                                                    MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
245 int MPIR_Alltoallw_intra_scattered(const void *sendbuf, const int *sendcounts, const int *sdispls,
246                                    const MPI_Datatype * sendtypes, void *recvbuf,
247                                    const int *recvcounts, const int *rdispls,
248                                    const MPI_Datatype * recvtypes, MPIR_Comm * comm_ptr,
249                                    MPIR_Errflag_t * errflag);
250 
251 /* intercomm-only functions */
252 int MPIR_Alltoallw_inter_pairwise_exchange(const void *sendbuf, const int *sendcounts,
253                                            const int *sdispls, const MPI_Datatype * sendtypes,
254                                            void *recvbuf, const int *recvcounts, const int *rdispls,
255                                            const MPI_Datatype * recvtypes, MPIR_Comm * comm_ptr,
256                                            MPIR_Errflag_t * errflag);
257 
258 /* anycomm functions */
259 int MPIR_Alltoallw_allcomm_nb(const void *sendbuf, const int *sendcounts, const int *sdispls,
260                               const MPI_Datatype * sendtypes, void *recvbuf, const int *recvcounts,
261                               const int *rdispls, const MPI_Datatype * recvtypes,
262                               MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
263 
264 
265 /******************************** Barrier ********************************/
266 int MPIR_Barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
267 int MPIR_Barrier_impl(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
268 
269 /* intracomm-only functions */
270 int MPIR_Barrier_allcomm_auto(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
271 int MPIR_Barrier_intra_dissemination(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
272 int MPIR_Barrier_intra_smp(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
273 
274 /* intercomm-only functions */
275 int MPIR_Barrier_inter_bcast(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
276 
277 /* anycomm functions */
278 int MPIR_Barrier_allcomm_nb(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
279 
280 
281 /******************************** Bcast ********************************/
282 int MPIR_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr,
283                MPIR_Errflag_t * errflag);
284 int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr,
285                     MPIR_Errflag_t * errflag);
286 
287 /* intracomm-only functions */
288 int MPIR_Bcast_allcomm_auto(void *buffer, int count, MPI_Datatype datatype, int root,
289                             MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
290 int MPIR_Bcast_intra_binomial(void *buffer, int count, MPI_Datatype datatype, int root,
291                               MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
292 int MPIR_Bcast_intra_scatter_recursive_doubling_allgather(void *buffer, int count,
293                                                           MPI_Datatype datatype, int root,
294                                                           MPIR_Comm * comm_ptr,
295                                                           MPIR_Errflag_t * errflag);
296 int MPIR_Bcast_intra_scatter_ring_allgather(void *buffer, int count, MPI_Datatype datatype,
297                                             int root, MPIR_Comm * comm_ptr,
298                                             MPIR_Errflag_t * errflag);
299 int MPIR_Bcast_intra_smp(void *buffer, int count, MPI_Datatype datatype, int root,
300                          MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
301 
302 /* intercomm-only functions */
303 int MPIR_Bcast_inter_remote_send_local_bcast(void *buffer, int count, MPI_Datatype datatype,
304                                              int root, MPIR_Comm * comm_ptr,
305                                              MPIR_Errflag_t * errflag);
306 
307 /* anycomm functions */
308 int MPIR_Bcast_allcomm_nb(void *buffer, int count, MPI_Datatype datatype, int root,
309                           MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
310 
311 
312 /******************************** Exscan ********************************/
313 int MPIR_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
314                 MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
315 int MPIR_Exscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
316                      MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
317 
318 /* intracomm-only functions */
319 int MPIR_Exscan_allcomm_auto(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
320                              MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
321 int MPIR_Exscan_intra_recursive_doubling(const void *sendbuf, void *recvbuf, int count,
322                                          MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
323                                          MPIR_Errflag_t * errflag);
324 
325 /* anycomm functions */
326 int MPIR_Exscan_allcomm_nb(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
327                            MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
328 
329 
330 /******************************** Gather ********************************/
331 int MPIR_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
332                 int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
333                 MPIR_Errflag_t * errflag);
334 int MPIR_Gather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
335                      int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
336                      MPIR_Errflag_t * errflag);
337 
338 /* intracomm-only functions */
339 int MPIR_Gather_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
340                              void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
341                              MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
342 int MPIR_Gather_intra_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
343                                void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
344                                MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
345 
346 /* intercomm-only functions */
347 int MPIR_Gather_inter_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
348                              void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
349                              MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
350 int MPIR_Gather_inter_local_gather_remote_send(const void *sendbuf, int sendcount,
351                                                MPI_Datatype sendtype, void *recvbuf, int recvcount,
352                                                MPI_Datatype recvtype, int root,
353                                                MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
354 
355 /* anycomm functions */
356 int MPIR_Gather_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
357                            int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
358                            MPIR_Errflag_t * errflag);
359 
360 
361 /******************************** Gatherv ********************************/
362 int MPIR_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
363                  const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root,
364                  MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
365 int MPIR_Gatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
366                       const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root,
367                       MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
368 
369 /* intracomm-only functions */
370 int MPIR_Gatherv_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
371                               void *recvbuf, const int *recvcounts, const int *displs,
372                               MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
373                               MPIR_Errflag_t * errflag);
374 
375 /* intercomm-only functions */
376 
377 /* anycomm functions */
378 int MPIR_Gatherv_allcomm_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
379                                 void *recvbuf, const int *recvcounts, const int *displs,
380                                 MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
381                                 MPIR_Errflag_t * errflag);
382 int MPIR_Gatherv_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
383                             void *recvbuf, const int *recvcounts, const int *displs,
384                             MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
385                             MPIR_Errflag_t * errflag);
386 
387 
388 /******************************** Iallgather ********************************/
389 /* request-based functions */
390 int MPIR_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
391                     int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
392                     MPIR_Request ** request);
393 int MPIR_Iallgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
394                          int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
395                          MPIR_Request ** request);
396 int MPIR_Iallgather_intra_gentran_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
397                                          void *recvbuf, int recvcount, MPI_Datatype recvtype,
398                                          MPIR_Comm * comm_ptr, int k, MPIR_Request ** request);
399 int MPIR_Iallgather_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
400                                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
401                                  MPIR_Comm * comm_ptr, MPIR_Request ** request);
402 
403 /* sched-based functions */
404 int MPIR_Iallgather_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
405                                void *recvbuf, int recvcount, MPI_Datatype recvtype,
406                                MPIR_Comm * comm_ptr, MPIR_Sched_t s);
407 
408 /* sched-based intracomm-only functions */
409 int MPIR_Iallgather_intra_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
410                                      void *recvbuf, int recvcount, MPI_Datatype recvtype,
411                                      MPIR_Comm * comm_ptr, MPIR_Sched_t s);
412 int MPIR_Iallgather_intra_sched_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
413                                        void *recvbuf, int recvcount, MPI_Datatype recvtype,
414                                        MPIR_Comm * comm_ptr, MPIR_Sched_t s);
415 int MPIR_Iallgather_intra_sched_recursive_doubling(const void *sendbuf, int sendcount,
416                                                    MPI_Datatype sendtype, void *recvbuf,
417                                                    int recvcount, MPI_Datatype recvtype,
418                                                    MPIR_Comm * comm_ptr, MPIR_Sched_t s);
419 int MPIR_Iallgather_intra_sched_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
420                                      void *recvbuf, int recvcount, MPI_Datatype recvtype,
421                                      MPIR_Comm * comm_ptr, MPIR_Sched_t s);
422 int MPIR_Iallgather_intra_gentran_recexch_doubling(const void *sendbuf, int sendcount,
423                                                    MPI_Datatype sendtype, void *recvbuf,
424                                                    int recvcount, MPI_Datatype recvtype,
425                                                    MPIR_Comm * comm_ptr, int k,
426                                                    MPIR_Request ** request);
427 int MPIR_Iallgather_intra_gentran_recexch_halving(const void *sendbuf, int sendcount,
428                                                   MPI_Datatype sendtype, void *recvbuf,
429                                                   int recvcount, MPI_Datatype recvtype,
430                                                   MPIR_Comm * comm_ptr, int k,
431                                                   MPIR_Request ** request);
432 int MPIR_Iallgather_intra_gentran_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
433                                        void *recvbuf, int recvcount, MPI_Datatype recvtype,
434                                        MPIR_Comm * comm_ptr, MPIR_Request ** request);
435 /* sched-based intercomm-only functions */
436 int MPIR_Iallgather_inter_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
437                                      void *recvbuf, int recvcount, MPI_Datatype recvtype,
438                                      MPIR_Comm * comm_ptr, MPIR_Sched_t s);
439 int MPIR_Iallgather_inter_sched_local_gather_remote_bcast(const void *sendbuf, int sendcount,
440                                                           MPI_Datatype sendtype, void *recvbuf,
441                                                           int recvcount, MPI_Datatype recvtype,
442                                                           MPIR_Comm * comm_ptr, MPIR_Sched_t s);
443 
444 
445 /******************************** Iallgatherv ********************************/
446 /* request-based functions */
447 int MPIR_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
448                      const int *recvcounts, const int *displs, MPI_Datatype recvtype,
449                      MPIR_Comm * comm_ptr, MPIR_Request ** request);
450 int MPIR_Iallgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
451                           const int *recvcounts, const int *displs, MPI_Datatype recvtype,
452                           MPIR_Comm * comm_ptr, MPIR_Request ** request);
453 int MPIR_Iallgatherv_intra_gentran_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
454                                           void *recvbuf, const int recvcounts[], const int displs[],
455                                           MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int k,
456                                           MPIR_Request ** request);
457 int MPIR_Iallgatherv_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
458                                   void *recvbuf, const int *recvcounts, const int *displs,
459                                   MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
460                                   MPIR_Request ** request);
461 
462 /* sched-based functions */
463 int MPIR_Iallgatherv_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
464                                 void *recvbuf, const int *recvcounts, const int *displs,
465                                 MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s);
466 
467 /* sched-based intracomm-only functions */
468 int MPIR_Iallgatherv_intra_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
469                                       void *recvbuf, const int *recvcounts, const int *displs,
470                                       MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s);
471 int MPIR_Iallgatherv_intra_sched_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
472                                         void *recvbuf, const int recvcounts[], const int displs[],
473                                         MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
474                                         MPIR_Sched_t s);
475 int MPIR_Iallgatherv_intra_sched_recursive_doubling(const void *sendbuf, int sendcount,
476                                                     MPI_Datatype sendtype, void *recvbuf,
477                                                     const int recvcounts[], const int displs[],
478                                                     MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
479                                                     MPIR_Sched_t s);
480 int MPIR_Iallgatherv_intra_sched_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
481                                       void *recvbuf, const int recvcounts[], const int displs[],
482                                       MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s);
483 int MPIR_Iallgatherv_intra_gentran_recexch_doubling(const void *sendbuf, int sendcount,
484                                                     MPI_Datatype sendtype, void *recvbuf,
485                                                     const int *recvcounts, const int *displs,
486                                                     MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
487                                                     int k, MPIR_Request ** request);
488 int MPIR_Iallgatherv_intra_gentran_recexch_halving(const void *sendbuf, int sendcount,
489                                                    MPI_Datatype sendtype, void *recvbuf,
490                                                    const int *recvcounts, const int *displs,
491                                                    MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
492                                                    int k, MPIR_Request ** request);
493 int MPIR_Iallgatherv_intra_gentran_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
494                                         void *recvbuf, const int *recvcounts, const int *displs,
495                                         MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
496                                         MPIR_Request ** request);
497 
498 /* sched-based intercomm-only functions */
499 int MPIR_Iallgatherv_inter_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
500                                       void *recvbuf, const int *recvcounts, const int *displs,
501                                       MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s);
502 int MPIR_Iallgatherv_inter_sched_remote_gather_local_bcast(const void *sendbuf, int sendcount,
503                                                            MPI_Datatype sendtype, void *recvbuf,
504                                                            const int *recvcounts, const int *displs,
505                                                            MPI_Datatype recvtype,
506                                                            MPIR_Comm * comm_ptr, MPIR_Sched_t s);
507 
508 
509 /******************************** Iallreduce ********************************/
510 /* request-based functions */
511 int MPIR_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
512                     MPIR_Comm * comm_ptr, MPIR_Request ** request);
513 int MPIR_Iallreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
514                          MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** request);
515 int MPIR_Iallreduce_allcomm_auto(const void *sendbuf, void *recvbuf, int count,
516                                  MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
517                                  MPIR_Request ** request);
518 
519 /* sched-based functions */
520 int MPIR_Iallreduce_sched_auto(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
521                                MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s);
522 
523 /* sched-based intracomm-only functions */
524 int MPIR_Iallreduce_intra_sched_auto(const void *sendbuf, void *recvbuf, int count,
525                                      MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
526                                      MPIR_Sched_t s);
527 int MPIR_Iallreduce_intra_sched_naive(const void *sendbuf, void *recvbuf, int count,
528                                       MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
529                                       MPIR_Sched_t s);
530 int MPIR_Iallreduce_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf, int count,
531                                                    MPI_Datatype datatype, MPI_Op op,
532                                                    MPIR_Comm * comm_ptr, MPIR_Sched_t s);
533 int MPIR_Iallreduce_intra_sched_reduce_scatter_allgather(const void *sendbuf, void *recvbuf,
534                                                          int count, MPI_Datatype datatype,
535                                                          MPI_Op op, MPIR_Comm * comm_ptr,
536                                                          MPIR_Sched_t s);
537 int MPIR_Iallreduce_intra_gentran_recexch_single_buffer(const void *sendbuf, void *recvbuf,
538                                                         int count, MPI_Datatype datatype, MPI_Op op,
539                                                         MPIR_Comm * comm_ptr, int k,
540                                                         MPIR_Request ** request);
541 int MPIR_Iallreduce_intra_gentran_recexch_multiple_buffer(const void *sendbuf, void *recvbuf,
542                                                           int count, MPI_Datatype datatype,
543                                                           MPI_Op op, MPIR_Comm * comm_ptr, int k,
544                                                           MPIR_Request ** request);
545 int MPIR_Iallreduce_intra_gentran_tree(const void *sendbuf, void *recvbuf, int count,
546                                        MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
547                                        int tree_type, int k, int maxbytes, int buffer_per_child,
548                                        MPIR_Request ** request);
549 int MPIR_Iallreduce_intra_gentran_ring(const void *sendbuf, void *recvbuf, int count,
550                                        MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
551                                        MPIR_Request ** request);
552 int MPIR_Iallreduce_intra_gentran_recexch_reduce_scatter_recexch_allgatherv(const void *sendbuf,
553                                                                             void *recvbuf,
554                                                                             int count,
555                                                                             MPI_Datatype datatype,
556                                                                             MPI_Op op,
557                                                                             MPIR_Comm * comm_ptr,
558                                                                             int k,
559                                                                             MPIR_Request **
560                                                                             request);
561 int MPIR_Iallreduce_intra_sched_smp(const void *sendbuf, void *recvbuf, int count,
562                                     MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
563                                     MPIR_Sched_t s);
564 
565 /* sched-based intercomm-only functions */
566 int MPIR_Iallreduce_inter_sched_auto(const void *sendbuf, void *recvbuf, int count,
567                                      MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
568                                      MPIR_Sched_t s);
569 int MPIR_Iallreduce_inter_sched_remote_reduce_local_bcast(const void *sendbuf, void *recvbuf,
570                                                           int count, MPI_Datatype datatype,
571                                                           MPI_Op op, MPIR_Comm * comm_ptr,
572                                                           MPIR_Sched_t s);
573 
574 
575 /******************************** Ialltoall ********************************/
576 /* request-based functions */
577 int MPIR_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
578                    int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
579                    MPIR_Request ** request);
580 int MPIR_Ialltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
581                         int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
582                         MPIR_Request ** request);
583 int MPIR_Ialltoall_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
584                                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
585                                 MPIR_Comm * comm_ptr, MPIR_Request ** request);
586 int MPIR_Ialltoall_intra_gentran_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
587                                       void *recvbuf, int recvcount, MPI_Datatype recvtype,
588                                       MPIR_Comm * comm_ptr, MPIR_Request ** request);
589 int MPIR_Ialltoall_intra_gentran_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
590                                         void *recvbuf, int recvcount, MPI_Datatype recvtype,
591                                         MPIR_Comm * comm_ptr, int k, int buffer_per_phase,
592                                         MPIR_Request ** request);
593 int MPIR_Ialltoall_intra_gentran_scattered(const void *sendbuf, int sendcount,
594                                            MPI_Datatype sendtype, void *recvbuf, int recvcount,
595                                            MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
596                                            int batch_size, int bblock, MPIR_Request ** request);
597 
598 
599 /* sched-based functions */
600 int MPIR_Ialltoall_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
601                               void *recvbuf, int recvcount, MPI_Datatype recvtype,
602                               MPIR_Comm * comm_ptr, MPIR_Sched_t s);
603 
604 /* sched-based intracomm-only functions */
605 int MPIR_Ialltoall_intra_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
606                                     void *recvbuf, int recvcount, MPI_Datatype recvtype,
607                                     MPIR_Comm * comm_ptr, MPIR_Sched_t s);
608 int MPIR_Ialltoall_intra_sched_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
609                                       void *recvbuf, int recvcount, MPI_Datatype recvtype,
610                                       MPIR_Comm * comm_ptr, MPIR_Sched_t s);
611 int MPIR_Ialltoall_intra_sched_inplace(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
612                                        void *recvbuf, int recvcount, MPI_Datatype recvtype,
613                                        MPIR_Comm * comm_ptr, MPIR_Sched_t s);
614 int MPIR_Ialltoall_intra_sched_pairwise(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
615                                         void *recvbuf, int recvcount, MPI_Datatype recvtype,
616                                         MPIR_Comm * comm_ptr, MPIR_Sched_t s);
617 int MPIR_Ialltoall_intra_sched_permuted_sendrecv(const void *sendbuf, int sendcount,
618                                                  MPI_Datatype sendtype, void *recvbuf,
619                                                  int recvcount, MPI_Datatype recvtype,
620                                                  MPIR_Comm * comm_ptr, MPIR_Sched_t s);
621 
622 /* sched-based intercomm-only functions */
623 int MPIR_Ialltoall_inter_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
624                                     void *recvbuf, int recvcount, MPI_Datatype recvtype,
625                                     MPIR_Comm * comm_ptr, MPIR_Sched_t s);
626 int MPIR_Ialltoall_inter_sched_pairwise_exchange(const void *sendbuf, int sendcount,
627                                                  MPI_Datatype sendtype, void *recvbuf,
628                                                  int recvcount, MPI_Datatype recvtype,
629                                                  MPIR_Comm * comm_ptr, MPIR_Sched_t s);
630 
631 
632 /******************************** Ialltoallv ********************************/
633 /* request-based functions */
634 int MPIR_Ialltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls,
635                     MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls,
636                     MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Request ** request);
637 int MPIR_Ialltoallv_impl(const void *sendbuf, const int *sendcounts, const int *sdispls,
638                          MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
639                          const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
640                          MPIR_Request ** request);
641 int MPIR_Ialltoallv_allcomm_auto(const void *sendbuf, const int *sendcounts, const int *sdispls,
642                                  MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
643                                  const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
644                                  MPIR_Request ** request);
645 
646 /* sched-based functions */
647 int MPIR_Ialltoallv_sched_auto(const void *sendbuf, const int *sendcounts, const int *sdispls,
648                                MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
649                                const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
650                                MPIR_Sched_t s);
651 
652 /* sched-based intracomm-only functions */
653 int MPIR_Ialltoallv_intra_sched_auto(const void *sendbuf, const int *sendcounts, const int *sdispls,
654                                      MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
655                                      const int *rdispls, MPI_Datatype recvtype,
656                                      MPIR_Comm * comm_ptr, MPIR_Sched_t s);
657 int MPIR_Ialltoallv_intra_sched_blocked(const void *sendbuf, const int sendcounts[],
658                                         const int sdispls[], MPI_Datatype sendtype, void *recvbuf,
659                                         const int recvcounts[], const int rdispls[],
660                                         MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
661                                         MPIR_Sched_t s);
662 int MPIR_Ialltoallv_intra_sched_inplace(const void *sendbuf, const int sendcounts[],
663                                         const int sdispls[], MPI_Datatype sendtype, void *recvbuf,
664                                         const int recvcounts[], const int rdispls[],
665                                         MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
666                                         MPIR_Sched_t s);
667 int MPIR_Ialltoallv_intra_gentran_scattered(const void *sendbuf, const int sendcounts[],
668                                             const int sdispls[], MPI_Datatype sendtype,
669                                             void *recvbuf, const int recvcounts[],
670                                             const int rdispls[], MPI_Datatype recvtype,
671                                             MPIR_Comm * comm_ptr, int batch_size, int bblock,
672                                             MPIR_Request ** request);
673 int MPIR_Ialltoallv_intra_gentran_blocked(const void *sendbuf, const int sendcounts[],
674                                           const int sdispls[], MPI_Datatype sendtype, void *recvbuf,
675                                           const int recvcounts[], const int rdispls[],
676                                           MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int bblock,
677                                           MPIR_Request ** request);
678 int MPIR_Ialltoallv_intra_gentran_inplace(const void *sendbuf, const int sendcounts[],
679                                           const int sdispls[], MPI_Datatype sendtype, void *recvbuf,
680                                           const int recvcounts[], const int rdispls[],
681                                           MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
682                                           MPIR_Request ** request);
683 
684 /* sched-based intercomm-only functions */
685 int MPIR_Ialltoallv_inter_sched_auto(const void *sendbuf, const int *sendcounts, const int *sdispls,
686                                      MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
687                                      const int *rdispls, MPI_Datatype recvtype,
688                                      MPIR_Comm * comm_ptr, MPIR_Sched_t s);
689 int MPIR_Ialltoallv_inter_sched_pairwise_exchange(const void *sendbuf, const int sendcounts[],
690                                                   const int sdispls[], MPI_Datatype sendtype,
691                                                   void *recvbuf, const int recvcounts[],
692                                                   const int rdispls[], MPI_Datatype recvtype,
693                                                   MPIR_Comm * comm_ptr, MPIR_Sched_t s);
694 
695 
696 /******************************** Ialltoallw ********************************/
697 /* request-based functions */
698 int MPIR_Ialltoallw(const void *sendbuf, const int *sendcounts, const int *sdispls,
699                     const MPI_Datatype * sendtypes, void *recvbuf, const int *recvcounts,
700                     const int *rdispls, const MPI_Datatype * recvtypes, MPIR_Comm * comm_ptr,
701                     MPIR_Request ** request);
702 int MPIR_Ialltoallw_impl(const void *sendbuf, const int *sendcounts, const int *sdispls,
703                          const MPI_Datatype * sendtypes, void *recvbuf, const int *recvcounts,
704                          const int *rdispls, const MPI_Datatype * recvtypes, MPIR_Comm * comm_ptr,
705                          MPIR_Request ** request);
706 int MPIR_Ialltoallw_allcomm_auto(const void *sendbuf, const int *sendcounts, const int *sdispls,
707                                  const MPI_Datatype * sendtypes, void *recvbuf,
708                                  const int *recvcounts, const int *rdispls,
709                                  const MPI_Datatype * recvtypes, MPIR_Comm * comm_ptr,
710                                  MPIR_Request ** request);
711 int MPIR_Ialltoallw_intra_gentran_blocked(const void *sendbuf, const int sendcounts[],
712                                           const int sdispls[], const MPI_Datatype sendtypes[],
713                                           void *recvbuf, const int recvcounts[],
714                                           const int rdispls[], const MPI_Datatype recvtypes[],
715                                           MPIR_Comm * comm_ptr, int bblock, MPIR_Request ** req);
716 int MPIR_Ialltoallw_intra_gentran_inplace(const void *sendbuf, const int sendcounts[],
717                                           const int sdispls[], const MPI_Datatype sendtypes[],
718                                           void *recvbuf, const int recvcounts[],
719                                           const int rdispls[], const MPI_Datatype recvtypes[],
720                                           MPIR_Comm * comm_ptr, MPIR_Request ** request);
721 
722 /* sched-based functions */
723 int MPIR_Ialltoallw_sched_auto(const void *sendbuf, const int *sendcounts, const int *sdispls,
724                                const MPI_Datatype * sendtypes, void *recvbuf, const int *recvcounts,
725                                const int *rdispls, const MPI_Datatype * recvtypes,
726                                MPIR_Comm * comm_ptr, MPIR_Sched_t s);
727 
728 /* sched-based intracomm-only functions */
729 int MPIR_Ialltoallw_intra_sched_auto(const void *sendbuf, const int *sendcounts, const int *sdispls,
730                                      const MPI_Datatype * sendtypes, void *recvbuf,
731                                      const int *recvcounts, const int *rdispls,
732                                      const MPI_Datatype * recvtypes, MPIR_Comm * comm_ptr,
733                                      MPIR_Sched_t s);
734 int MPIR_Ialltoallw_intra_sched_blocked(const void *sendbuf, const int sendcounts[],
735                                         const int sdispls[], const MPI_Datatype sendtypes[],
736                                         void *recvbuf, const int recvcounts[], const int rdispls[],
737                                         const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr,
738                                         MPIR_Sched_t s);
739 int MPIR_Ialltoallw_intra_sched_inplace(const void *sendbuf, const int sendcounts[],
740                                         const int sdispls[], const MPI_Datatype sendtypes[],
741                                         void *recvbuf, const int recvcounts[], const int rdispls[],
742                                         const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr,
743                                         MPIR_Sched_t s);
744 
745 /* sched-based intercomm-only functions */
746 int MPIR_Ialltoallw_inter_sched_auto(const void *sendbuf, const int *sendcounts, const int *sdispls,
747                                      const MPI_Datatype * sendtypes, void *recvbuf,
748                                      const int *recvcounts, const int *rdispls,
749                                      const MPI_Datatype * recvtypes, MPIR_Comm * comm_ptr,
750                                      MPIR_Sched_t s);
751 int MPIR_Ialltoallw_inter_sched_pairwise_exchange(const void *sendbuf, const int sendcounts[],
752                                                   const int sdispls[],
753                                                   const MPI_Datatype sendtypes[], void *recvbuf,
754                                                   const int recvcounts[], const int rdispls[],
755                                                   const MPI_Datatype recvtypes[],
756                                                   MPIR_Comm * comm_ptr, MPIR_Sched_t s);
757 
758 
759 /******************************** Ibarrier ********************************/
760 /* request-based functions */
761 int MPIR_Ibarrier(MPIR_Comm * comm_ptr, MPIR_Request ** request);
762 int MPIR_Ibarrier_impl(MPIR_Comm * comm_ptr, MPIR_Request ** request);
763 int MPIR_Ibarrier_allcomm_auto(MPIR_Comm * comm_ptr, MPIR_Request ** request);
764 
765 /* sched-based functions */
766 int MPIR_Ibarrier_sched_auto(MPIR_Comm * comm_ptr, MPIR_Sched_t s);
767 
768 /* sched-based intracomm-only functions */
769 int MPIR_Ibarrier_intra_sched_auto(MPIR_Comm * comm_ptr, MPIR_Sched_t s);
770 int MPIR_Ibarrier_intra_sched_recursive_doubling(MPIR_Comm * comm_ptr, MPIR_Sched_t s);
771 int MPIR_Ibarrier_intra_gentran_recexch(MPIR_Comm * comm_ptr, int k, MPIR_Request ** request);
772 
773 /* sched-based intercomm-only functions */
774 int MPIR_Ibarrier_inter_sched_auto(MPIR_Comm * comm_ptr, MPIR_Sched_t s);
775 int MPIR_Ibarrier_inter_sched_bcast(MPIR_Comm * comm_ptr, MPIR_Sched_t s);
776 
777 
778 /******************************** Ibcast ********************************/
779 /* request-based functions */
780 int MPIR_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr,
781                 MPIR_Request ** request);
782 int MPIR_Ibcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr,
783                      MPIR_Request ** request);
784 int MPIR_Ibcast_allcomm_auto(void *buffer, int count, MPI_Datatype datatype, int root,
785                              MPIR_Comm * comm_ptr, MPIR_Request ** request);
786 int MPIR_Ibcast_intra_gentran_tree(void *buffer, int count, MPI_Datatype datatype, int root,
787                                    MPIR_Comm * comm_ptr, int tree_type, int k, int maxbytes,
788                                    MPIR_Request ** request);
789 int MPIR_Ibcast_intra_gentran_scatterv_recexch_allgatherv(void *buffer, int count,
790                                                           MPI_Datatype datatype, int root,
791                                                           MPIR_Comm * comm_ptr, int scatterv_k,
792                                                           int allgatherv_k,
793                                                           MPIR_Request ** request);
794 int MPIR_Ibcast_intra_gentran_ring(void *buffer, int count, MPI_Datatype datatype, int root,
795                                    MPIR_Comm * comm_ptr, int maxbytes, MPIR_Request ** request);
796 
797 /* sched-based functions */
798 int MPIR_Ibcast_sched_auto(void *buffer, int count, MPI_Datatype datatype, int root,
799                            MPIR_Comm * comm_ptr, MPIR_Sched_t s);
800 
801 /* sched-based intracomm-only functions */
802 int MPIR_Ibcast_intra_sched_auto(void *buffer, int count, MPI_Datatype datatype, int root,
803                                  MPIR_Comm * comm_ptr, MPIR_Sched_t s);
804 int MPIR_Ibcast_intra_sched_binomial(void *buffer, int count, MPI_Datatype datatype, int root,
805                                      MPIR_Comm * comm_ptr, MPIR_Sched_t s);
806 int MPIR_Ibcast_intra_sched_scatter_recursive_doubling_allgather(void *buffer, int count,
807                                                                  MPI_Datatype datatype, int root,
808                                                                  MPIR_Comm * comm_ptr,
809                                                                  MPIR_Sched_t s);
810 int MPIR_Ibcast_intra_sched_scatter_ring_allgather(void *buffer, int count, MPI_Datatype datatype,
811                                                    int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s);
812 int MPIR_Ibcast_intra_sched_smp(void *buffer, int count, MPI_Datatype datatype, int root,
813                                 MPIR_Comm * comm_ptr, MPIR_Sched_t s);
814 
815 /* sched-based intercomm-only functions */
816 int MPIR_Ibcast_inter_sched_auto(void *buffer, int count, MPI_Datatype datatype, int root,
817                                  MPIR_Comm * comm_ptr, MPIR_Sched_t s);
818 int MPIR_Ibcast_inter_sched_flat(void *buffer, int count, MPI_Datatype datatype, int root,
819                                  MPIR_Comm * comm_ptr, MPIR_Sched_t s);
820 
821 
822 /******************************** Iexscan ********************************/
823 /* request-based functions */
824 int MPIR_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
825                  MPIR_Comm * comm_ptr, MPIR_Request ** request);
826 int MPIR_Iexscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
827                       MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** request);
828 int MPIR_Iexscan_allcomm_auto(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
829                               MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** request);
830 
831 /* sched-based intracomm-only functions */
832 int MPIR_Iexscan_intra_sched_auto(const void *sendbuf, void *recvbuf, int count,
833                                   MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
834                                   MPIR_Sched_t s);
835 int MPIR_Iexscan_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf, int count,
836                                                 MPI_Datatype datatype, MPI_Op op,
837                                                 MPIR_Comm * comm_ptr, MPIR_Sched_t s);
838 
839 
840 /******************************** Igather ********************************/
841 /* request-based functions */
842 int MPIR_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
843                  int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
844                  MPIR_Request ** request);
845 int MPIR_Igather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
846                       int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
847                       MPIR_Request ** request);
848 int MPIR_Igather_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
849                               void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
850                               MPIR_Comm * comm_ptr, MPIR_Request ** request);
851 int MPIR_Igather_intra_gentran_tree(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
852                                     void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
853                                     MPIR_Comm * comm_ptr, int k, MPIR_Request ** request);
854 
855 /* sched-based functions */
856 int MPIR_Igather_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
857                             void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
858                             MPIR_Comm * comm_ptr, MPIR_Sched_t s);
859 
860 /* sched-based intracomm-only functions */
861 int MPIR_Igather_intra_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
862                                   void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
863                                   MPIR_Comm * comm_ptr, MPIR_Sched_t s);
864 int MPIR_Igather_intra_sched_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
865                                       void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
866                                       MPIR_Comm * comm_ptr, MPIR_Sched_t s);
867 
868 /* sched-based intercomm-only functions */
869 int MPIR_Igather_inter_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
870                                   void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
871                                   MPIR_Comm * comm_ptr, MPIR_Sched_t s);
872 int MPIR_Igather_inter_sched_long(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
873                                   void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
874                                   MPIR_Comm * comm_ptr, MPIR_Sched_t s);
875 int MPIR_Igather_inter_sched_short(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
876                                    void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
877                                    MPIR_Comm * comm_ptr, MPIR_Sched_t s);
878 
879 
880 /******************************** Igatherv ********************************/
881 /* request-based functions */
882 int MPIR_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
883                   const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root,
884                   MPIR_Comm * comm_ptr, MPIR_Request ** request);
885 int MPIR_Igatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
886                        const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root,
887                        MPIR_Comm * comm_ptr, MPIR_Request ** request);
888 int MPIR_Igatherv_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
889                                void *recvbuf, const int *recvcounts, const int *displs,
890                                MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
891                                MPIR_Request ** request);
892 int MPIR_Igatherv_allcomm_gentran_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
893                                          void *recvbuf, const int *recvcounts, const int *displs,
894                                          MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
895                                          MPIR_Request ** request);
896 
897 /* sched-based functions */
898 int MPIR_Igatherv_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
899                              void *recvbuf, const int *recvcounts, const int *displs,
900                              MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s);
901 
902 /* sched-based intracomm-only functions */
903 int MPIR_Igatherv_intra_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
904                                    void *recvbuf, const int *recvcounts, const int *displs,
905                                    MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
906                                    MPIR_Sched_t s);
907 
908 /* sched-based intercomm-only functions */
909 int MPIR_Igatherv_inter_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
910                                    void *recvbuf, const int *recvcounts, const int *displs,
911                                    MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
912                                    MPIR_Sched_t s);
913 
914 /* sched-based anycomm functions */
915 int MPIR_Igatherv_allcomm_sched_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
916                                        void *recvbuf, const int *recvcounts, const int *displs,
917                                        MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
918                                        MPIR_Sched_t s);
919 
920 
921 /******************************** Ineighbor_allgather ********************************/
922 /* request-based functions */
923 int MPIR_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
924                              void *recvbuf, int recvcount, MPI_Datatype recvtype,
925                              MPIR_Comm * comm_ptr, MPIR_Request ** request);
926 int MPIR_Ineighbor_allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
927                                   void *recvbuf, int recvcount, MPI_Datatype recvtype,
928                                   MPIR_Comm * comm_ptr, MPIR_Request ** request);
929 int MPIR_Ineighbor_allgather_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
930                                           void *recvbuf, int recvcount, MPI_Datatype recvtype,
931                                           MPIR_Comm * comm_ptr, MPIR_Request ** request);
932 int MPIR_Ineighbor_allgather_allcomm_gentran_linear(const void *sendbuf, int sendcount,
933                                                     MPI_Datatype sendtype, void *recvbuf,
934                                                     int recvcount, MPI_Datatype recvtype,
935                                                     MPIR_Comm * comm_ptr, MPIR_Request ** request);
936 
937 /* sched-based functions */
938 int MPIR_Ineighbor_allgather_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
939                                         void *recvbuf, int recvcount, MPI_Datatype recvtype,
940                                         MPIR_Comm * comm_ptr, MPIR_Sched_t s);
941 
942 /* sched-based intracomm-only functions */
943 int MPIR_Ineighbor_allgather_intra_sched_auto(const void *sendbuf, int sendcount,
944                                               MPI_Datatype sendtype, void *recvbuf, int recvcount,
945                                               MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
946                                               MPIR_Sched_t s);
947 
948 /* sched-based intercomm-only functions */
949 int MPIR_Ineighbor_allgather_inter_sched_auto(const void *sendbuf, int sendcount,
950                                               MPI_Datatype sendtype, void *recvbuf, int recvcount,
951                                               MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
952                                               MPIR_Sched_t s);
953 
954 /* sched-based anycomm functions */
955 int MPIR_Ineighbor_allgather_allcomm_sched_linear(const void *sendbuf, int sendcount,
956                                                   MPI_Datatype sendtype, void *recvbuf,
957                                                   int recvcount, MPI_Datatype recvtype,
958                                                   MPIR_Comm * comm_ptr, MPIR_Sched_t s);
959 
960 
961 /******************************** Ineighbor_allgatherv ********************************/
962 /* request-based functions */
963 int MPIR_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
964                               void *recvbuf, const int recvcounts[], const int displs[],
965                               MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Request ** request);
966 int MPIR_Ineighbor_allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
967                                    void *recvbuf, const int recvcounts[], const int displs[],
968                                    MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
969                                    MPIR_Request ** request);
970 int MPIR_Ineighbor_allgatherv_allcomm_auto(const void *sendbuf, int sendcount,
971                                            MPI_Datatype sendtype, void *recvbuf,
972                                            const int recvcounts[], const int displs[],
973                                            MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
974                                            MPIR_Request ** request);
975 int MPIR_Ineighbor_allgatherv_allcomm_gentran_linear(const void *sendbuf, int sendcount,
976                                                      MPI_Datatype sendtype, void *recvbuf,
977                                                      const int recvcounts[], const int displs[],
978                                                      MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
979                                                      MPIR_Request ** request);
980 
981 /* sched-based functions */
982 int MPIR_Ineighbor_allgatherv_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
983                                          void *recvbuf, const int recvcounts[], const int displs[],
984                                          MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
985                                          MPIR_Sched_t s);
986 
987 /* sched-based intracomm-only functions */
988 int MPIR_Ineighbor_allgatherv_intra_sched_auto(const void *sendbuf, int sendcount,
989                                                MPI_Datatype sendtype, void *recvbuf,
990                                                const int recvcounts[], const int displs[],
991                                                MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
992                                                MPIR_Sched_t s);
993 
994 /* sched-based intercomm-only functions */
995 int MPIR_Ineighbor_allgatherv_inter_sched_auto(const void *sendbuf, int sendcount,
996                                                MPI_Datatype sendtype, void *recvbuf,
997                                                const int recvcounts[], const int displs[],
998                                                MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
999                                                MPIR_Sched_t s);
1000 
1001 /* sched-based anycomm functions */
1002 int MPIR_Ineighbor_allgatherv_allcomm_sched_linear(const void *sendbuf, int sendcount,
1003                                                    MPI_Datatype sendtype, void *recvbuf,
1004                                                    const int recvcounts[], const int displs[],
1005                                                    MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
1006                                                    MPIR_Sched_t s);
1007 
1008 
1009 /******************************** Ineighbor_alltoall ********************************/
1010 /* request-based functions */
1011 int MPIR_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1012                             void *recvbuf, int recvcount, MPI_Datatype recvtype,
1013                             MPIR_Comm * comm_ptr, MPIR_Request ** request);
1014 int MPIR_Ineighbor_alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1015                                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
1016                                  MPIR_Comm * comm_ptr, MPIR_Request ** request);
1017 int MPIR_Ineighbor_alltoall_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1018                                          void *recvbuf, int recvcount, MPI_Datatype recvtype,
1019                                          MPIR_Comm * comm_ptr, MPIR_Request ** request);
1020 int MPIR_Ineighbor_alltoall_allcomm_gentran_linear(const void *sendbuf, int sendcount,
1021                                                    MPI_Datatype sendtype, void *recvbuf,
1022                                                    int recvcount, MPI_Datatype recvtype,
1023                                                    MPIR_Comm * comm_ptr, MPIR_Request ** request);
1024 
1025 /* sched-based functions */
1026 int MPIR_Ineighbor_alltoall_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1027                                        void *recvbuf, int recvcount, MPI_Datatype recvtype,
1028                                        MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1029 
1030 /* sched-based intracomm-only functions */
1031 int MPIR_Ineighbor_alltoall_intra_sched_auto(const void *sendbuf, int sendcount,
1032                                              MPI_Datatype sendtype, void *recvbuf, int recvcount,
1033                                              MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
1034                                              MPIR_Sched_t s);
1035 
1036 /* sched-based intercomm-only functions */
1037 int MPIR_Ineighbor_alltoall_inter_sched_auto(const void *sendbuf, int sendcount,
1038                                              MPI_Datatype sendtype, void *recvbuf, int recvcount,
1039                                              MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
1040                                              MPIR_Sched_t s);
1041 
1042 /* sched-based anycomm functions */
1043 int MPIR_Ineighbor_alltoall_allcomm_sched_linear(const void *sendbuf, int sendcount,
1044                                                  MPI_Datatype sendtype, void *recvbuf,
1045                                                  int recvcount, MPI_Datatype recvtype,
1046                                                  MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1047 
1048 
1049 /******************************** Ineighbor_alltoallv ********************************/
1050 /* request-based functions */
1051 int MPIR_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[],
1052                              MPI_Datatype sendtype, void *recvbuf, const int recvcounts[],
1053                              const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
1054                              MPIR_Request ** request);
1055 int MPIR_Ineighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], const int sdispls[],
1056                                   MPI_Datatype sendtype, void *recvbuf, const int recvcounts[],
1057                                   const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
1058                                   MPIR_Request ** request);
1059 int MPIR_Ineighbor_alltoallv_allcomm_auto(const void *sendbuf, const int sendcounts[],
1060                                           const int sdispls[], MPI_Datatype sendtype, void *recvbuf,
1061                                           const int recvcounts[], const int rdispls[],
1062                                           MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
1063                                           MPIR_Request ** request);
1064 int MPIR_Ineighbor_alltoallv_allcomm_gentran_linear(const void *sendbuf, const int sendcounts[],
1065                                                     const int sdispls[], MPI_Datatype sendtype,
1066                                                     void *recvbuf, const int recvcounts[],
1067                                                     const int rdispls[], MPI_Datatype recvtype,
1068                                                     MPIR_Comm * comm_ptr, MPIR_Request ** request);
1069 
1070 /* sched-based functions */
1071 int MPIR_Ineighbor_alltoallv_sched_auto(const void *sendbuf, const int sendcounts[],
1072                                         const int sdispls[], MPI_Datatype sendtype, void *recvbuf,
1073                                         const int recvcounts[], const int rdispls[],
1074                                         MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
1075                                         MPIR_Sched_t s);
1076 
1077 /* sched-based intracomm-only functions */
1078 int MPIR_Ineighbor_alltoallv_intra_sched_auto(const void *sendbuf, const int sendcounts[],
1079                                               const int sdispls[], MPI_Datatype sendtype,
1080                                               void *recvbuf, const int recvcounts[],
1081                                               const int rdispls[], MPI_Datatype recvtype,
1082                                               MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1083 
1084 /* sched-based intercomm-only functions */
1085 int MPIR_Ineighbor_alltoallv_inter_sched_auto(const void *sendbuf, const int sendcounts[],
1086                                               const int sdispls[], MPI_Datatype sendtype,
1087                                               void *recvbuf, const int recvcounts[],
1088                                               const int rdispls[], MPI_Datatype recvtype,
1089                                               MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1090 
1091 /* sched-based anycomm functions */
1092 int MPIR_Ineighbor_alltoallv_allcomm_sched_linear(const void *sendbuf, const int sendcounts[],
1093                                                   const int sdispls[], MPI_Datatype sendtype,
1094                                                   void *recvbuf, const int recvcounts[],
1095                                                   const int rdispls[], MPI_Datatype recvtype,
1096                                                   MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1097 
1098 
1099 /******************************** Ineighbor_alltoallw ********************************/
1100 /* request-based functions */
1101 int MPIR_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[],
1102                              const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[],
1103                              const MPI_Aint rdispls[], const MPI_Datatype recvtypes[],
1104                              MPIR_Comm * comm_ptr, MPIR_Request ** request);
1105 int MPIR_Ineighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[],
1106                                   const MPI_Aint sdispls[], const MPI_Datatype sendtypes[],
1107                                   void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[],
1108                                   const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr,
1109                                   MPIR_Request ** request);
1110 int MPIR_Ineighbor_alltoallw_allcomm_auto(const void *sendbuf, const int sendcounts[],
1111                                           const MPI_Aint sdispls[], const MPI_Datatype sendtypes[],
1112                                           void *recvbuf, const int recvcounts[],
1113                                           const MPI_Aint rdispls[], const MPI_Datatype recvtypes[],
1114                                           MPIR_Comm * comm_ptr, MPIR_Request ** request);
1115 int MPIR_Ineighbor_alltoallw_allcomm_gentran_linear(const void *sendbuf, const int sendcounts[],
1116                                                     const MPI_Aint sdispls[],
1117                                                     const MPI_Datatype sendtypes[], void *recvbuf,
1118                                                     const int recvcounts[],
1119                                                     const MPI_Aint rdispls[],
1120                                                     const MPI_Datatype recvtypes[],
1121                                                     MPIR_Comm * comm_ptr, MPIR_Request ** request);
1122 
1123 /* sched-based functions */
1124 int MPIR_Ineighbor_alltoallw_sched_auto(const void *sendbuf, const int sendcounts[],
1125                                         const MPI_Aint sdispls[], const MPI_Datatype sendtypes[],
1126                                         void *recvbuf, const int recvcounts[],
1127                                         const MPI_Aint rdispls[], const MPI_Datatype recvtypes[],
1128                                         MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1129 
1130 /* sched-based intracomm-only functions */
1131 int MPIR_Ineighbor_alltoallw_intra_sched_auto(const void *sendbuf, const int sendcounts[],
1132                                               const MPI_Aint sdispls[],
1133                                               const MPI_Datatype sendtypes[], void *recvbuf,
1134                                               const int recvcounts[], const MPI_Aint rdispls[],
1135                                               const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr,
1136                                               MPIR_Sched_t s);
1137 
1138 /* sched-based intercomm-only functions */
1139 int MPIR_Ineighbor_alltoallw_inter_sched_auto(const void *sendbuf, const int sendcounts[],
1140                                               const MPI_Aint sdispls[],
1141                                               const MPI_Datatype sendtypes[], void *recvbuf,
1142                                               const int recvcounts[], const MPI_Aint rdispls[],
1143                                               const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr,
1144                                               MPIR_Sched_t s);
1145 
1146 /* sched-based anycomm functions */
1147 int MPIR_Ineighbor_alltoallw_allcomm_sched_linear(const void *sendbuf, const int sendcounts[],
1148                                                   const MPI_Aint sdispls[],
1149                                                   const MPI_Datatype sendtypes[], void *recvbuf,
1150                                                   const int recvcounts[], const MPI_Aint rdispls[],
1151                                                   const MPI_Datatype recvtypes[],
1152                                                   MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1153 
1154 
1155 /******************************** Ireduce ********************************/
1156 /* request-based functions */
1157 int MPIR_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
1158                  int root, MPIR_Comm * comm_ptr, MPIR_Request ** request);
1159 int MPIR_Ireduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1160                       MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Request ** request);
1161 int MPIR_Ireduce_allcomm_auto(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1162                               MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Request ** request);
1163 int MPIR_Ireduce_intra_gentran_tree(const void *sendbuf, void *recvbuf, int count,
1164                                     MPI_Datatype datatype, MPI_Op op, int root,
1165                                     MPIR_Comm * comm_ptr, int tree_type, int k, int maxbytes,
1166                                     int buffer_per_child, MPIR_Request ** request);
1167 int MPIR_Ireduce_intra_gentran_ring(const void *sendbuf, void *recvbuf, int count,
1168                                     MPI_Datatype datatype, MPI_Op op, int root,
1169                                     MPIR_Comm * comm_ptr, int maxbytes, int buffer_per_child,
1170                                     MPIR_Request ** request);
1171 
1172 /* sched-based functions */
1173 int MPIR_Ireduce_sched_auto(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1174                             MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1175 
1176 /* sched-based intracomm-only functions */
1177 int MPIR_Ireduce_intra_sched_auto(const void *sendbuf, void *recvbuf, int count,
1178                                   MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr,
1179                                   MPIR_Sched_t s);
1180 int MPIR_Ireduce_intra_sched_binomial(const void *sendbuf, void *recvbuf, int count,
1181                                       MPI_Datatype datatype, MPI_Op op, int root,
1182                                       MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1183 int MPIR_Ireduce_intra_sched_reduce_scatter_gather(const void *sendbuf, void *recvbuf, int count,
1184                                                    MPI_Datatype datatype, MPI_Op op, int root,
1185                                                    MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1186 int MPIR_Ireduce_intra_sched_smp(const void *sendbuf, void *recvbuf, int count,
1187                                  MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr,
1188                                  MPIR_Sched_t s);
1189 
1190 /* sched-based intercomm-only functions */
1191 int MPIR_Ireduce_inter_sched_auto(const void *sendbuf, void *recvbuf, int count,
1192                                   MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr,
1193                                   MPIR_Sched_t s);
1194 int MPIR_Ireduce_inter_sched_local_reduce_remote_send(const void *sendbuf, void *recvbuf, int count,
1195                                                       MPI_Datatype datatype, MPI_Op op, int root,
1196                                                       MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1197 
1198 
1199 /******************************** Ireduce_scatter ********************************/
1200 /* request-based functions */
1201 int MPIR_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcounts,
1202                          MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1203                          MPIR_Request ** request);
1204 int MPIR_Ireduce_scatter_impl(const void *sendbuf, void *recvbuf, const int *recvcounts,
1205                               MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1206                               MPIR_Request ** request);
1207 int MPIR_Ireduce_scatter_allcomm_auto(const void *sendbuf, void *recvbuf, const int *recvcounts,
1208                                       MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1209                                       MPIR_Request ** request);
1210 
1211 /* sched-based functions */
1212 int MPIR_Ireduce_scatter_sched_auto(const void *sendbuf, void *recvbuf, const int *recvcounts,
1213                                     MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1214                                     MPIR_Sched_t s);
1215 
1216 /* sched-based intracomm-only functions */
1217 int MPIR_Ireduce_scatter_intra_sched_auto(const void *sendbuf, void *recvbuf, const int *recvcounts,
1218                                           MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1219                                           MPIR_Sched_t s);
1220 int MPIR_Ireduce_scatter_intra_sched_noncommutative(const void *sendbuf, void *recvbuf,
1221                                                     const int *recvcounts, MPI_Datatype datatype,
1222                                                     MPI_Op op, MPIR_Comm * comm_ptr,
1223                                                     MPIR_Sched_t s);
1224 int MPIR_Ireduce_scatter_intra_sched_pairwise(const void *sendbuf, void *recvbuf,
1225                                               const int *recvcounts, MPI_Datatype datatype,
1226                                               MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1227 int MPIR_Ireduce_scatter_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf,
1228                                                         const int *recvcounts,
1229                                                         MPI_Datatype datatype, MPI_Op op,
1230                                                         MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1231 int MPIR_Ireduce_scatter_intra_sched_recursive_halving(const void *sendbuf, void *recvbuf,
1232                                                        const int *recvcounts, MPI_Datatype datatype,
1233                                                        MPI_Op op, MPIR_Comm * comm_ptr,
1234                                                        MPIR_Sched_t s);
1235 int MPIR_Ireduce_scatter_intra_gentran_recexch(const void *sendbuf, void *recvbuf,
1236                                                const int *recvcounts, MPI_Datatype datatype,
1237                                                MPI_Op op, MPIR_Comm * comm_ptr, int k,
1238                                                MPIR_Request ** request);
1239 
1240 /* sched-based intercomm-only functions */
1241 int MPIR_Ireduce_scatter_inter_sched_auto(const void *sendbuf, void *recvbuf, const int *recvcounts,
1242                                           MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1243                                           MPIR_Sched_t s);
1244 int MPIR_Ireduce_scatter_inter_sched_remote_reduce_local_scatterv(const void *sendbuf,
1245                                                                   void *recvbuf,
1246                                                                   const int *recvcounts,
1247                                                                   MPI_Datatype datatype, MPI_Op op,
1248                                                                   MPIR_Comm * comm_ptr,
1249                                                                   MPIR_Sched_t s);
1250 
1251 
1252 /******************************** Ireduce_scatter_block ********************************/
1253 /* request-based functions */
1254 int MPIR_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount,
1255                                MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1256                                MPIR_Request ** request);
1257 int MPIR_Ireduce_scatter_block_impl(const void *sendbuf, void *recvbuf, int recvcount,
1258                                     MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1259                                     MPIR_Request ** request);
1260 int MPIR_Ireduce_scatter_block_allcomm_auto(const void *sendbuf, void *recvbuf, int recvcount,
1261                                             MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1262                                             MPIR_Request ** request);
1263 int MPIR_Ireduce_scatter_block_intra_gentran_recexch(const void *sendbuf, void *recvbuf,
1264                                                      int recvcount, MPI_Datatype datatype,
1265                                                      MPI_Op op, MPIR_Comm * comm_ptr, int k,
1266                                                      MPIR_Request ** request);
1267 
1268 /* sched-based functions */
1269 int MPIR_Ireduce_scatter_block_sched_auto(const void *sendbuf, void *recvbuf, int recvcount,
1270                                           MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1271                                           MPIR_Sched_t s);
1272 
1273 /* sched-based intracomm-only functions */
1274 int MPIR_Ireduce_scatter_block_intra_sched_auto(const void *sendbuf, void *recvbuf, int recvcount,
1275                                                 MPI_Datatype datatype, MPI_Op op,
1276                                                 MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1277 int MPIR_Ireduce_scatter_block_intra_sched_noncommutative(const void *sendbuf, void *recvbuf,
1278                                                           int recvcount, MPI_Datatype datatype,
1279                                                           MPI_Op op, MPIR_Comm * comm_ptr,
1280                                                           MPIR_Sched_t s);
1281 int MPIR_Ireduce_scatter_block_intra_sched_pairwise(const void *sendbuf, void *recvbuf,
1282                                                     int recvcount, MPI_Datatype datatype, MPI_Op op,
1283                                                     MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1284 int MPIR_Ireduce_scatter_block_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf,
1285                                                               int recvcount, MPI_Datatype datatype,
1286                                                               MPI_Op op, MPIR_Comm * comm_ptr,
1287                                                               MPIR_Sched_t s);
1288 int MPIR_Ireduce_scatter_block_intra_sched_recursive_halving(const void *sendbuf, void *recvbuf,
1289                                                              int recvcount, MPI_Datatype datatype,
1290                                                              MPI_Op op, MPIR_Comm * comm_ptr,
1291                                                              MPIR_Sched_t s);
1292 
1293 /* sched-based intercomm-only functions */
1294 int MPIR_Ireduce_scatter_block_inter_sched_auto(const void *sendbuf, void *recvbuf, int recvcount,
1295                                                 MPI_Datatype datatype, MPI_Op op,
1296                                                 MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1297 int MPIR_Ireduce_scatter_block_inter_sched_remote_reduce_local_scatterv(const void *sendbuf,
1298                                                                         void *recvbuf,
1299                                                                         int recvcount,
1300                                                                         MPI_Datatype datatype,
1301                                                                         MPI_Op op,
1302                                                                         MPIR_Comm * comm_ptr,
1303                                                                         MPIR_Sched_t s);
1304 
1305 
1306 /******************************** Iscan ********************************/
1307 /* request-based functions */
1308 int MPIR_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
1309                MPIR_Comm * comm_ptr, MPIR_Request ** request);
1310 int MPIR_Iscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
1311                     MPIR_Comm * comm_ptr, MPIR_Request ** request);
1312 int MPIR_Iscan_allcomm_auto(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1313                             MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** request);
1314 
1315 /* sched-based intracomm-only functions */
1316 int MPIR_Iscan_intra_sched_auto(const void *sendbuf, void *recvbuf, int count,
1317                                 MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1318                                 MPIR_Sched_t s);
1319 int MPIR_Iscan_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf, int count,
1320                                               MPI_Datatype datatype, MPI_Op op,
1321                                               MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1322 int MPIR_Iscan_intra_sched_smp(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1323                                MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1324 int MPIR_Iscan_intra_gentran_recursive_doubling(const void *sendbuf, void *recvbuf, int count,
1325                                                 MPI_Datatype datatype, MPI_Op op,
1326                                                 MPIR_Comm * comm_ptr, MPIR_Request ** request);
1327 
1328 
1329 /******************************** Iscatter ********************************/
1330 /* request-based functions */
1331 int MPIR_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
1332                   int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
1333                   MPIR_Request ** request);
1334 int MPIR_Iscatter_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
1335                        int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
1336                        MPIR_Request ** request);
1337 int MPIR_Iscatter_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1338                                void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
1339                                MPIR_Comm * comm_ptr, MPIR_Request ** request);
1340 int MPIR_Iscatter_intra_gentran_tree(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1341                                      void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
1342                                      MPIR_Comm * comm_ptr, int k, MPIR_Request ** request);
1343 
1344 /* sched-based functions */
1345 int MPIR_Iscatter_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1346                              void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
1347                              MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1348 
1349 /* sched-based intracomm-only functions */
1350 int MPIR_Iscatter_intra_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1351                                    void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
1352                                    MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1353 int MPIR_Iscatter_intra_sched_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1354                                        void *recvbuf, int recvcount, MPI_Datatype recvtype,
1355                                        int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1356 
1357 /* sched-based intercomm-only functions */
1358 int MPIR_Iscatter_inter_sched_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1359                                    void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
1360                                    MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1361 int MPIR_Iscatter_inter_sched_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1362                                      void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
1363                                      MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1364 int MPIR_Iscatter_inter_sched_remote_send_local_scatter(const void *sendbuf, int sendcount,
1365                                                         MPI_Datatype sendtype, void *recvbuf,
1366                                                         int recvcount, MPI_Datatype recvtype,
1367                                                         int root, MPIR_Comm * comm_ptr,
1368                                                         MPIR_Sched_t s);
1369 
1370 
1371 /******************************** Iscatterv ********************************/
1372 /* request-based functions */
1373 int MPIR_Iscatterv(const void *sendbuf, const int *sendcounts, const int *displs,
1374                    MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype,
1375                    int root, MPIR_Comm * comm_ptr, MPIR_Request ** request);
1376 int MPIR_Iscatterv_impl(const void *sendbuf, const int *sendcounts, const int *displs,
1377                         MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype,
1378                         int root, MPIR_Comm * comm_ptr, MPIR_Request ** request);
1379 int MPIR_Iscatterv_allcomm_auto(const void *sendbuf, const int *sendcounts, const int *displs,
1380                                 MPI_Datatype sendtype, void *recvbuf, int recvcount,
1381                                 MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
1382                                 MPIR_Request ** request);
1383 int MPIR_Iscatterv_allcomm_gentran_linear(const void *sendbuf, const int *sendcounts,
1384                                           const int *displs, MPI_Datatype sendtype, void *recvbuf,
1385                                           int recvcount, MPI_Datatype recvtype, int root,
1386                                           MPIR_Comm * comm_ptr, MPIR_Request ** request);
1387 
1388 /* sched-based functions */
1389 int MPIR_Iscatterv_sched_auto(const void *sendbuf, const int *sendcounts, const int *displs,
1390                               MPI_Datatype sendtype, void *recvbuf, int recvcount,
1391                               MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
1392                               MPIR_Sched_t s);
1393 
1394 /* sched-based intracomm-only functions */
1395 int MPIR_Iscatterv_intra_sched_auto(const void *sendbuf, const int *sendcounts, const int *displs,
1396                                     MPI_Datatype sendtype, void *recvbuf, int recvcount,
1397                                     MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
1398                                     MPIR_Sched_t s);
1399 
1400 /* sched-based intercomm-only functions */
1401 int MPIR_Iscatterv_inter_sched_auto(const void *sendbuf, const int *sendcounts, const int *displs,
1402                                     MPI_Datatype sendtype, void *recvbuf, int recvcount,
1403                                     MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
1404                                     MPIR_Sched_t s);
1405 
1406 /* sched-based anycomm functions */
1407 int MPIR_Iscatterv_allcomm_sched_linear(const void *sendbuf, const int *sendcounts,
1408                                         const int *displs, MPI_Datatype sendtype, void *recvbuf,
1409                                         int recvcount, MPI_Datatype recvtype, int root,
1410                                         MPIR_Comm * comm_ptr, MPIR_Sched_t s);
1411 
1412 
1413 /******************************** Neighbor_allgather ********************************/
1414 int MPIR_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1415                             void *recvbuf, int recvcount, MPI_Datatype recvtype,
1416                             MPIR_Comm * comm_ptr);
1417 int MPIR_Neighbor_allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1418                                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
1419                                  MPIR_Comm * comm_ptr);
1420 
1421 /* intracomm-only functions */
1422 int MPIR_Neighbor_allgather_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1423                                          void *recvbuf, int recvcount, MPI_Datatype recvtype,
1424                                          MPIR_Comm * comm_ptr);
1425 
1426 /* intercomm-only functions */
1427 
1428 /* anycomm functions */
1429 int MPIR_Neighbor_allgather_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1430                                        void *recvbuf, int recvcount, MPI_Datatype recvtype,
1431                                        MPIR_Comm * comm_ptr);
1432 
1433 
1434 /******************************** Neighbor_allgatherv ********************************/
1435 int MPIR_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1436                              void *recvbuf, const int recvcounts[], const int displs[],
1437                              MPI_Datatype recvtype, MPIR_Comm * comm_ptr);
1438 int MPIR_Neighbor_allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1439                                   void *recvbuf, const int recvcounts[], const int displs[],
1440                                   MPI_Datatype recvtype, MPIR_Comm * comm_ptr);
1441 
1442 /* intracomm-only functions */
1443 int MPIR_Neighbor_allgatherv_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1444                                           void *recvbuf, const int recvcounts[], const int displs[],
1445                                           MPI_Datatype recvtype, MPIR_Comm * comm_ptr);
1446 
1447 /* intercomm-only functions */
1448 
1449 /* anycomm functions */
1450 int MPIR_Neighbor_allgatherv_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1451                                         void *recvbuf, const int recvcounts[], const int displs[],
1452                                         MPI_Datatype recvtype, MPIR_Comm * comm_ptr);
1453 
1454 
1455 /******************************** Neighbor_alltoall ********************************/
1456 int MPIR_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
1457                            int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr);
1458 int MPIR_Neighbor_alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1459                                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
1460                                 MPIR_Comm * comm_ptr);
1461 
1462 /* intracomm-only functions */
1463 int MPIR_Neighbor_alltoall_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1464                                         void *recvbuf, int recvcount, MPI_Datatype recvtype,
1465                                         MPIR_Comm * comm_ptr);
1466 
1467 /* intercomm-only functions */
1468 
1469 /* anycomm functions */
1470 int MPIR_Neighbor_alltoall_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1471                                       void *recvbuf, int recvcount, MPI_Datatype recvtype,
1472                                       MPIR_Comm * comm_ptr);
1473 
1474 
1475 /******************************** Neighbor_alltoallv ********************************/
1476 int MPIR_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[],
1477                             MPI_Datatype sendtype, void *recvbuf, const int recvcounts[],
1478                             const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm_ptr);
1479 int MPIR_Neighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], const int sdispls[],
1480                                  MPI_Datatype sendtype, void *recvbuf, const int recvcounts[],
1481                                  const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm_ptr);
1482 
1483 /* intracomm-only functions */
1484 int MPIR_Neighbor_alltoallv_allcomm_auto(const void *sendbuf, const int sendcounts[],
1485                                          const int sdispls[], MPI_Datatype sendtype, void *recvbuf,
1486                                          const int recvcounts[], const int rdispls[],
1487                                          MPI_Datatype recvtype, MPIR_Comm * comm_ptr);
1488 
1489 /* intercomm-only functions */
1490 
1491 /* anycomm functions */
1492 int MPIR_Neighbor_alltoallv_allcomm_nb(const void *sendbuf, const int sendcounts[],
1493                                        const int sdispls[], MPI_Datatype sendtype, void *recvbuf,
1494                                        const int recvcounts[], const int rdispls[],
1495                                        MPI_Datatype recvtype, MPIR_Comm * comm_ptr);
1496 
1497 
1498 /******************************** Neighbor_alltoallw ********************************/
1499 int MPIR_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[],
1500                             const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[],
1501                             const MPI_Aint rdispls[], const MPI_Datatype recvtypes[],
1502                             MPIR_Comm * comm_ptr);
1503 int MPIR_Neighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[],
1504                                  const MPI_Aint sdispls[], const MPI_Datatype sendtypes[],
1505                                  void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[],
1506                                  const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr);
1507 
1508 /* intracomm-only functions */
1509 int MPIR_Neighbor_alltoallw_allcomm_auto(const void *sendbuf, const int sendcounts[],
1510                                          const MPI_Aint sdispls[], const MPI_Datatype sendtypes[],
1511                                          void *recvbuf, const int recvcounts[],
1512                                          const MPI_Aint rdispls[], const MPI_Datatype recvtypes[],
1513                                          MPIR_Comm * comm_ptr);
1514 
1515 /* intercomm-only functions */
1516 
1517 /* anycomm functions */
1518 int MPIR_Neighbor_alltoallw_allcomm_nb(const void *sendbuf, const int sendcounts[],
1519                                        const MPI_Aint sdispls[], const MPI_Datatype sendtypes[],
1520                                        void *recvbuf, const int recvcounts[],
1521                                        const MPI_Aint rdispls[], const MPI_Datatype recvtypes[],
1522                                        MPIR_Comm * comm_ptr);
1523 
1524 
1525 /******************************** Reduce ********************************/
1526 int MPIR_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
1527                 int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1528 int MPIR_Reduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1529                      MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1530 
1531 /* intracomm-only functions */
1532 int MPIR_Reduce_allcomm_auto(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1533                              MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1534 int MPIR_Reduce_intra_binomial(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1535                                MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1536 int MPIR_Reduce_intra_reduce_scatter_gather(const void *sendbuf, void *recvbuf, int count,
1537                                             MPI_Datatype datatype, MPI_Op op, int root,
1538                                             MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1539 int MPIR_Reduce_intra_smp(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1540                           MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1541 
1542 /* intercomm-only functions */
1543 int MPIR_Reduce_inter_local_reduce_remote_send(const void *sendbuf, void *recvbuf, int count,
1544                                                MPI_Datatype datatype, MPI_Op op, int root,
1545                                                MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1546 
1547 /* anycomm functions */
1548 int MPIR_Reduce_allcomm_nb(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1549                            MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1550 
1551 
1552 /******************************** Reduce_local ********************************/
1553 int MPIR_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype,
1554                       MPI_Op op);
1555 
1556 
1557 /******************************** Reduce_scatter ********************************/
1558 int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcounts,
1559                         MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1560                         MPIR_Errflag_t * errflag);
1561 int MPIR_Reduce_scatter_impl(const void *sendbuf, void *recvbuf, const int *recvcounts,
1562                              MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1563                              MPIR_Errflag_t * errflag);
1564 
1565 /* intracomm-only functions */
1566 int MPIR_Reduce_scatter_allcomm_auto(const void *sendbuf, void *recvbuf, const int *recvcounts,
1567                                      MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1568                                      MPIR_Errflag_t * errflag);
1569 int MPIR_Reduce_scatter_intra_noncommutative(const void *sendbuf, void *recvbuf,
1570                                              const int *recvcounts, MPI_Datatype datatype,
1571                                              MPI_Op op, MPIR_Comm * comm_ptr,
1572                                              MPIR_Errflag_t * errflag);
1573 int MPIR_Reduce_scatter_intra_pairwise(const void *sendbuf, void *recvbuf, const int *recvcounts,
1574                                        MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1575                                        MPIR_Errflag_t * errflag);
1576 int MPIR_Reduce_scatter_intra_recursive_doubling(const void *sendbuf, void *recvbuf,
1577                                                  const int *recvcounts, MPI_Datatype datatype,
1578                                                  MPI_Op op, MPIR_Comm * comm_ptr,
1579                                                  MPIR_Errflag_t * errflag);
1580 int MPIR_Reduce_scatter_intra_recursive_halving(const void *sendbuf, void *recvbuf,
1581                                                 const int *recvcounts, MPI_Datatype datatype,
1582                                                 MPI_Op op, MPIR_Comm * comm_ptr,
1583                                                 MPIR_Errflag_t * errflag);
1584 
1585 /* intercomm-only functions */
1586 int MPIR_Reduce_scatter_inter_remote_reduce_local_scatter(const void *sendbuf, void *recvbuf,
1587                                                           const int *recvcounts,
1588                                                           MPI_Datatype datatype, MPI_Op op,
1589                                                           MPIR_Comm * comm_ptr,
1590                                                           MPIR_Errflag_t * errflag);
1591 
1592 /* anycomm functions */
1593 int MPIR_Reduce_scatter_allcomm_nb(const void *sendbuf, void *recvbuf, const int *recvcounts,
1594                                    MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1595                                    MPIR_Errflag_t * errflag);
1596 
1597 
1598 /******************************** Reduce_scatter_block ********************************/
1599 int MPIR_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount,
1600                               MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1601                               MPIR_Errflag_t * errflag);
1602 int MPIR_Reduce_scatter_block_impl(const void *sendbuf, void *recvbuf, int recvcount,
1603                                    MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1604                                    MPIR_Errflag_t * errflag);
1605 
1606 /* intracomm-only functions */
1607 int MPIR_Reduce_scatter_block_allcomm_auto(const void *sendbuf, void *recvbuf, int recvcount,
1608                                            MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1609                                            MPIR_Errflag_t * errflag);
1610 int MPIR_Reduce_scatter_block_intra_noncommutative(const void *sendbuf, void *recvbuf,
1611                                                    int recvcount, MPI_Datatype datatype, MPI_Op op,
1612                                                    MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1613 int MPIR_Reduce_scatter_block_intra_pairwise(const void *sendbuf, void *recvbuf, int recvcount,
1614                                              MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1615                                              MPIR_Errflag_t * errflag);
1616 int MPIR_Reduce_scatter_block_intra_recursive_doubling(const void *sendbuf, void *recvbuf,
1617                                                        int recvcount, MPI_Datatype datatype,
1618                                                        MPI_Op op, MPIR_Comm * comm_ptr,
1619                                                        MPIR_Errflag_t * errflag);
1620 int MPIR_Reduce_scatter_block_intra_recursive_halving(const void *sendbuf, void *recvbuf,
1621                                                       int recvcount, MPI_Datatype datatype,
1622                                                       MPI_Op op, MPIR_Comm * comm_ptr,
1623                                                       MPIR_Errflag_t * errflag);
1624 
1625 /* intercomm-only functions */
1626 int MPIR_Reduce_scatter_block_inter_remote_reduce_local_scatter(const void *sendbuf, void *recvbuf,
1627                                                                 int recvcount,
1628                                                                 MPI_Datatype datatype, MPI_Op op,
1629                                                                 MPIR_Comm * comm_ptr,
1630                                                                 MPIR_Errflag_t * errflag);
1631 
1632 /* anycomm functions */
1633 int MPIR_Reduce_scatter_block_allcomm_nb(const void *sendbuf, void *recvbuf, int recvcount,
1634                                          MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1635                                          MPIR_Errflag_t * errflag);
1636 
1637 
1638 /******************************** Scan ********************************/
1639 int MPIR_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
1640               MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1641 int MPIR_Scan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
1642                    MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1643 
1644 /* intracomm-only functions */
1645 int MPIR_Scan_allcomm_auto(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1646                            MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1647 int MPIR_Scan_intra_recursive_doubling(const void *sendbuf, void *recvbuf, int count,
1648                                        MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
1649                                        MPIR_Errflag_t * errflag);
1650 int MPIR_Scan_intra_smp(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1651                         MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1652 
1653 /* anycomm functions */
1654 int MPIR_Scan_allcomm_nb(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
1655                          MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1656 
1657 
1658 /******************************** Scatter ********************************/
1659 int MPIR_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
1660                  int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
1661                  MPIR_Errflag_t * errflag);
1662 int MPIR_Scatter_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
1663                       int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
1664                       MPIR_Errflag_t * errflag);
1665 
1666 /* intracomm-only functions */
1667 int MPIR_Scatter_allcomm_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1668                               void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
1669                               MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1670 int MPIR_Scatter_intra_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1671                                 void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
1672                                 MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1673 
1674 /* intercomm-only functions */
1675 int MPIR_Scatter_inter_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1676                               void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
1677                               MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1678 int MPIR_Scatter_inter_remote_send_local_scatter(const void *sendbuf, int sendcount,
1679                                                  MPI_Datatype sendtype, void *recvbuf,
1680                                                  int recvcount, MPI_Datatype recvtype, int root,
1681                                                  MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1682 
1683 /* anycomm functions */
1684 int MPIR_Scatter_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
1685                             void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
1686                             MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1687 
1688 
1689 /******************************** Scatterv ********************************/
1690 int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
1691                   MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype,
1692                   int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1693 int MPIR_Scatterv_impl(const void *sendbuf, const int *sendcounts, const int *displs,
1694                        MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype,
1695                        int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag);
1696 
1697 /* intracomm-only functions */
1698 int MPIR_Scatterv_allcomm_auto(const void *sendbuf, const int *sendcounts, const int *displs,
1699                                MPI_Datatype sendtype, void *recvbuf, int recvcount,
1700                                MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
1701                                MPIR_Errflag_t * errflag);
1702 
1703 /* intercomm-only functions */
1704 
1705 /* anycomm functions */
1706 int MPIR_Scatterv_allcomm_linear(const void *sendbuf, const int *sendcounts, const int *displs,
1707                                  MPI_Datatype sendtype, void *recvbuf, int recvcount,
1708                                  MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
1709                                  MPIR_Errflag_t * errflag);
1710 int MPIR_Scatterv_allcomm_nb(const void *sendbuf, const int *sendcounts, const int *displs,
1711                              MPI_Datatype sendtype, void *recvbuf, int recvcount,
1712                              MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
1713                              MPIR_Errflag_t * errflag);
1714 
1715 #endif /* MPIR_COLL_H_INCLUDED */
1716