Yet Another eXchange Tool 0.11.2
Loading...
Searching...
No Matches
quicksort.h
Go to the documentation of this file.
1#ifndef XT_QUICKSORT_H
2#define XT_QUICKSORT_H
3
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://dkrz-sw.gitlab-pages.dkrz.de/yaxt/
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#ifdef HAVE_CONFIG_H
51#include <config.h>
52#endif
53
54#include <stdlib.h>
55
56#include <xt/sort_common.h>
57
63void xt_quicksort_int(int a[], size_t n);
64
70void xt_quicksort_xt_int(Xt_int a[], size_t n);
71
77void xt_quicksort_idxpos(idxpos_type v[], size_t n);
78
86void xt_quicksort_index(Xt_int *restrict a, int n, int *restrict idx,
87 int reset_index);
88
97void
99 int *restrict permutation);
100
109void
110xt_quicksort_int_permutation(int *restrict a, size_t n, int *restrict permutation);
111
112#endif /* XT_QUICKSORT_H */
113
114/*
115 * Local Variables:
116 * c-basic-offset: 2
117 * coding: utf-8
118 * indent-tabs-mode: nil
119 * show-trailing-whitespace: t
120 * require-trailing-newline: t
121 * End:
122 */
void xt_quicksort_xt_int_permutation(Xt_int *restrict a, size_t n, int *restrict permutation)
void xt_quicksort_int(int a[], size_t n)
void xt_quicksort_index(Xt_int *restrict a, int n, int *restrict idx, int reset_index)
Definition quicksort.c:71
void xt_quicksort_xt_int(Xt_int a[], size_t n)
void xt_quicksort_int_permutation(int *restrict a, size_t n, int *restrict permutation)
void xt_quicksort_idxpos(idxpos_type v[], size_t n)
struct idxpos_struct idxpos_type
XT_INT Xt_int
Definition xt_core.h:72