1 /*
2 * Copyright (C) by Argonne National Laboratory
3 * See COPYRIGHT in top-level directory
4 *
5 * This file is automatically generated by buildiface
6 * DO NOT EDIT
7 */
8
9 #include "cdesc.h"
10
MPIR_Neighbor_alltoall_cdesc(CFI_cdesc_t * x0,int x1,MPI_Datatype x2,CFI_cdesc_t * x3,int x4,MPI_Datatype x5,MPI_Comm x6)11 int MPIR_Neighbor_alltoall_cdesc(CFI_cdesc_t* x0, int x1, MPI_Datatype x2, CFI_cdesc_t* x3, int x4, MPI_Datatype x5, MPI_Comm x6)
12 {
13 int err = MPI_SUCCESS;
14 void *buf0 = x0->base_addr;
15 int count0 = x1;
16 MPI_Datatype dtype0 = x2;
17 void *buf3 = x3->base_addr;
18 int count3 = x4;
19 MPI_Datatype dtype3 = x5;
20
21 if (buf0 == &MPIR_F08_MPI_BOTTOM) {
22 buf0 = MPI_BOTTOM;
23 }
24
25 if (buf3 == &MPIR_F08_MPI_BOTTOM) {
26 buf3 = MPI_BOTTOM;
27 }
28
29 if (x0->rank != 0 && !CFI_is_contiguous(x0)) {
30 err = cdesc_create_datatype(x0, x1, x2, &dtype0);
31 count0 = 1;
32 }
33
34 if (x3->rank != 0 && !CFI_is_contiguous(x3)) {
35 err = cdesc_create_datatype(x3, x4, x5, &dtype3);
36 count3 = 1;
37 }
38
39 err = MPI_Neighbor_alltoall(buf0, count0, dtype0, buf3, count3, dtype3, x6);
40
41 if (dtype0 != x2) MPI_Type_free(&dtype0);
42 if (dtype3 != x5) MPI_Type_free(&dtype3);
43 return err;
44 }
45