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_Send_init_cdesc(CFI_cdesc_t * x0,int x1,MPI_Datatype x2,int x3,int x4,MPI_Comm x5,MPI_Request * x6)11 int MPIR_Send_init_cdesc(CFI_cdesc_t* x0, int x1, MPI_Datatype x2, int x3, int x4, MPI_Comm x5, MPI_Request * x6)
12 {
13     int err = MPI_SUCCESS;
14     void *buf0 = x0->base_addr;
15     int count0 = x1;
16     MPI_Datatype dtype0 = x2;
17 
18     if (buf0 == &MPIR_F08_MPI_BOTTOM) {
19         buf0 = MPI_BOTTOM;
20     }
21 
22     if (x0->rank != 0 && !CFI_is_contiguous(x0)) {
23         err = cdesc_create_datatype(x0, x1, x2, &dtype0);
24         count0 = 1;
25     }
26 
27     err = MPI_Send_init(buf0, count0, dtype0, x3, x4, x5, x6);
28 
29     if (dtype0 != x2)  MPI_Type_free(&dtype0);
30     return err;
31 }
32