From: Sven Verdoolaege Date: Sat, 9 Jul 2011 09:11:01 +0000 (+0200) Subject: add isl_set_intersect_params X-Git-Tag: isl-0.07~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=71bcb7b17a14345bf958673c1f051e920d3de3ea;p=platform%2Fupstream%2Fisl.git add isl_set_intersect_params Signed-off-by: Sven Verdoolaege --- diff --git a/doc/user.pod b/doc/user.pod index 421f138..899aa6e 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -1835,6 +1835,9 @@ the same (number of) parameters. __isl_give isl_basic_set *isl_basic_set_intersect( __isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2); + __isl_give isl_set *isl_set_intersect_params( + __isl_take isl_set *set, + __isl_take isl_set *params); __isl_give isl_set *isl_set_intersect( __isl_take isl_set *set1, __isl_take isl_set *set2); @@ -1850,6 +1853,9 @@ the same (number of) parameters. __isl_give isl_basic_map *isl_basic_map_intersect( __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); + __isl_give isl_map *isl_map_intersect_params( + __isl_take isl_map *map, + __isl_take isl_set *params); __isl_give isl_map *isl_map_intersect_domain( __isl_take isl_map *map, __isl_take isl_set *set); diff --git a/include/isl/map.h b/include/isl/map.h index 67e15da..77bd46f 100644 --- a/include/isl/map.h +++ b/include/isl/map.h @@ -296,6 +296,8 @@ __isl_give isl_map *isl_map_flat_range_product(__isl_take isl_map *map1, __isl_take isl_map *map2); __isl_give isl_map *isl_map_intersect(__isl_take isl_map *map1, __isl_take isl_map *map2); +__isl_give isl_map *isl_map_intersect_params(__isl_take isl_map *map, + __isl_take isl_set *params); __isl_give isl_map *isl_map_subtract( __isl_take isl_map *map1, __isl_take isl_map *map2); diff --git a/include/isl/set.h b/include/isl/set.h index 2eabc7d..026adc3 100644 --- a/include/isl/set.h +++ b/include/isl/set.h @@ -221,6 +221,8 @@ __isl_give isl_set *isl_set_flat_product(__isl_take isl_set *set1, __isl_give isl_set *isl_set_intersect( __isl_take isl_set *set1, __isl_take isl_set *set2); +__isl_give isl_set *isl_set_intersect_params(__isl_take isl_set *set, + __isl_take isl_set *params); __isl_give isl_set *isl_set_subtract( __isl_take isl_set *set1, __isl_take isl_set *set2); diff --git a/isl_map.c b/isl_map.c index 7d5151c..3d30064 100644 --- a/isl_map.c +++ b/isl_map.c @@ -2331,6 +2331,21 @@ struct isl_set *isl_set_intersect(struct isl_set *set1, struct isl_set *set2) (struct isl_map *)set2); } +/* The current implementation of isl_map_intersect accepts intersections + * with parameter domains, so we can just call that for now. + */ +__isl_give isl_map *isl_map_intersect_params(__isl_take isl_map *map, + __isl_take isl_set *params) +{ + return isl_map_intersect(map, params); +} + +__isl_give isl_set *isl_set_intersect_params(__isl_take isl_set *set, + __isl_take isl_set *params) +{ + return isl_map_intersect_params(set, params); +} + struct isl_basic_map *isl_basic_map_reverse(struct isl_basic_map *bmap) { struct isl_dim *dim;