Yet Another eXchange Tool 0.11.1
Loading...
Searching...
No Matches
xt_idxlist.h
Go to the documentation of this file.
1
12/*
13 * Keywords:
14 * Maintainer: Jörg Behrens <behrens@dkrz.de>
15 * Moritz Hanke <hanke@dkrz.de>
16 * Thomas Jahns <jahns@dkrz.de>
17 * URL: https://dkrz-sw.gitlab-pages.dkrz.de/yaxt/
18 *
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions are
21 * met:
22 *
23 * Redistributions of source code must retain the above copyright notice,
24 * this list of conditions and the following disclaimer.
25 *
26 * Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 *
30 * Neither the name of the DKRZ GmbH nor the names of its contributors
31 * may be used to endorse or promote products derived from this software
32 * without specific prior written permission.
33 *
34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
35 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
36 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
37 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
38 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
39 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
40 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
41 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
42 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
43 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
44 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 */
46
47#ifndef XT_IDXLIST_H
48#define XT_IDXLIST_H
49
50#ifdef HAVE_CONFIG_H
51#include <config.h>
52#endif
53
54#include <stdlib.h>
55#include "xt/xt_config.h"
56#include "xt/xt_core.h"
57#include "xt/xt_stripe.h"
58
66struct Xt_bounds {
68};
69
82void xt_idxlist_delete(Xt_idxlist idxlist);
83
101size_t xt_idxlist_get_pack_size(Xt_idxlist idxlist, MPI_Comm comm);
102
127void xt_idxlist_pack(Xt_idxlist idxlist, void* buffer, int buffer_size,
128 int* position, MPI_Comm comm);
129
147Xt_idxlist xt_idxlist_unpack(void* buffer, int buffer_size,
148 int* position, MPI_Comm comm);
149
162xt_idxlist_get_intersection(Xt_idxlist idxlist_src, Xt_idxlist idxlist_dst);
163
179 Xt_idxlist idxlist_dst, Xt_config config);
180
188
197
207
215
222void xt_idxlist_get_indices(Xt_idxlist idxlist, Xt_int *indices);
223
232
242
253 struct Xt_stripe **stripes,
254 int *num_stripes);
255
265int xt_idxlist_get_index_at_position(Xt_idxlist idxlist, int position,
266 Xt_int * index);
267
281 const int *positions,
282 int num_pos, Xt_int *indices,
283 Xt_int undef_idx);
284
297 int *position);
298
318 const Xt_int *indices,
319 int num_indices, int *positions,
320 int single_match_only);
321
344 Xt_idxlist idxlist,
345 int num_stripes,
346 const struct Xt_stripe stripes[num_stripes],
347 int *num_ext,
348 struct Xt_pos_ext **pos_ext,
349 int single_match_only);
350
351
366 int * position, int offset);
367
385/* FIXME: this should probably return the number of failed lookups */
387 const Xt_int *indices,
388 int num_indices, int * positions,
389 int * offsets);
390
398
406
419
420
434void xt_idxlist_get_bounding_box(Xt_idxlist idxlist, unsigned ndim,
435 const Xt_int global_size[ndim],
436 Xt_int global_start_index,
437 struct Xt_bounds bounds[ndim]);
438
446
455int
457
458
459#endif // XT_IDXLIST_H
460
461/*
462 * Local Variables:
463 * c-basic-offset: 2
464 * coding: utf-8
465 * indent-tabs-mode: nil
466 * show-trailing-whitespace: t
467 * require-trailing-newline: t
468 * End:
469 */
int MPI_Comm
Definition core.h:64
Xt_int start
Definition xt_idxlist.h:67
Xt_int size
Definition xt_idxlist.h:67
opaque configuration object for settings where the default needs to be overridden
base definitions header file
uint64_t Xt_uid
Definition xt_core.h:76
XT_INT Xt_int
Definition xt_core.h:72
Xt_idxlist xt_idxlist_sorted_copy(Xt_idxlist idxlist)
Definition xt_idxlist.c:99
int xt_idxlist_get_positions_of_indices(Xt_idxlist idxlist, const Xt_int *indices, int num_indices, int *positions, int single_match_only)
Definition xt_idxlist.c:221
Xt_idxlist xt_idxlist_unpack(void *buffer, int buffer_size, int *position, MPI_Comm comm)
Xt_int xt_idxlist_get_min_index(Xt_idxlist idxlist)
Definition xt_idxlist.c:349
int xt_idxlist_is_stripe_conversion_profitable(Xt_idxlist idxlist, Xt_config config)
Definition xt_idxlist.c:495
const Xt_int * xt_idxlist_get_indices_const(Xt_idxlist idxlist)
Definition xt_idxlist.c:119
int xt_idxlist_get_index_at_position(Xt_idxlist idxlist, int position, Xt_int *index)
Definition xt_idxlist.c:176
Xt_int xt_idxlist_get_max_index(Xt_idxlist idxlist)
Definition xt_idxlist.c:354
void xt_idxlist_get_indices(Xt_idxlist idxlist, Xt_int *indices)
Definition xt_idxlist.c:113
int xt_idxlist_get_positions_of_indices_off(Xt_idxlist idxlist, const Xt_int *indices, int num_indices, int *positions, int *offsets)
Definition xt_idxlist.c:314
int xt_idxlist_get_num_index_stripes(Xt_idxlist idxlist)
Definition xt_idxlist.c:129
Xt_uid xt_idxlist_get_uid(Xt_idxlist idxlist)
Definition xt_idxlist.c:472
int xt_idxlist_get_position_of_index_off(Xt_idxlist idxlist, Xt_int index, int *position, int offset)
Definition xt_idxlist.c:306
Xt_idxlist xt_idxlist_sorted_copy_custom(Xt_idxlist idxlist, Xt_config config)
Definition xt_idxlist.c:104
void xt_idxlist_pack(Xt_idxlist idxlist, void *buffer, int buffer_size, int *position, MPI_Comm comm)
Definition xt_idxlist.c:86
size_t xt_idxlist_get_pack_size(Xt_idxlist idxlist, MPI_Comm comm)
Definition xt_idxlist.c:80
int xt_idxlist_get_indices_at_positions(Xt_idxlist idxlist, const int *positions, int num_pos, Xt_int *indices, Xt_int undef_idx)
Definition xt_idxlist.c:183
Xt_idxlist xt_idxlist_get_intersection_custom(Xt_idxlist idxlist_src, Xt_idxlist idxlist_dst, Xt_config config)
void xt_idxlist_get_index_stripes(Xt_idxlist idxlist, struct Xt_stripe **stripes, int *num_stripes)
Definition xt_idxlist.c:135
void xt_idxlist_get_bounding_box(Xt_idxlist idxlist, unsigned ndim, const Xt_int global_size[ndim], Xt_int global_start_index, struct Xt_bounds bounds[ndim])
Definition xt_idxlist.c:379
int xt_idxlist_get_pos_exts_of_index_stripes(Xt_idxlist idxlist, int num_stripes, const struct Xt_stripe stripes[num_stripes], int *num_ext, struct Xt_pos_ext **pos_ext, int single_match_only)
Definition xt_idxlist.c:262
Xt_idxlist xt_idxlist_get_intersection(Xt_idxlist idxlist_src, Xt_idxlist idxlist_dst)
Xt_idxlist xt_idxlist_copy(Xt_idxlist idxlist)
Definition xt_idxlist.c:94
int xt_idxlist_get_sorting(Xt_idxlist idxlist)
Definition xt_idxlist.c:359
int xt_idxlist_get_position_of_index(Xt_idxlist idxlist, Xt_int index, int *position)
Definition xt_idxlist.c:214
void xt_idxlist_delete(Xt_idxlist idxlist)
Definition xt_idxlist.c:75
#define xt_idxlist_get_num_indices(idxlist)