Yet Another eXchange Tool 0.11.1
Loading...
Searching...
No Matches
xt_idxstripes_internal.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#ifndef XT_IDXSTRIPES_INTERNAL_H
47#define XT_IDXSTRIPES_INTERNAL_H
48
49#ifdef HAVE_CONFIG_H
50#include <config.h>
51#endif
52
53#include <stdbool.h>
54
55#include "core/ppm_visibility.h"
56#include "xt/xt_core.h"
57#include "xt/xt_idxlist.h"
58#include "xt_arithmetic_util.h"
59
62
65
68 Xt_config config);
69
72 Xt_idxlist idxvec_dst,
73 Xt_config config);
74
86xt_idxstripes_prealloc_new(const struct Xt_stripe *stripes, int num_stripes);
87
88
94
96xt_idxstripes_alloc(size_t num_stripes);
97
99xt_idxstripes_congeal(struct Xt_stripes_alloc stripes_alloc);
100
111xt_idxstripes_sort_new(size_t num_stripes,
112 const struct Xt_stripe stripes[],
113 Xt_config config);
114
115
122static inline bool
124{
125 return (((b.start == a.start + a.size)
126 | ((abs(a.size) == 1) & (b.start == a.start - a.size)))
127 & ((abs(b.size) == 1) | (isign(a.size) == isign(b.size))));
128}
129
130PPM_DSO_INTERNAL const struct Xt_stripe *
132
133PPM_DSO_INTERNAL size_t
135
136#endif
137
138/*
139 * Local Variables:
140 * c-basic-offset: 2
141 * coding: utf-8
142 * indent-tabs-mode: nil
143 * show-trailing-whitespace: t
144 * require-trailing-newline: t
145 * End:
146 */
#define PPM_DSO_INTERNAL
int size
Definition xt_core.h:97
int start
Definition xt_core.h:97
struct Xt_stripe * stripes
struct Xt_idxstripes_ * idxstripes
static int isign(int x)
base definitions header file
index list declaration
PPM_DSO_INTERNAL void xt_idxstripes_initialize(void)
PPM_DSO_INTERNAL struct Xt_stripes_alloc xt_idxstripes_alloc(size_t num_stripes)
PPM_DSO_INTERNAL void xt_idxstripes_finalize(void)
PPM_DSO_INTERNAL Xt_idxlist xt_idxstripes_sort_new(size_t num_stripes, const struct Xt_stripe stripes[], Xt_config config)
PPM_DSO_INTERNAL size_t xt_idxstripes_get_num_index_stripes(Xt_idxlist idxlist)
PPM_DSO_INTERNAL Xt_idxlist xt_idxstripes_get_idxvec_intersection(Xt_idxlist idxlist_src, Xt_idxlist idxvec_dst, Xt_config config)
PPM_DSO_INTERNAL Xt_idxlist xt_idxstripes_get_intersection(Xt_idxlist idxlist_src, Xt_idxlist idxlist_dst, Xt_config config)
PPM_DSO_INTERNAL const struct Xt_stripe * xt_idxstripes_get_index_stripes_const(Xt_idxlist idxlist)
PPM_DSO_INTERNAL Xt_idxlist xt_idxstripes_congeal(struct Xt_stripes_alloc stripes_alloc)
static bool xt_can_merge_pos_ext(struct Xt_pos_ext a, struct Xt_pos_ext b)
PPM_DSO_INTERNAL Xt_idxlist xt_idxstripes_prealloc_new(const struct Xt_stripe *stripes, int num_stripes)