~ubuntu-branches/ubuntu/vivid/cloog/vivid

« back to all changes in this revision

Viewing changes to debian/patches/cloog-isl-patch.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-12-04 17:45:42 UTC
  • mfrom: (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20141204174542-p7q4stki9xcq3kjy
Tags: 0.18.2-3
* Build using isl-0.14.
* Backport patches to build with the new isl (Tobias Burnus).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
commit b561f860f2fefa84459750d576807d214e4aad97
 
2
Author: Sven Verdoolaege <skimo@kotnet.org>
 
3
Date:   Sun Jan 12 14:35:00 2014 +0100
 
4
 
 
5
    cloog_domain_cube: reimplement using documented functions
 
6
    
 
7
    The original implementation used the undocumented
 
8
    isl_basic_set_interval function, which will be removed
 
9
    in the next release of isl.
 
10
    
 
11
    Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
 
12
    Signed-off-by: Cedric Bastoul <cedric.bastoul@unistra.fr>
 
13
 
 
14
diff --git a/source/isl/domain.c b/source/isl/domain.c
 
15
index d11da7b..620584d 100644
 
16
--- a/source/isl/domain.c
 
17
+++ b/source/isl/domain.c
 
18
@@ -1389,20 +1389,20 @@ CloogDomain *cloog_domain_cube(CloogState *state,
 
19
                                int dim, cloog_int_t min, cloog_int_t max)
 
20
 {
 
21
        int i;
 
22
-       struct isl_basic_set *cube;
 
23
-       struct isl_basic_set *interval;
 
24
-       struct isl_basic_set_list *list;
 
25
+       isl_space *space;
 
26
+       isl_set *cube;
 
27
 
 
28
        if (dim == 0)
 
29
                return cloog_domain_universe(state, dim);
 
30
 
 
31
-       interval = isl_basic_set_interval(state->backend->ctx, min, max);
 
32
-       list = isl_basic_set_list_alloc(state->backend->ctx, dim);
 
33
-       for (i = 0; i < dim; ++i)
 
34
-               list = isl_basic_set_list_add(list, isl_basic_set_copy(interval));
 
35
-       isl_basic_set_free(interval);
 
36
-       cube = isl_basic_set_list_product(list);
 
37
-       return cloog_domain_from_isl_set(isl_set_from_basic_set(cube));
 
38
+       space = isl_space_set_alloc(state->backend->ctx, 0, dim);
 
39
+       cube = isl_set_universe(space);
 
40
+       for (i = 0; i < dim; ++i) {
 
41
+               cube = isl_set_lower_bound(cube, isl_dim_set, i, min);
 
42
+               cube = isl_set_upper_bound(cube, isl_dim_set, i, max);
 
43
+       }
 
44
+
 
45
+       return cloog_domain_from_isl_set(cube);
 
46
 }
 
47
 
 
48