Polly 19.0.0git
isl_aff_lex_templ.c
Go to the documentation of this file.
1/*
2 * Copyright 2014 INRIA Rocquencourt
3 *
4 * Use of this software is governed by the MIT license
5 *
6 * Written by Sven Verdoolaege,
7 * Inria Paris - Rocquencourt, Domaine de Voluceau - Rocquencourt,
8 * B.P. 105 - 78153 Le Chesnay, France
9 */
10
11#define xFN(TYPE,NAME) TYPE ## _ ## NAME
12#define FN(TYPE,NAME) xFN(TYPE,NAME)
13
14/* Return a map containing pairs of elements in the domains of "mpa1" and "mpa2"
15 * where the function value of "mpa1" lexicographically compares as "ORDER"
16 * to that of "mpa2". "space" is the space of the result.
17 * The parameters of "mpa1" and "mpa2" are assumed to have been aligned.
18 *
19 * "mpa1" is in the given lexicographic order compared to "mpa2"
20 * if, for some i, the i-th element of "mpa1" is in that order compared to
21 * the i-th element of "mpa2" while all previous elements are
22 * pairwise equal, where the order needs to be strict (not-equal)
23 * if i corresponds to anything but the last element.
24 * The strict version of "ORDER" is defined by "STRICT_ORDER",
25 * which is the same if "ORDER" itself is strict.
26 */
27static __isl_give isl_map *FN(FN(isl_multi_pw_aff_lex,ORDER),map_on_space)(
29 __isl_take isl_space *space)
30{
31 return isl_multi_pw_aff_lex_map_on_space(mpa1, mpa2,
33 &FN(FN(isl_pw_aff,ORDER),map), space);
34}
35
36/* Return a map containing pairs of elements in the domains of "mpa1" and "mpa2"
37 * where the function value of "mpa1" lexicographically compares as "ORDER"
38 * to that of "mpa2".
39 */
40__isl_give isl_map *FN(FN(isl_multi_pw_aff_lex,ORDER),map)(
42{
43 return isl_multi_pw_aff_order_map(mpa1, mpa2,
44 &FN(FN(isl_multi_pw_aff_lex,ORDER),map_on_space));
45}
46
47/* Return the subset of "map" where the domain and the range
48 * have "mpa" values that lexicographically compare as "ORDER".
49 */
50__isl_give isl_map *FN(FN(isl_map_lex,ORDER),at_multi_pw_aff)(
52{
54 &FN(FN(isl_multi_pw_aff_lex,ORDER),map));
55}
struct isl_multi_pw_aff isl_multi_pw_aff
Definition: aff_type.h:43
#define __isl_take
Definition: ctx.h:22
#define __isl_give
Definition: ctx.h:19
#define __isl_keep
Definition: ctx.h:25
#define STRICT_ORDER
Definition: isl_aff.c:7599
static __isl_give isl_map * isl_multi_pw_aff_lex_map_on_space(__isl_keep isl_multi_pw_aff *mpa1, __isl_keep isl_multi_pw_aff *mpa2, __isl_give isl_map *(*strict_base)(__isl_take isl_pw_aff *pa1, __isl_take isl_pw_aff *pa2), __isl_give isl_map *(*base)(__isl_take isl_pw_aff *pa1, __isl_take isl_pw_aff *pa2), __isl_take isl_space *space)
Definition: isl_aff.c:7534
static __isl_give isl_map * isl_map_order_at_multi_pw_aff(__isl_take isl_map *map, __isl_take isl_multi_pw_aff *mpa, __isl_give isl_map *(*order)(__isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2))
Definition: isl_aff.c:7501
#define ORDER
Definition: isl_aff.c:7597
static __isl_give isl_map * isl_multi_pw_aff_order_map(__isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2, __isl_give isl_map *(*order)(__isl_keep isl_multi_pw_aff *mpa1, __isl_keep isl_multi_pw_aff *mpa2, __isl_take isl_space *space))
Definition: isl_aff.c:7419
#define FN(TYPE, NAME)
const char * map
Definition: isl_test.c:1783