The first zero dimensions are always equal, so these functions
should return a universe map in the zero-dimensional case rather
than an empty map.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
struct isl_map *map;
int i;
+ if (n == 0 && equal)
+ return isl_map_universe(dims);
+
map = isl_map_alloc_dim(isl_dim_copy(dims), n, ISL_MAP_DISJOINT);
for (i = 0; i + 1 < n; ++i)
struct isl_map *map;
int i;
+ if (n == 0 && equal)
+ return isl_map_universe(dims);
+
map = isl_map_alloc_dim(isl_dim_copy(dims), n, ISL_MAP_DISJOINT);
for (i = 0; i + 1 < n; ++i)
isl_map_free(map2);
}
+void test_lex(struct isl_ctx *ctx)
+{
+ isl_dim *dim;
+ isl_map *map;
+
+ dim = isl_dim_alloc(ctx, 0, 0, 0);
+ map = isl_map_lex_le(dim);
+ isl_map_print(map, stderr, 0, 0); fprintf(stderr, "\n");
+ assert(!isl_map_is_empty(map));
+ isl_map_free(map);
+}
+
void test_lexmin(struct isl_ctx *ctx)
{
const char *str;
assert(srcdir);
ctx = isl_ctx_alloc();
+ test_lex(ctx);
test_sv(ctx);
test_bijective(ctx);
test_dep(ctx);