int isl_set_fast_dim_has_fixed_lower_bound(struct isl_set *set,
unsigned dim, isl_int *val);
+struct isl_basic_set *isl_basic_set_gist(struct isl_basic_set *bset,
+ struct isl_basic_set *context);
struct isl_set *isl_set_gist(struct isl_set *set,
struct isl_basic_set *context);
int isl_basic_set_dim_residue_class(struct isl_basic_set *bset,
return NULL;
}
+struct isl_basic_set *isl_basic_set_gist(struct isl_basic_set *bset,
+ struct isl_basic_set *context)
+{
+ return (struct isl_basic_set *)isl_basic_map_gist(
+ (struct isl_basic_map *)bset, (struct isl_basic_map *)context);
+}
+
struct isl_set *isl_set_gist(struct isl_set *set, struct isl_basic_set *context)
{
return (struct isl_set *)isl_map_gist((struct isl_map *)set,
test_convex_hull_case(ctx, "convex11");
}
+void test_gist_case(struct isl_ctx *ctx, const char *name)
+{
+ char filename[PATH_MAX];
+ FILE *input;
+ int n;
+ struct isl_basic_set *bset1, *bset2;
+ struct isl_set *set;
+
+ n = snprintf(filename, sizeof(filename),
+ "%s/test_inputs/%s.polylib", srcdir, name);
+ assert(n < sizeof(filename));
+ input = fopen(filename, "r");
+ assert(input);
+
+ bset1 = isl_basic_set_read_from_file(ctx, input, 0, ISL_FORMAT_POLYLIB);
+ bset2 = isl_basic_set_read_from_file(ctx, input, 0, ISL_FORMAT_POLYLIB);
+
+ bset1 = isl_basic_set_gist(bset1, bset2);
+
+ bset2 = isl_basic_set_read_from_file(ctx, input, 0, ISL_FORMAT_POLYLIB);
+
+ assert(isl_basic_set_is_equal(bset1, bset2) == 1);
+
+ isl_basic_set_free(bset1);
+ isl_basic_set_free(bset2);
+
+ fclose(input);
+}
+
+void test_gist(struct isl_ctx *ctx)
+{
+ test_gist_case(ctx, "gist1");
+}
+
int main()
{
struct isl_ctx *ctx;
test_application(ctx);
test_affine_hull(ctx);
test_convex_hull(ctx);
+ test_gist(ctx);
isl_ctx_free(ctx);
return 0;
}