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_Igather_cdesc(CFI_cdesc_t * x0,int x1,MPI_Datatype x2,CFI_cdesc_t * x3,int x4,MPI_Datatype x5,int x6,MPI_Comm x7,MPI_Request * x8)11 int MPIR_Igather_cdesc(CFI_cdesc_t* x0, int x1, MPI_Datatype x2, CFI_cdesc_t* x3, int x4, MPI_Datatype x5, int x6, MPI_Comm x7, MPI_Request * x8)
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     } else if (buf0 == &MPIR_F08_MPI_IN_PLACE) {
24         buf0 = MPI_IN_PLACE;
25     }
26 
27     if (buf3 == &MPIR_F08_MPI_BOTTOM) {
28         buf3 = MPI_BOTTOM;
29     }
30 
31     if (x0->rank != 0 && !CFI_is_contiguous(x0)) {
32         err = cdesc_create_datatype(x0, x1, x2, &dtype0);
33         count0 = 1;
34     }
35 
36     if (x3->rank != 0 && !CFI_is_contiguous(x3)) {
37         err = cdesc_create_datatype(x3, x4, x5, &dtype3);
38         count3 = 1;
39     }
40 
41     err = MPI_Igather(buf0, count0, dtype0, buf3, count3, dtype3, x6, x7, x8);
42 
43     if (dtype0 != x2)  MPI_Type_free(&dtype0);
44     if (dtype3 != x5)  MPI_Type_free(&dtype3);
45     return err;
46 }
47