X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=isl_dim_map.c;h=102b8e8a6a4112567576f744424a07e6d4227a93;hb=de51a9bc4da5dd3f1f9f57c2362da6f9752c44e0;hp=ab3d30346129029e1a26b4f3e8ea4e9f036e57db;hpb=f600853f2f7dd332a98d1a4ca58d30567d36e04a;p=platform%2Fupstream%2Fisl.git diff --git a/isl_dim_map.c b/isl_dim_map.c index ab3d303..102b8e8 100644 --- a/isl_dim_map.c +++ b/isl_dim_map.c @@ -2,7 +2,7 @@ * Copyright 2008-2009 Katholieke Universiteit Leuven * Copyright 2010-2011 INRIA Saclay * - * Use of this software is governed by the GNU LGPLv2.1 license + * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, K.U.Leuven, Departement * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium @@ -11,7 +11,7 @@ */ #include -#include +#include #include #include @@ -61,7 +61,7 @@ void isl_dim_map_range(__isl_keep isl_dim_map *dim_map, } void isl_dim_map_dim_range(__isl_keep isl_dim_map *dim_map, - struct isl_dim *dim, enum isl_dim_type type, + __isl_keep isl_space *dim, enum isl_dim_type type, unsigned first, unsigned n, unsigned dst_pos) { int i; @@ -70,18 +70,18 @@ void isl_dim_map_dim_range(__isl_keep isl_dim_map *dim_map, if (!dim_map || !dim) return; - src_pos = 1 + isl_dim_offset(dim, type); + src_pos = 1 + isl_space_offset(dim, type); for (i = 0; i < n; ++i) { dim_map->m[1 + dst_pos + i].pos = src_pos + first + i; dim_map->m[1 + dst_pos + i].sgn = 1; } } -void isl_dim_map_dim(__isl_keep isl_dim_map *dim_map, __isl_keep isl_dim *dim, +void isl_dim_map_dim(__isl_keep isl_dim_map *dim_map, __isl_keep isl_space *dim, enum isl_dim_type type, unsigned dst_pos) { isl_dim_map_dim_range(dim_map, dim, type, - 0, isl_dim_size(dim, type), dst_pos); + 0, isl_space_dim(dim, type), dst_pos); } void isl_dim_map_div(__isl_keep isl_dim_map *dim_map, @@ -93,7 +93,7 @@ void isl_dim_map_div(__isl_keep isl_dim_map *dim_map, if (!dim_map || !bmap) return; - src_pos = 1 + isl_dim_total(bmap->dim); + src_pos = 1 + isl_space_dim(bmap->dim, isl_dim_all); for (i = 0; i < bmap->n_div; ++i) { dim_map->m[1 + dst_pos + i].pos = src_pos + i; dim_map->m[1 + dst_pos + i].sgn = 1; @@ -219,8 +219,8 @@ __isl_give isl_dim_map *isl_dim_map_from_reordering( if (!exp) return NULL; - ctx = isl_dim_get_ctx(exp->dim); - dim_map = isl_dim_map_alloc(ctx, isl_dim_total(exp->dim)); + ctx = isl_space_get_ctx(exp->dim); + dim_map = isl_dim_map_alloc(ctx, isl_space_dim(exp->dim, isl_dim_all)); if (!dim_map) return NULL;