Polly 23.0.0git
isl_box.c
Go to the documentation of this file.
1/*
2 * Copyright 2010-2011 INRIA Saclay
3 * Copyright 2012-2013 Ecole Normale Superieure
4 *
5 * Use of this software is governed by the MIT license
6 *
7 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
8 * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
9 * 91893 Orsay, France
10 * and Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France
11 */
12
13#include <isl/val.h>
14#include <isl/space.h>
15#include <isl_map_private.h>
16#include <isl_aff_private.h>
17#include <isl/constraint.h>
18#include <isl/ilp.h>
19#include <isl/fixed_box.h>
20#include <isl/stream.h>
21
22/* Representation of a box of fixed size containing the elements
23 * [offset, offset + size).
24 * "size" lives in the target space of "offset".
25 *
26 * If any of the "offsets" is NaN, then the object represents
27 * the failure of finding a fixed-size box.
28 */
33
34/* Free "box" and return NULL.
35 */
37{
38 if (!box)
39 return NULL;
40 isl_multi_aff_free(box->offset);
41 isl_multi_val_free(box->size);
42 free(box);
43 return NULL;
44}
45
46/* Construct an isl_fixed_box with the given offset and size.
47 */
50{
51 isl_ctx *ctx;
52 isl_fixed_box *box;
53
54 if (!offset || !size)
55 goto error;
56 ctx = isl_multi_aff_get_ctx(offset);
57 box = isl_alloc_type(ctx, struct isl_fixed_box);
58 if (!box)
59 goto error;
60 box->offset = offset;
61 box->size = size;
62
63 return box;
64error:
65 isl_multi_aff_free(offset);
66 isl_multi_val_free(size);
67 return NULL;
68}
69
70/* Construct an initial isl_fixed_box with zero offsets
71 * in the given space and zero corresponding sizes.
72 */
74 __isl_take isl_space *space)
75{
77 isl_multi_val *size;
78
79 offset = isl_multi_aff_zero(isl_space_copy(space));
81 size = isl_multi_val_zero(space);
82 return isl_fixed_box_alloc(offset, size);
83}
84
85/* Return a copy of "box".
86 */
96
97/* Replace the offset and size in direction "pos" by "offset" and "size"
98 * (without checking whether "box" is a valid box).
99 */
102 __isl_keep isl_val *size)
103{
104 if (!box)
105 return NULL;
106 box->offset = isl_multi_aff_set_aff(box->offset, pos,
108 box->size = isl_multi_val_set_val(box->size, pos, isl_val_copy(size));
109 if (!box->offset || !box->size)
110 return isl_fixed_box_free(box);
111 return box;
112}
113
114/* Replace the offset and size in direction "pos" by "offset" and "size",
115 * if "box" is a valid box.
116 */
119 __isl_keep isl_val *size)
120{
121 isl_bool valid;
122
123 valid = isl_fixed_box_is_valid(box);
124 if (valid < 0 || !valid)
125 return box;
126 return isl_fixed_box_set_extent(box, pos, offset, size);
127}
128
129/* Replace "box" by an invalid box, by setting all offsets to NaN
130 * (and all sizes to infinity).
131 */
134{
135 int i;
136 isl_size n;
137 isl_space *space;
138 isl_val *infty;
139 isl_aff *nan;
140
141 if (!box)
142 return NULL;
143 n = isl_multi_val_dim(box->size, isl_dim_set);
144 if (n < 0)
145 return isl_fixed_box_free(box);
146
150 for (i = 0; i < n; ++i)
151 box = isl_fixed_box_set_extent(box, i, nan, infty);
152 isl_aff_free(nan);
153 isl_val_free(infty);
154
155 if (!box->offset || !box->size)
156 return isl_fixed_box_free(box);
157 return box;
158}
159
160/* Project the domain of the fixed box onto its parameter space.
161 * In particular, project out the domain of the offset.
162 */
165{
166 isl_bool valid;
167
168 valid = isl_fixed_box_is_valid(box);
169 if (valid < 0)
170 return isl_fixed_box_free(box);
171 if (!valid)
172 return box;
173
174 box->offset = isl_multi_aff_project_domain_on_params(box->offset);
175 if (!box->offset)
176 return isl_fixed_box_free(box);
177
178 return box;
179}
180
181/* Return the isl_ctx to which "box" belongs.
182 */
184{
185 if (!box)
186 return NULL;
187 return isl_multi_aff_get_ctx(box->offset);
188}
189
190/* Return the space in which "box" lives.
191 */
193{
194 if (!box)
195 return NULL;
196 return isl_multi_aff_get_space(box->offset);
197}
198
199/* Does "box" contain valid information?
200 */
202{
203 if (!box)
204 return isl_bool_error;
205 return isl_bool_not(isl_multi_aff_involves_nan(box->offset));
206}
207
208/* Return the offsets of the box "box".
209 */
212{
213 if (!box)
214 return NULL;
215 return box->offset;
216}
217
218/* Return a copy of the offsets of the box "box".
219 */
225
226/* Return the sizes of the box "box".
227 */
230{
231 if (!box)
232 return NULL;
233 return box->size;
234}
235
236/* Return a copy of the sizes of the box "box".
237 */
242
243/* Is "box1" obviously equal to "box2"?
244 *
245 * That is, does it have the same size and obviously the same offset?
246 */
249{
250 isl_multi_aff *offset1, *offset2;
251 isl_multi_val *size1, *size2;
253
254 size1 = isl_fixed_box_peek_size(box1);
255 size2 = isl_fixed_box_peek_size(box2);
256 equal = isl_multi_val_is_equal(size1, size2);
257 if (equal < 0 || !equal)
258 return equal;
259
260 offset1 = isl_fixed_box_peek_offset(box1);
261 offset2 = isl_fixed_box_peek_offset(box2);
262 return isl_multi_aff_plain_is_equal(offset1, offset2);
263}
264
265/* Data used in set_dim_extent and compute_size_in_direction.
266 *
267 * "bset" is a wrapped copy of the basic map that has the selected
268 * output dimension as range, without any contraction.
269 * "pos" is the position of the variable representing the output dimension,
270 * i.e., the variable for which the size should be computed. This variable
271 * is also the last variable in "bset".
272 * "size" is the best size found so far
273 * (infinity if no offset was found so far).
274 * "offset" is the offset corresponding to the best size
275 * (NULL if no offset was found so far).
276 *
277 * If "expand" is not NULL, then it maps a contracted version of "bset"
278 * to the original "bset", while "domain_map" maps the space of "bset"
279 * to the domain of the wrapped map.
280 */
290
291/* Detect any stride in the single output dimension of "map" and
292 * set the fields of "info" used in exploiting this stride.
293 * If no (non-trivial) stride can be found, then set those fields to NULL.
294 *
295 * If there is a non-trivial stride, then the single output dimension i
296 * is of the form
297 *
298 * i = offset + stride * i'
299 *
300 * Construct a function that maps i' to i.
301 * Note that the offset may depend on the domain of the map,
302 * so it needs to be of the form
303 *
304 * [D -> [i']] -> [i]
305 *
306 * In fact, it is more convenient for the function to be of the form
307 *
308 * [D -> [i']] -> [D -> [i]]
309 *
310 * First construct helper functions
311 *
312 * [D -> [i]] -> D
313 * [D -> [i]] -> [i]
314 *
315 * Plug in [D -> [i]] -> D into the offset (defined on D) to obtain
316 * the offset defined on [D -> [i]] and add stride times [D -> [i]] -> [i].
317 * This produces the function
318 *
319 * [D -> [i']] = [offset + stride i']
320 *
321 * Combine it with [D -> [i]] -> D again to obtain the desired result.
322 */
324 struct isl_size_info *info, __isl_take isl_map *map)
325{
326 isl_stride_info *si;
327 isl_val *stride;
329 isl_bool is_one;
332
333 info->expand = NULL;
334 info->domain_map = NULL;
335
337 stride = isl_stride_info_get_stride(si);
338 is_one = isl_val_is_one(stride);
339 if (is_one < 0 || is_one) {
340 isl_val_free(stride);
342 return is_one < 0 ? isl_map_free(map) : map;
343 }
346
350 isl_multi_aff_copy(domain_map));
351
352 expand = isl_multi_aff_scale_val(id, stride);
353 expand = isl_multi_aff_add(expand, isl_multi_aff_from_aff(offset));
354 expand = isl_multi_aff_range_product(isl_multi_aff_copy(domain_map),
355 expand);
356 info->expand = expand;
357 info->domain_map = domain_map;
358
359 if (!expand || !domain_map)
360 return isl_map_free(map);
361
362 return map;
363}
364
365/* If any stride was detected in the single output dimension
366 * in the wrapped map in "bset" (i.e., if info->expand is set),
367 * then plug in the expansion to obtain a description in terms
368 * of an output dimension without stride.
369 * Otherwise, return the original "bset".
370 */
372 struct isl_size_info *info, __isl_take isl_basic_set *bset)
373{
374 if (!info->expand)
375 return bset;
376
378 isl_multi_aff_copy(info->expand));
379
380 return bset;
381}
382
383/* Given an affine function "aff" that maps the space of "bset"
384 * to a value in the (possibly) contracted space,
385 * expand it back to the original space.
386 * The value of "aff" only depends on the domain of wrapped relation
387 * inside "bset".
388 *
389 * If info->expand is not set, then no contraction was applied and
390 * "aff" is returned.
391 *
392 * Otherwise, combine "aff" of the form [D -> [*]] -> [v'(D)]
393 * with [D -> [*]] -> D to obtain [D -> [*]] -> [D -> [v'(D)]].
394 * Apply the expansion [D -> [i']] = [D -> [offset + stride * i']]
395 * to obtain [D -> [*]] -> [D -> [offset + stride * v'(D)]] and
396 * extract out [D -> [*]] -> [offset + stride * v'(D)].
397 */
399 struct isl_size_info *info, __isl_take isl_aff *aff)
400{
402
403 if (!info->expand)
404 return aff;
405
407 ma = isl_multi_aff_range_product(isl_multi_aff_copy(info->domain_map),
408 ma);
409 ma = isl_multi_aff_pullback_multi_aff(isl_multi_aff_copy(info->expand),
410 ma);
411 ma = isl_multi_aff_range_factor_range(ma);
412 aff = isl_multi_aff_get_at(ma, 0);
413 isl_multi_aff_free(ma);
414
415 return aff;
416}
417
418/* Free all memory allocated for "info".
419 */
420static void isl_size_info_clear(struct isl_size_info *info)
421{
422 isl_val_free(info->size);
423 isl_aff_free(info->offset);
425
426 isl_multi_aff_free(info->expand);
427 isl_multi_aff_free(info->domain_map);
428}
429
430/* Is "c" a suitable bound on dimension "pos" for use as a lower bound
431 * of a fixed-size range.
432 * In particular, it needs to be a lower bound on "pos".
433 */
438
439/* Given a constraint from the basic set describing the bounds on
440 * an array index, check if it is a lower bound, say m i >= b(x), and,
441 * if so, check whether the expression "i - ceil(b(x)/m) + 1" has a constant
442 * upper bound. If so, and if this bound is smaller than any bound
443 * derived from earlier constraints, set the size to this bound on
444 * the expression and the lower bound to ceil(b(x)/m).
445 *
446 * If any contraction was applied, then the lower bound ceil(b(x)/m)
447 * is defined in the contracted space, so it needs to be expanded
448 * first before applying it to the original space.
449 */
451 void *user)
452{
453 struct isl_size_info *info = user;
454 isl_val *v;
455 isl_aff *aff;
456 isl_aff *lb;
457 isl_bool is_bound, better;
458
459 is_bound = is_suitable_bound(c, info->pos);
460 if (is_bound < 0 || !is_bound) {
462 return is_bound < 0 ? isl_stat_error : isl_stat_ok;
463 }
464
468
469 lb = isl_aff_copy(aff);
470
473
474 v = isl_basic_set_max_val(info->bset, aff);
476
477 v = isl_val_add_ui(v, 1);
478 better = isl_val_lt(v, info->size);
479 if (better >= 0 && better) {
480 isl_val_free(info->size);
481 info->size = isl_val_copy(v);
483 isl_aff_free(info->offset);
484 info->offset = isl_aff_copy(lb);
485 }
486 isl_val_free(v);
487 isl_aff_free(lb);
488
490
491 return better < 0 ? isl_stat_error : isl_stat_ok;
492}
493
494/* Look for a fixed-size range of values for the output dimension "pos"
495 * of "map", by looking for a lower-bound expression in the parameters
496 * and input dimensions such that the range of the output dimension
497 * is a constant shifted by this expression.
498 *
499 * In particular, look through the explicit lower bounds on the output dimension
500 * for candidate expressions and pick the one that results in the smallest size.
501 * Initialize the size with infinity and if no better size is found
502 * then invalidate the box. Otherwise, set the offset and size
503 * in the given direction by those that correspond to the smallest size.
504 *
505 * If the output dimension is strided, then scale it down before
506 * looking for lower bounds. The size computation is however performed
507 * in the original space.
508 *
509 * Note that while evaluating the size corresponding to a lower bound,
510 * an affine expression is constructed from the lower bound.
511 * This lower bound may therefore not have any unknown local variables.
512 * Eliminate any unknown local variables up front.
513 * Furthermore, the lower bound can clearly not involve
514 * (any local variables that involve) the output dimension itself,
515 * so any such local variables are eliminated as well.
516 * No such restriction needs to be imposed on the set over which
517 * the size is computed.
518 */
521{
522 struct isl_size_info info;
523 isl_bool valid;
524 isl_ctx *ctx;
526
527 if (!box || !map)
528 return isl_fixed_box_free(box);
529
530 ctx = isl_map_get_ctx(map);
534 info.size = isl_val_infty(ctx);
535 info.offset = NULL;
536 info.pos = isl_map_dim(map, isl_dim_in);
541 if (info.pos < 0)
544 info.pos, 1);
546 &compute_size_in_direction, &info) < 0)
547 box = isl_fixed_box_free(box);
549 valid = isl_val_is_int(info.size);
550 if (valid < 0)
551 box = isl_fixed_box_free(box);
552 else if (valid)
554 info.offset, info.size);
555 else
556 box = isl_fixed_box_invalidate(box);
557 isl_size_info_clear(&info);
558
559 return box;
560}
561
562/* Try and construct a fixed-size rectangular box with an offset
563 * in terms of the domain of "map" that contains the range of "map".
564 * If no such box can be constructed, then return an invalidated box,
565 * i.e., one where isl_fixed_box_is_valid returns false.
566 *
567 * Iterate over the dimensions in the range
568 * setting the corresponding offset and extent.
569 */
572{
573 int i;
574 isl_size n;
575 isl_space *space;
576 isl_fixed_box *box;
577
579 if (n < 0)
580 return NULL;
581 space = isl_map_get_space(map);
582 box = isl_fixed_box_init(space);
583
585 for (i = 0; i < n; ++i) {
586 isl_bool valid;
587
588 box = set_dim_extent(box, map, i);
589 valid = isl_fixed_box_is_valid(box);
590 if (valid < 0 || !valid)
591 break;
592 }
594
595 return box;
596}
597
598/* Compute a fixed box from "set" using "map_box" by treating it as a map
599 * with a zero-dimensional domain and
600 * project out the domain again from the result.
601 */
604{
605 isl_map *map;
606 isl_fixed_box *box;
607
609 box = map_box(map);
612
613 return box;
614}
615
616/* Try and construct a fixed-size rectangular box with an offset
617 * in terms of the parameters of "set" that contains "set".
618 * If no such box can be constructed, then return an invalidated box,
619 * i.e., one where isl_fixed_box_is_valid returns false.
620 *
621 * Compute the box using isl_map_get_range_simple_fixed_box_hull
622 * by constructing a map from the set and
623 * project out the domain again from the result.
624 */
630
631/* Check whether the output elements lie on a rectangular lattice,
632 * possibly depending on the parameters and the input dimensions.
633 * Return a tile in this lattice.
634 * If no stride information can be found, then return a tile of size 1
635 * (and offset 0).
636 *
637 * Obtain stride information in each output dimension separately and
638 * combine the results.
639 */
642{
643 int i;
644 isl_size n;
645 isl_space *space;
646 isl_fixed_box *box;
647
649 if (n < 0)
650 return NULL;
651 space = isl_map_get_space(map);
652 box = isl_fixed_box_init(space);
653
654 for (i = 0; i < n; ++i) {
655 isl_val *stride;
657 isl_stride_info *si;
658
660 stride = isl_stride_info_get_stride(si);
663
664 box = isl_fixed_box_set_valid_extent(box, i, offset, stride);
665
667 isl_val_free(stride);
668 }
669
670 return box;
671}
672
673/* Check whether the elements lie on a rectangular lattice,
674 * possibly depending on the parameters.
675 * Return a tile in this lattice.
676 * If no stride information can be found, then return a tile of size 1
677 * (and offset 0).
678 *
679 * Consider the set as a map with a zero-dimensional domain and
680 * obtain a lattice tile of that map.
681 */
686
687/* An enumeration of the keys that may appear in a YAML mapping
688 * of an isl_fixed_box object.
689 */
696
697/* Textual representations of the YAML keys for an isl_fixed_box object.
698 */
699static char *key_str[] = {
700 [isl_fb_key_offset] = "offset",
701 [isl_fb_key_size] = "size",
702};
703
704#undef BASE
705#define BASE multi_val
707
708#undef BASE
709#define BASE multi_aff
711
712/* Print the information contained in "box" to "p".
713 * The information is printed as a YAML document.
714 */
717{
718 if (!box)
719 return isl_printer_free(p);
720
722 p = print_yaml_field_multi_aff(p, key_str[isl_fb_key_offset],
723 box->offset);
724 p = print_yaml_field_multi_val(p, key_str[isl_fb_key_size], box->size);
726
727 return p;
728}
729
730#undef BASE
731#define BASE fixed_box
732#include <print_templ_yaml.c>
733
734#undef KEY
735#define KEY enum isl_fb_key
736#undef KEY_ERROR
737#define KEY_ERROR isl_fb_key_error
738#undef KEY_END
739#define KEY_END isl_fb_key_end
740#undef KEY_STR
741#define KEY_STR key_str
742#undef KEY_EXTRACT
743#define KEY_EXTRACT extract_key
744#undef KEY_GET
745#define KEY_GET get_key
746#include "extract_key.c"
747
748#undef BASE
749#define BASE multi_val
750#include "read_in_string_templ.c"
751
752#undef BASE
753#define BASE multi_aff
754#include "read_in_string_templ.c"
755
756/* Read an isl_fixed_box object from "s".
757 *
758 * The input needs to contain both an offset and a size.
759 * If either is specified multiple times, then the last specification
760 * overrides all previous ones. This is simpler than checking
761 * that each is only specified once.
762 */
764{
765 isl_bool more;
766 isl_multi_aff *offset = NULL;
767 isl_multi_val *size = NULL;
768
770 return NULL;
771
772 while ((more = isl_stream_yaml_next(s)) == isl_bool_true) {
773 enum isl_fb_key key;
774
775 key = get_key(s);
776 if (isl_stream_yaml_next(s) < 0)
777 goto error;
778 switch (key) {
779 case isl_fb_key_end:
780 case isl_fb_key_error:
781 goto error;
783 isl_multi_aff_free(offset);
784 offset = read_multi_aff(s);
785 if (!offset)
786 goto error;
787 break;
788 case isl_fb_key_size:
789 isl_multi_val_free(size);
790 size = read_multi_val(s);
791 if (!size)
792 goto error;
793 break;
794 }
795 }
796 if (more < 0)
797 goto error;
798
800 goto error;
801
802 if (!offset) {
803 isl_stream_error(s, NULL, "no offset specified");
804 goto error;
805 }
806
807 if (!size) {
808 isl_stream_error(s, NULL, "no size specified");
809 goto error;
810 }
811
813error:
814 isl_multi_aff_free(offset);
815 isl_multi_val_free(size);
816 return NULL;
817}
818
819#undef TYPE_BASE
820#define TYPE_BASE fixed_box
__isl_null isl_aff * isl_aff_free(__isl_take isl_aff *aff)
Definition isl_aff.c:449
__isl_export __isl_give isl_multi_aff * isl_space_range_map_multi_aff(__isl_take isl_space *space)
Definition isl_aff.c:4344
__isl_give isl_aff * isl_aff_nan_on_domain(__isl_take isl_local_space *ls)
Definition isl_aff.c:291
__isl_export __isl_give isl_aff * isl_aff_neg(__isl_take isl_aff *aff)
Definition isl_aff.c:1451
__isl_overload __isl_give isl_multi_aff * isl_multi_aff_pullback_multi_aff(__isl_take isl_multi_aff *ma1, __isl_take isl_multi_aff *ma2)
Definition isl_aff.c:6097
__isl_export __isl_give isl_multi_aff * isl_space_domain_map_multi_aff(__isl_take isl_space *space)
Definition isl_aff.c:4291
__isl_give isl_space * isl_aff_get_space(__isl_keep isl_aff *aff)
Definition isl_aff.c:573
__isl_overload __isl_give isl_aff * isl_aff_pullback_multi_aff(__isl_take isl_aff *aff, __isl_take isl_multi_aff *ma)
Definition isl_aff.c:6030
__isl_give isl_aff * isl_aff_copy(__isl_keep isl_aff *aff)
Definition isl_aff.c:145
__isl_give isl_aff * isl_aff_add_coefficient_si(__isl_take isl_aff *aff, enum isl_dim_type type, int pos, int v)
Definition isl_aff.c:1426
__isl_constructor __isl_give isl_multi_aff * isl_multi_aff_from_aff(__isl_take isl_aff *aff)
__isl_export __isl_give isl_aff * isl_aff_ceil(__isl_take isl_aff *aff)
Definition isl_aff.c:1873
struct isl_multi_aff isl_multi_aff
Definition aff_type.h:29
__isl_give isl_aff * isl_constraint_get_bound(__isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos)
__isl_null isl_constraint * isl_constraint_free(__isl_take isl_constraint *c)
isl_bool isl_constraint_is_lower_bound(__isl_keep isl_constraint *constraint, enum isl_dim_type type, unsigned pos)
isl_stat isl_basic_set_foreach_constraint(__isl_keep isl_basic_set *bset, isl_stat(*fn)(__isl_take isl_constraint *c, void *user), void *user)
#define __isl_take
Definition ctx.h:23
isl_stat
Definition ctx.h:85
@ isl_stat_error
Definition ctx.h:86
@ isl_stat_ok
Definition ctx.h:87
#define __isl_give
Definition ctx.h:20
#define __isl_null
Definition ctx.h:29
#define __isl_keep
Definition ctx.h:26
int isl_size
Definition ctx.h:98
#define isl_alloc_type(ctx, type)
Definition ctx.h:130
isl_bool isl_bool_not(isl_bool b)
Definition isl_ctx.c:44
isl_bool
Definition ctx.h:90
@ isl_bool_true
Definition ctx.h:93
@ isl_bool_error
Definition ctx.h:91
isl_bool __isl_keep ISL_KEY * key
Definition hmap.h:27
isl_stat isl_stat void * user
Definition hmap.h:39
__isl_give isl_val * isl_basic_set_max_val(__isl_keep isl_basic_set *bset, __isl_keep isl_aff *obj)
Definition isl_ilp.c:562
__isl_give isl_aff * isl_aff_domain_factor_domain(__isl_take isl_aff *aff)
static char * key_str[]
__isl_give isl_fixed_box * isl_set_get_lattice_tile(__isl_keep isl_set *set)
Definition isl_box.c:682
static __isl_give isl_fixed_box * isl_fixed_box_set_extent(__isl_take isl_fixed_box *box, int pos, __isl_keep isl_aff *offset, __isl_keep isl_val *size)
Definition isl_box.c:100
static void isl_size_info_clear(struct isl_size_info *info)
Definition isl_box.c:420
static __isl_give isl_aff * isl_size_info_expand(struct isl_size_info *info, __isl_take isl_aff *aff)
Definition isl_box.c:398
__isl_give isl_fixed_box * isl_set_get_simple_fixed_box_hull(__isl_keep isl_set *set)
Definition isl_box.c:625
static isl_stat compute_size_in_direction(__isl_take isl_constraint *c, void *user)
Definition isl_box.c:450
isl_ctx * isl_fixed_box_get_ctx(__isl_keep isl_fixed_box *box)
Definition isl_box.c:183
static isl_bool is_suitable_bound(__isl_keep isl_constraint *c, unsigned pos)
Definition isl_box.c:434
static __isl_give isl_fixed_box * isl_fixed_box_init(__isl_take isl_space *space)
Definition isl_box.c:73
__isl_give isl_fixed_box * isl_map_get_range_lattice_tile(__isl_keep isl_map *map)
Definition isl_box.c:640
__isl_give isl_fixed_box * isl_fixed_box_copy(__isl_keep isl_fixed_box *box)
Definition isl_box.c:87
static __isl_give isl_map * isl_size_info_detect_stride(struct isl_size_info *info, __isl_take isl_map *map)
Definition isl_box.c:323
static __isl_keep isl_multi_aff * isl_fixed_box_peek_offset(__isl_keep isl_fixed_box *box)
Definition isl_box.c:210
__isl_give isl_fixed_box * isl_map_get_range_simple_fixed_box_hull(__isl_keep isl_map *map)
Definition isl_box.c:570
static __isl_give isl_fixed_box * isl_stream_read_fixed_box(isl_stream *s)
Definition isl_box.c:763
static __isl_give isl_fixed_box * set_dim_extent(__isl_take isl_fixed_box *box, __isl_keep isl_map *map, int pos)
Definition isl_box.c:519
__isl_give isl_multi_val * isl_fixed_box_get_size(__isl_keep isl_fixed_box *box)
Definition isl_box.c:238
isl_bool isl_fixed_box_plain_is_equal(__isl_keep isl_fixed_box *box1, __isl_keep isl_fixed_box *box2)
Definition isl_box.c:247
__isl_give isl_printer * isl_printer_print_fixed_box(__isl_take isl_printer *p, __isl_keep isl_fixed_box *box)
Definition isl_box.c:715
__isl_give isl_multi_aff * isl_fixed_box_get_offset(__isl_keep isl_fixed_box *box)
Definition isl_box.c:220
static __isl_give isl_fixed_box * isl_fixed_box_alloc(__isl_take isl_multi_aff *offset, __isl_take isl_multi_val *size)
Definition isl_box.c:48
__isl_null isl_fixed_box * isl_fixed_box_free(__isl_take isl_fixed_box *box)
Definition isl_box.c:36
static __isl_keep isl_multi_val * isl_fixed_box_peek_size(__isl_keep isl_fixed_box *box)
Definition isl_box.c:228
__isl_give isl_space * isl_fixed_box_get_space(__isl_keep isl_fixed_box *box)
Definition isl_box.c:192
static __isl_give isl_basic_set * isl_size_info_contract(struct isl_size_info *info, __isl_take isl_basic_set *bset)
Definition isl_box.c:371
isl_fb_key
Definition isl_box.c:690
@ isl_fb_key_end
Definition isl_box.c:694
@ isl_fb_key_offset
Definition isl_box.c:692
@ isl_fb_key_size
Definition isl_box.c:693
@ isl_fb_key_error
Definition isl_box.c:691
static __isl_give isl_fixed_box * fixed_box_as_map(__isl_keep isl_set *set, __isl_give isl_fixed_box *(*map_box)(__isl_keep isl_map *map))
Definition isl_box.c:602
static __isl_give isl_fixed_box * isl_fixed_box_project_domain_on_params(__isl_take isl_fixed_box *box)
Definition isl_box.c:163
static __isl_give isl_fixed_box * isl_fixed_box_invalidate(__isl_take isl_fixed_box *box)
Definition isl_box.c:132
isl_bool isl_fixed_box_is_valid(__isl_keep isl_fixed_box *box)
Definition isl_box.c:201
static __isl_give isl_fixed_box * isl_fixed_box_set_valid_extent(__isl_take isl_fixed_box *box, int pos, __isl_keep isl_aff *offset, __isl_keep isl_val *size)
Definition isl_box.c:117
static unsigned offset(__isl_keep isl_constraint *c, enum isl_dim_type type)
static int is_bound(struct sh_data *data, __isl_keep isl_set *set, int j, isl_int *ineq, int shift)
__isl_give isl_map * isl_map_project_onto(__isl_take isl_map *map, enum isl_dim_type type, unsigned first, unsigned n)
Definition isl_map.c:5225
static unsigned pos(__isl_keep isl_space *space, enum isl_dim_type type)
Definition isl_map.c:73
#define isl_set
#define isl_basic_set
static __isl_give isl_poly * expand(__isl_take isl_poly *poly, int *exp, int first)
const char * set
Definition isl_test.c:1364
const char * ma
Definition isl_test.c:7330
const char * map
Definition isl_test.c:1734
int equal
Definition isl_test.c:7663
const char * p
Definition isl_test.c:8397
const char * aff
Definition isl_test.c:7073
const char * id
Definition isl_test.c:7074
__isl_give isl_local_space * isl_local_space_from_space(__isl_take isl_space *space)
__isl_export __isl_give isl_map * isl_map_detect_equalities(__isl_take isl_map *map)
__isl_give isl_map * isl_map_copy(__isl_keep isl_map *map)
Definition isl_map.c:1494
__isl_export __isl_give isl_space * isl_map_get_space(__isl_keep isl_map *map)
Definition isl_map.c:599
isl_ctx * isl_map_get_ctx(__isl_keep isl_map *map)
Definition isl_map.c:392
isl_size isl_map_dim(__isl_keep isl_map *map, enum isl_dim_type type)
Definition isl_map.c:113
__isl_give isl_map * isl_map_from_range(__isl_take isl_set *set)
Definition isl_map.c:6823
__isl_give isl_basic_set * isl_basic_map_wrap(__isl_take isl_basic_map *bmap)
Definition isl_map.c:12868
__isl_null isl_map * isl_map_free(__isl_take isl_map *map)
Definition isl_map.c:7040
__isl_export __isl_give isl_fixed_box * isl_map_get_range_simple_fixed_box_hull(__isl_keep isl_map *map)
Definition isl_box.c:570
__isl_give isl_stride_info * isl_map_get_range_stride_info(__isl_keep isl_map *map, int pos)
Definition isl_stride.c:368
__isl_export __isl_give isl_fixed_box * isl_map_get_range_lattice_tile(__isl_keep isl_map *map)
Definition isl_box.c:640
__isl_give isl_basic_map * isl_map_simple_hull(__isl_take isl_map *map)
__isl_give isl_printer * isl_printer_yaml_start_mapping(__isl_take isl_printer *p)
__isl_null isl_printer * isl_printer_free(__isl_take isl_printer *printer)
__isl_give isl_printer * isl_printer_yaml_end_mapping(__isl_take isl_printer *p)
__isl_give isl_basic_set * isl_basic_set_preimage_multi_aff(__isl_take isl_basic_set *bset, __isl_take isl_multi_aff *ma)
Definition isl_map.c:14536
__isl_null isl_basic_set * isl_basic_set_free(__isl_take isl_basic_set *bset)
Definition isl_map.c:1523
__isl_give isl_set * isl_set_copy(__isl_keep isl_set *set)
Definition isl_map.c:1470
__isl_give isl_basic_set * isl_basic_set_remove_divs_involving_dims(__isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first, unsigned n)
Definition isl_map.c:3433
__isl_give isl_basic_set * isl_basic_set_copy(__isl_keep isl_basic_set *bset)
Definition isl_map.c:1465
__isl_give isl_basic_set * isl_basic_set_remove_unknown_divs(__isl_take isl_basic_set *bset)
Definition isl_map.c:3826
__isl_give isl_space * isl_space_copy(__isl_keep isl_space *space)
Definition isl_space.c:469
__isl_export __isl_give isl_space * isl_space_range(__isl_take isl_space *space)
Definition isl_space.c:2257
__isl_export __isl_give isl_space * isl_space_drop_all_params(__isl_take isl_space *space)
Definition isl_space.c:2222
__isl_export __isl_give isl_space * isl_space_domain(__isl_take isl_space *space)
Definition isl_space.c:2232
@ isl_dim_in
Definition space_type.h:16
@ isl_dim_set
Definition space_type.h:18
@ isl_dim_out
Definition space_type.h:17
void isl_stream_error(__isl_keep isl_stream *s, struct isl_token *tok, char *msg)
Definition isl_stream.c:142
isl_bool isl_stream_yaml_next(__isl_keep isl_stream *s)
Definition isl_stream.c:966
isl_stat isl_stream_yaml_read_start_mapping(__isl_keep isl_stream *s)
isl_stat isl_stream_yaml_read_end_mapping(__isl_keep isl_stream *s)
__isl_null isl_stride_info * isl_stride_info_free(__isl_take isl_stride_info *si)
Definition isl_stride.c:37
__isl_give isl_aff * isl_stride_info_get_offset(__isl_keep isl_stride_info *si)
Definition isl_stride.c:92
__isl_give isl_val * isl_stride_info_get_stride(__isl_keep isl_stride_info *si)
Definition isl_stride.c:83
isl_multi_val * size
Definition isl_box.c:31
isl_multi_aff * offset
Definition isl_box.c:30
isl_aff * offset
Definition isl_box.c:285
isl_size pos
Definition isl_box.c:283
isl_basic_set * bset
Definition isl_box.c:282
isl_multi_aff * domain_map
Definition isl_box.c:288
isl_val * size
Definition isl_box.c:284
isl_multi_aff * expand
Definition isl_box.c:287
static Signature domain_map
__isl_export isl_bool isl_val_lt(__isl_keep isl_val *v1, __isl_keep isl_val *v2)
Definition isl_val.c:1285
__isl_give isl_val * isl_val_copy(__isl_keep isl_val *v)
Definition isl_val.c:219
__isl_give isl_val * isl_val_add_ui(__isl_take isl_val *v1, unsigned long v2)
Definition isl_val.c:685
__isl_export isl_bool isl_multi_val_is_equal(__isl_keep isl_multi_val *mv1, __isl_keep isl_multi_val *mv2)
Definition isl_val.c:1597
__isl_export __isl_give isl_val * isl_val_infty(isl_ctx *ctx)
Definition isl_val.c:96
__isl_null isl_val * isl_val_free(__isl_take isl_val *v)
Definition isl_val.c:263
__isl_export isl_bool isl_val_is_one(__isl_keep isl_val *v)
Definition isl_val.c:1201
__isl_export isl_bool isl_val_is_int(__isl_keep isl_val *v)
Definition isl_val.c:1141
struct isl_multi_val isl_multi_val
Definition val_type.h:16
n
Definition youcefn.c:8