Polly 20.0.0git
isl_multi_no_explicit_domain.c
Go to the documentation of this file.
1/*
2 * Copyright 2017 Sven Verdoolaege
3 *
4 * Use of this software is governed by the MIT license
5 *
6 * Written by Sven Verdoolaege.
7 */
8
9/* These versions of the explicit domain functions are used
10 * when the multi expression cannot have an explicit domain.
11 */
12
13#include <isl/space.h>
14
15#include <isl_multi_macro.h>
16
17/* Does "multi" have an explicit domain?
18 *
19 * No.
20 */
21static int FN(MULTI(BASE),has_explicit_domain)(__isl_keep MULTI(BASE) *multi)
22{
23 return 0;
24}
25
26/* Initialize the explicit domain of "multi".
27 * "multi" cannot have an explicit domain, so this function is never called.
28 */
29static __isl_give MULTI(BASE) *FN(MULTI(BASE),init_explicit_domain)(
30 __isl_take MULTI(BASE) *multi)
31{
32 return multi;
33}
34
35/* Intersect the domain of "dst" with the explicit domain of "src".
36 * "src" cannot have an explicit domain, so this function is never called.
37 */
40{
41 return dst;
42}
43
44/* Set the explicit domain of "dst" to that of "src".
45 * "src" and "dst" cannot have an explicit domain,
46 * so this function is never called.
47 */
48static __isl_give MULTI(BASE) *FN(MULTI(BASE),copy_explicit_domain)(
50{
51 return dst;
52}
53
54/* Only used by multi-expressions that include "isl_multi_product_templ.c".
55 */
56static __isl_give MULTI(BASE) *
57FN(MULTI(BASE),intersect_explicit_domain_product)(
59 __isl_keep MULTI(BASE) *src2) __attribute__ ((unused));
60
61/* Intersect the domain of "dst" with the domain product
62 * of the explicit domains of "src1" and "src2".
63 * This function is only called if at least one of "src1" or "src2"
64 * has an explicit domain.
65 * "src1", "src2" and "dst" cannot have an explicit domain,
66 * so this function is never called.
67 */
68static __isl_give MULTI(BASE) *
69FN(MULTI(BASE),intersect_explicit_domain_product)(
71 __isl_keep MULTI(BASE) *src2)
72{
73 return dst;
74}
75
76/* Align the parameters of the explicit domain of "multi" to those of "space".
77 * "multi" cannot have an explicit domain, so this function is never called.
78 */
79static __isl_give MULTI(BASE) *FN(MULTI(BASE),align_explicit_domain_params)(
81{
82 isl_space_free(space);
83 return multi;
84}
85
86/* Replace the space of the explicit domain of "multi" by "space",
87 * without modifying its dimension.
88 * "multi" cannot have an explicit domain, so this function is never called.
89 */
90static __isl_give MULTI(BASE) *FN(MULTI(BASE),reset_explicit_domain_space)(
92{
93 isl_space_free(space);
94 return multi;
95}
96
97/* Check whether the explicit domain of "multi" has non-zero coefficients
98 * for any dimension in the given range or if any of these dimensions appear
99 * with non-zero coefficients in any of the integer divisions involved.
100 * "multi" cannot have an explicit domain, so this function is never called.
101 */
102isl_bool FN(MULTI(BASE),involves_explicit_domain_dims)(
103 __isl_keep MULTI(BASE) *multi,
104 enum isl_dim_type type, unsigned pos, unsigned n)
105{
106 return isl_bool_false;
107}
108
109/* Insert "n" dimensions of type "type" at position "pos"
110 * of the explicit domain of "multi".
111 * "multi" cannot have an explicit domain, so this function is never called.
112 */
113__isl_give MULTI(BASE) *FN(MULTI(BASE),insert_explicit_domain_dims)(
114 __isl_take MULTI(BASE) *multi,
115 enum isl_dim_type type, unsigned pos, unsigned n)
116{
117 return multi;
118}
119
120/* Drop the "n" dimensions of type "type" starting at position "pos"
121 * of the explicit domain of "multi".
122 * "multi" cannot have an explicit domain, so this function is never called.
123 */
124__isl_give MULTI(BASE) *FN(MULTI(BASE),drop_explicit_domain_dims)(
125 __isl_take MULTI(BASE) *multi,
126 enum isl_dim_type type, unsigned pos, unsigned n)
127{
128 return multi;
129}
130
131/* Move the "n" dimensions of "src_type" starting at "src_pos" of
132 * of the explicit domain of "multi" to dimensions of "dst_type" at "dst_pos".
133 * "multi" cannot have an explicit domain, so this function is never called.
134 */
135__isl_give MULTI(BASE) *FN(MULTI(BASE),move_explicit_domain_dims)(
136 __isl_take MULTI(BASE) *multi,
137 enum isl_dim_type dst_type, unsigned dst_pos,
138 enum isl_dim_type src_type, unsigned src_pos, unsigned n)
139{
140 return multi;
141}
142
143/* Free the explicit domain of "multi".
144 * "multi" cannot have an explicit domain, so this function is never called.
145 */
146static void FN(MULTI(BASE),free_explicit_domain)(__isl_keep MULTI(BASE) *multi)
147{
148}
149
150/* Do "multi1" and "multi2" have the same explicit domain?
151 * "multi1" and "multi2" cannot have an explicit domain,
152 * so this function is never called.
153 */
154static isl_bool FN(MULTI(BASE),equal_explicit_domain)(
155 __isl_keep MULTI(BASE) *multi1, __isl_keep MULTI(BASE) *multi2)
156{
157 return isl_bool_true;
158}
159
160static isl_stat FN(MULTI(BASE),check_explicit_domain)(
161 __isl_keep MULTI(BASE) *multi) __attribute__ ((unused));
162
163/* Debugging function to check that the explicit domain of "multi"
164 * has the correct space.
165 * "multi" cannot have an explicit domain,
166 * so this function should never be called.
167 */
168static isl_stat FN(MULTI(BASE),check_explicit_domain)(
169 __isl_keep MULTI(BASE) *multi)
170{
171 return isl_stat_ok;
172}
#define FN(TYPE, NAME)
#define __isl_take
Definition: ctx.h:22
isl_stat
Definition: ctx.h:84
@ isl_stat_ok
Definition: ctx.h:86
#define __isl_give
Definition: ctx.h:19
#define __isl_keep
Definition: ctx.h:25
isl_bool
Definition: ctx.h:89
@ isl_bool_false
Definition: ctx.h:91
@ isl_bool_true
Definition: ctx.h:92
#define BASE
Definition: flow_cmp.c:49
#define __attribute__(x)
static unsigned pos(__isl_keep isl_space *space, enum isl_dim_type type)
Definition: isl_map.c:70
#define MULTI(BASE)
enum isl_fold type
Definition: isl_test.c:4017
static __isl_give isl_union_map * intersect_explicit_domain(__isl_take isl_union_map *umap, __isl_keep isl_multi_union_pw_aff *mupa)
__isl_null isl_space * isl_space_free(__isl_take isl_space *space)
Definition: isl_space.c:445
isl_dim_type
Definition: space_type.h:13
n
Definition: youcefn.c:8