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_Sendrecv_cdesc(CFI_cdesc_t * x0,int x1,MPI_Datatype x2,int x3,int x4,CFI_cdesc_t * x5,int x6,MPI_Datatype x7,int x8,int x9,MPI_Comm x10,MPI_Status * x11)11 int MPIR_Sendrecv_cdesc(CFI_cdesc_t* x0, int x1, MPI_Datatype x2, int x3, int x4, CFI_cdesc_t* x5, int x6, MPI_Datatype x7, int x8, int x9, MPI_Comm x10, MPI_Status * x11)
12 {
13     int err = MPI_SUCCESS;
14     void *buf0 = x0->base_addr;
15     int count0 = x1;
16     MPI_Datatype dtype0 = x2;
17     void *buf5 = x5->base_addr;
18     int count5 = x6;
19     MPI_Datatype dtype5 = x7;
20 
21     if (buf0 == &MPIR_F08_MPI_BOTTOM) {
22         buf0 = MPI_BOTTOM;
23     }
24 
25     if (buf5 == &MPIR_F08_MPI_BOTTOM) {
26         buf5 = 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 (x5->rank != 0 && !CFI_is_contiguous(x5)) {
35         err = cdesc_create_datatype(x5, x6, x7, &dtype5);
36         count5 = 1;
37     }
38 
39     err = MPI_Sendrecv(buf0, count0, dtype0, x3, x4, buf5, count5, dtype5, x8, x9, x10, x11);
40 
41     if (dtype0 != x2)  MPI_Type_free(&dtype0);
42     if (dtype5 != x7)  MPI_Type_free(&dtype5);
43     return err;
44 }
45