add isl_map_implicit_equalities
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 18 Mar 2009 16:35:41 +0000 (17:35 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 20 Mar 2009 15:46:54 +0000 (16:46 +0100)
isl_affine_hull.c

index 73a5e94..fbdcddf 100644 (file)
@@ -40,6 +40,25 @@ struct isl_basic_set *isl_basic_set_implicit_equalities(
                isl_basic_map_implicit_equalities((struct isl_basic_map*)bset);
 }
 
+struct isl_map *isl_map_implicit_equalities(struct isl_map *map)
+{
+       int i;
+
+       if (!map)
+               return map;
+
+       for (i = 0; i < map->n; ++i) {
+               map->p[i] = isl_basic_map_implicit_equalities(map->p[i]);
+               if (!map->p[i])
+                       goto error;
+       }
+
+       return map;
+error:
+       isl_map_free(map);
+       return NULL;
+}
+
 /* Make eq[row][col] of both bmaps equal so we can add the row
  * add the column to the common matrix.
  * Note that because of the echelon form, the columns of row row