Yet Another eXchange Tool 0.11.1
Loading...
Searching...
No Matches
xt_xmap_dist_dir_common.h
Go to the documentation of this file.
1
14/*
15 * Keywords:
16 * Maintainer: Jörg Behrens <behrens@dkrz.de>
17 * Moritz Hanke <hanke@dkrz.de>
18 * Thomas Jahns <jahns@dkrz.de>
19 * URL: https://dkrz-sw.gitlab-pages.dkrz.de/yaxt/
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions are
23 * met:
24 *
25 * Redistributions of source code must retain the above copyright notice,
26 * this list of conditions and the following disclaimer.
27 *
28 * Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 *
32 * Neither the name of the DKRZ GmbH nor the names of its contributors
33 * may be used to endorse or promote products derived from this software
34 * without specific prior written permission.
35 *
36 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
37 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
38 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
39 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
40 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
41 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
42 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
43 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
44 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
45 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
46 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47 */
48#ifndef XT_XMAP_DIST_DIR_COMMON_H
49#define XT_XMAP_DIST_DIR_COMMON_H
50
51#ifdef HAVE_CONFIG_H
52#include <config.h>
53#endif
54
55#include <stdbool.h>
56
57#include "core/ppm_visibility.h"
58#include "xt/xt_idxlist.h"
60
61#define MIN(a,b) (((a)<(b))?(a):(b))
62#define MAX(a,b) (((a)>(b))?(a):(b))
63
64struct dist_dir {
67};
68
70 struct dist_dir *src, *dst;
71};
72
75
77xt_com_list_rank_cmp(const void *a_, const void *b_);
78
80 size_t bytes, num_msg;
81};
82
99 void *restrict send_buffer,
100 size_t send_size_asize, size_t send_size_entry,
101 int tag, MPI_Comm comm, int rank_lim,
102 MPI_Request requests[],
103 const int send_size[rank_lim][send_size_asize]);
104
105
110
111struct isect
112{
113 int rank[2];
115};
116
118xt_xmdd_cmp_isect_src_rank(const void *a_, const void *b_);
120xt_xmdd_cmp_isect_dst_rank(const void *a_, const void *b_);
121
122
123PPM_DSO_INTERNAL size_t
124xt_xmap_dist_dir_match_src_dst(const struct dist_dir *src_dist_dir,
125 const struct dist_dir *dst_dist_dir,
126 struct isect **src_dst_intersections,
127 Xt_config config);
128
129PPM_DSO_INTERNAL size_t
131 enum xt_xmdd_direction target,
132 size_t num_intersections,
133 const struct isect *restrict src_dst_intersections,
134 bool isect_idxlist_delete,
135 size_t send_size_asize, size_t send_size_idx,
136 int (*send_size)[send_size_asize],
137 unsigned char *buffer, size_t buf_size, size_t *ofs, MPI_Comm comm);
138
139
141xt_xmap_dist_dir_same_rank_merge(struct dist_dir **dist_dir_results);
142
143
144#endif
145
146/*
147 * Local Variables:
148 * c-basic-offset: 2
149 * coding: utf-8
150 * indent-tabs-mode: nil
151 * show-trailing-whitespace: t
152 * require-trailing-newline: t
153 * End:
154 */
int MPI_Comm
Definition core.h:64
#define PPM_DSO_INTERNAL
struct dist_dir * dst
struct dist_dir * src
struct Xt_com_list entries[]
Xt_idxlist idxlist
index list declaration
PPM_DSO_INTERNAL size_t xt_xmap_dist_dir_pack_intersections(enum xt_xmdd_direction target, size_t num_intersections, const struct isect *restrict src_dst_intersections, bool isect_idxlist_delete, size_t send_size_asize, size_t send_size_idx, int(*send_size)[send_size_asize], unsigned char *buffer, size_t buf_size, size_t *ofs, MPI_Comm comm)
PPM_DSO_INTERNAL void xt_xmap_dist_dir_same_rank_merge(struct dist_dir **dist_dir_results)
@ xt_xmdd_direction_dst
@ xt_xmdd_direction_src
PPM_DSO_INTERNAL int xt_xmdd_cmp_isect_dst_rank(const void *a_, const void *b_)
PPM_DSO_INTERNAL struct Xt_xmdd_txstat xt_xmap_dist_dir_send_intersections(void *restrict send_buffer, size_t send_size_asize, size_t send_size_entry, int tag, MPI_Comm comm, int rank_lim, MPI_Request requests[], const int send_size[rank_lim][send_size_asize])
initiate sends of packed index lists
PPM_DSO_INTERNAL void xt_xmdd_free_dist_dirs(struct dist_dir_pair dist_dirs)
PPM_DSO_INTERNAL size_t xt_xmap_dist_dir_match_src_dst(const struct dist_dir *src_dist_dir, const struct dist_dir *dst_dist_dir, struct isect **src_dst_intersections, Xt_config config)
PPM_DSO_INTERNAL int xt_xmdd_cmp_isect_src_rank(const void *a_, const void *b_)
PPM_DSO_INTERNAL int xt_com_list_rank_cmp(const void *a_, const void *b_)