add isl_map_fast_is_fixed
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 30 Aug 2009 07:17:52 +0000 (09:17 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 30 Aug 2009 07:17:52 +0000 (09:17 +0200)
include/isl_map.h
isl_map.c

index 4b5cad9..4917e2e 100644 (file)
@@ -268,6 +268,8 @@ void isl_map_dump(struct isl_map *map, FILE *out, int indent);
 
 int isl_map_fast_input_is_fixed(struct isl_map *map,
                unsigned in, isl_int *val);
+int isl_map_fast_is_fixed(struct isl_map *map,
+       enum isl_dim_type type, unsigned pos, isl_int *val);
 
 struct isl_map *isl_map_coalesce(struct isl_map *map);
 
index 3d69a09..3a77a7a 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -4507,6 +4507,15 @@ int isl_basic_map_fast_is_fixed(struct isl_basic_map *bmap,
                isl_basic_map_offset(bmap, type) - 1 + pos, val);
 }
 
+int isl_map_fast_is_fixed(struct isl_map *map,
+       enum isl_dim_type type, unsigned pos, isl_int *val)
+{
+       if (pos >= isl_map_dim(map, type))
+               return -1;
+       return isl_map_fast_has_fixed_var(map,
+               map_offset(map, type) - 1 + pos, val);
+}
+
 /* Check if dimension dim has fixed value and if so and if val is not NULL,
  * then return this fixed value in *val.
  */