Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
track all the useless void
[simgrid.git] / src / include / smpi / smpi_interface.h
1 /* Copyright (c) 2012-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef _SMPI_INTERFACE_H
8 #define _SMPI_INTERFACE_H
9 #include "smpi/smpi.h"
10
11 SG_BEGIN_DECL()
12
13 /** \brief MPI collective description */
14
15 struct mpi_coll_description {
16   const char *name;
17   const char *description;
18   void *coll;
19 };
20 typedef struct mpi_coll_description  s_mpi_coll_description_t;
21 typedef struct mpi_coll_description* mpi_coll_description_t;
22
23 /** \ingroup MPI gather
24  *  \brief The list of all available allgather collectives
25  */
26 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_gather_description[];
27 XBT_PUBLIC_DATA(int (*mpi_coll_gather_fun)(void *, int, MPI_Datatype, void *, int, MPI_Datatype, int, MPI_Comm));
28                  
29 /** \ingroup MPI allgather
30  *  \brief The list of all available allgather collectives
31  */
32 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgather_description[];
33 XBT_PUBLIC_DATA(int (*mpi_coll_allgather_fun) (void *, int, MPI_Datatype, void *, int, MPI_Datatype, MPI_Comm));
34
35 /** \ingroup MPI allgather
36  *  \brief The list of all available allgather collectives
37  */
38 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgatherv_description[];
39 XBT_PUBLIC_DATA(int (*mpi_coll_allgatherv_fun) (void *, int, MPI_Datatype, void *, int*, int*, MPI_Datatype, MPI_Comm));
40
41 /** \ingroup MPI allreduce
42  *  \brief The list of all available allgather collectives
43  */
44 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allreduce_description[];
45 XBT_PUBLIC_DATA(int (*mpi_coll_allreduce_fun)(void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype,MPI_Op op,
46                 MPI_Comm comm));
47
48 /** \ingroup MPI alltoall
49  *  \brief The list of all available alltoall collectives
50  */
51 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoall_description[];
52 XBT_PUBLIC_DATA(int (*mpi_coll_alltoall_fun)(void *, int, MPI_Datatype, void *, int, MPI_Datatype, MPI_Comm));
53
54 /** \ingroup MPI alltoallv
55  *  \brief The list of all available alltoallv collectives
56  */
57 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoallv_description[];
58 XBT_PUBLIC_DATA(int (*mpi_coll_alltoallv_fun)(void *, int*, int*, MPI_Datatype, void *, int*, int*, MPI_Datatype,
59                 MPI_Comm));
60
61 /** \ingroup MPI bcast
62  *  \brief The list of all available bcast collectives
63  */
64 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_bcast_description[];
65 XBT_PUBLIC_DATA(int (*mpi_coll_bcast_fun)(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm com));
66
67 /** \ingroup MPI reduce
68  *  \brief The list of all available reduce collectives
69  */
70 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_description[];
71 XBT_PUBLIC_DATA(int (*mpi_coll_reduce_fun)(void *buf, void *rbuf, int count, MPI_Datatype datatype,
72                 MPI_Op op, int root, MPI_Comm comm));
73
74 /** \ingroup MPI reduce_scatter
75  *  \brief The list of all available allgather collectives
76  */
77 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_scatter_description[];
78 XBT_PUBLIC_DATA(int (*mpi_coll_reduce_scatter_fun) (void *sbuf, void *rbuf, int *rcounts,
79                  MPI_Datatype dtype, MPI_Op op,MPI_Comm comm));
80
81 /** \ingroup MPI scatter
82  *  \brief The list of all available allgather collectives
83  */
84 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_scatter_description[];
85 XBT_PUBLIC_DATA(int (*mpi_coll_scatter_fun)(void *sendbuf, int sendcount, MPI_Datatype sendtype,
86                 void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
87
88 /** \ingroup MPI barrier
89  *  \brief The list of all available allgather collectives
90  */
91 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_barrier_description[];
92 XBT_PUBLIC_DATA(int (*mpi_coll_barrier_fun)(MPI_Comm comm));
93
94 XBT_PUBLIC(void) coll_help(const char *category, s_mpi_coll_description_t * table);
95 XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table, char *name, const char *desc);
96
97 XBT_PUBLIC_DATA(void) (*smpi_coll_cleanup_callback)();
98 XBT_PUBLIC(void) smpi_coll_cleanup_mvapich2();
99
100 SG_END_DECL()
101
102 #endif                          /* _SMPI_INTERFAC_H */