Yet Another eXchange Tool  0.9.0
xt_redist.h
Go to the documentation of this file.
1 
16 /*
17  * Keywords:
18  * Maintainer: Jörg Behrens <behrens@dkrz.de>
19  * Moritz Hanke <hanke@dkrz.de>
20  * Thomas Jahns <jahns@dkrz.de>
21  * URL: https://doc.redmine.dkrz.de/yaxt/html/
22  *
23  * Redistribution and use in source and binary forms, with or without
24  * modification, are permitted provided that the following conditions are
25  * met:
26  *
27  * Redistributions of source code must retain the above copyright notice,
28  * this list of conditions and the following disclaimer.
29  *
30  * Redistributions in binary form must reproduce the above copyright
31  * notice, this list of conditions and the following disclaimer in the
32  * documentation and/or other materials provided with the distribution.
33  *
34  * Neither the name of the DKRZ GmbH nor the names of its contributors
35  * may be used to endorse or promote products derived from this software
36  * without specific prior written permission.
37  *
38  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
39  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
40  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
41  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
42  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
43  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
44  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
45  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
46  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
47  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
48  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49  */
50 
51 #ifndef XT_REDIST_H
52 #define XT_REDIST_H
53 
54 #ifdef HAVE_CONFIG_H
55 #include <config.h>
56 #endif
57 
58 #include <mpi.h>
59 
60 #include "xt/xt_core.h"
61 #include "xt/xt_request.h"
62 
63 struct Xt_redist_msg {
64 
65  int rank;
66 #if SIZEOF_MPI_DATATYPE == 2 * SIZEOF_INT
67  int padding;
68 #endif
69  MPI_Datatype datatype;
70 };
71 
82 
88 void xt_redist_delete(Xt_redist redist);
89 
105 void xt_redist_s_exchange(Xt_redist redist, int num_arrays,
106  const void **src_data, void **dst_data);
107 
125 void xt_redist_a_exchange(Xt_redist redist, int num_arrays,
126  const void **src_data, void **dst_data,
127  Xt_request *request);
128 
139 void xt_redist_s_exchange1(Xt_redist redist, const void *src_data, void *dst_data);
140 
153 void xt_redist_a_exchange1(Xt_redist redist, const void *src_data,
154  void *dst_data, Xt_request *request);
155 
164 
173 
184 MPI_Datatype xt_redist_get_send_MPI_Datatype(Xt_redist redist, int rank);
185 
196 MPI_Datatype xt_redist_get_recv_MPI_Datatype(Xt_redist redist, int rank);
197 
204 
205 #endif // XT_REDIST_H
206 
207 /*
208  * Local Variables:
209  * c-basic-offset: 2
210  * coding: utf-8
211  * indent-tabs-mode: nil
212  * show-trailing-whitespace: t
213  * require-trailing-newline: t
214  * End:
215  */
int MPI_Comm
Definition: core.h:64
MPI_Datatype datatype
Definition: xt_redist.h:69
base definitions header file
MPI_Datatype xt_redist_get_recv_MPI_Datatype(Xt_redist redist, int rank)
Definition: xt_redist.c:112
void xt_redist_delete(Xt_redist redist)
Definition: xt_redist.c:68
int xt_redist_get_num_recv_msg(Xt_redist redist)
Definition: xt_redist.c:102
int xt_redist_get_num_send_msg(Xt_redist redist)
Definition: xt_redist.c:97
void xt_redist_a_exchange1(Xt_redist redist, const void *src_data, void *dst_data, Xt_request *request)
Definition: xt_redist.c:91
Xt_redist xt_redist_copy(Xt_redist redist)
Definition: xt_redist.c:63
MPI_Comm xt_redist_get_MPI_Comm(Xt_redist redist)
Definition: xt_redist.c:123
MPI_Datatype xt_redist_get_send_MPI_Datatype(Xt_redist redist, int rank)
Definition: xt_redist.c:107
void xt_redist_a_exchange(Xt_redist redist, int num_arrays, const void **src_data, void **dst_data, Xt_request *request)
Definition: xt_redist.c:79
void xt_redist_s_exchange(Xt_redist redist, int num_arrays, const void **src_data, void **dst_data)
Definition: xt_redist.c:73
void xt_redist_s_exchange1(Xt_redist redist, const void *src_data, void *dst_data)
Definition: xt_redist.c:86