This source file includes following definitions.
- ompi_type_create_hindexed_block_f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #include "ompi_config.h"
16
17 #include "ompi/mpi/fortran/mpif-h/bindings.h"
18
19 #if OMPI_BUILD_MPI_PROFILING
20 #if OPAL_HAVE_WEAK_SYMBOLS
21 #pragma weak PMPI_TYPE_CREATE_HINDEXED_BLOCK = ompi_type_create_hindexed_block_f
22 #pragma weak pmpi_type_create_hindexed_block = ompi_type_create_hindexed_block_f
23 #pragma weak pmpi_type_create_hindexed_block_ = ompi_type_create_hindexed_block_f
24 #pragma weak pmpi_type_create_hindexed_block__ = ompi_type_create_hindexed_block_f
25
26 #pragma weak PMPI_Type_create_hindexed_block_f = ompi_type_create_hindexed_block_f
27 #pragma weak PMPI_Type_create_hindexed_block_f08 = ompi_type_create_hindexed_block_f
28 #else
29 OMPI_GENERATE_F77_BINDINGS (PMPI_TYPE_CREATE_HINDEXED_BLOCK,
30 pmpi_type_create_hindexed_block,
31 pmpi_type_create_hindexed_block_,
32 pmpi_type_create_hindexed_block__,
33 pompi_type_create_hindexed_block_f,
34 (MPI_Fint *count, MPI_Fint *blocklength, MPI_Aint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr),
35 (count, blocklength, array_of_displacements, oldtype, newtype, ierr) )
36 #endif
37 #endif
38
39 #if OPAL_HAVE_WEAK_SYMBOLS
40 #pragma weak MPI_TYPE_CREATE_HINDEXED_BLOCK = ompi_type_create_hindexed_block_f
41 #pragma weak mpi_type_create_hindexed_block = ompi_type_create_hindexed_block_f
42 #pragma weak mpi_type_create_hindexed_block_ = ompi_type_create_hindexed_block_f
43 #pragma weak mpi_type_create_hindexed_block__ = ompi_type_create_hindexed_block_f
44
45 #pragma weak MPI_Type_create_hindexed_block_f = ompi_type_create_hindexed_block_f
46 #pragma weak MPI_Type_create_hindexed_block_f08 = ompi_type_create_hindexed_block_f
47 #else
48 #if ! OMPI_BUILD_MPI_PROFILING
49 OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_HINDEXED_BLOCK,
50 mpi_type_create_hindexed_block,
51 mpi_type_create_hindexed_block_,
52 mpi_type_create_hindexed_block__,
53 ompi_type_create_hindexed_block_f,
54 (MPI_Fint *count, MPI_Fint *blocklength, MPI_Aint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr),
55 (count, blocklength, array_of_displacements, oldtype, newtype, ierr) )
56 #else
57 #define ompi_type_create_hindexed_block_f pompi_type_create_hindexed_block_f
58 #endif
59 #endif
60
61
62 void ompi_type_create_hindexed_block_f(MPI_Fint *count, MPI_Fint *blocklength,
63 MPI_Aint *array_of_displacements,
64 MPI_Fint *oldtype, MPI_Fint *newtype,
65 MPI_Fint *ierr)
66 {
67 int c_ierr;
68 MPI_Datatype c_old = PMPI_Type_f2c(*oldtype);
69 MPI_Datatype c_new;
70
71 c_ierr = PMPI_Type_create_hindexed_block(OMPI_FINT_2_INT(*count),
72 OMPI_FINT_2_INT(*blocklength),
73 array_of_displacements,
74 c_old, &c_new);
75 if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
76
77 if (MPI_SUCCESS == c_ierr) {
78 *newtype = PMPI_Type_c2f(c_new);
79 }
80 }
81