#include <isl_set.h>
__isl_give isl_basic_set *isl_basic_set_read_from_file(
- isl_ctx *ctx, FILE *input, unsigned nparam,
- unsigned input_format);
+ isl_ctx *ctx, FILE *input, unsigned nparam);
__isl_give isl_basic_set *isl_basic_set_read_from_str(
- isl_ctx *ctx, const char *str, unsigned nparam,
- unsigned input_format);
+ isl_ctx *ctx, const char *str, unsigned nparam);
__isl_give isl_set *isl_set_read_from_file(isl_ctx *ctx,
- FILE *input, unsigned nparam,
- unsigned input_format);
+ FILE *input, unsigned nparam);
#include <isl_map.h>
__isl_give isl_basic_map *isl_basic_map_read_from_file(
- isl_ctx *ctx, FILE *input, unsigned nparam,
- unsigned input_format);
-
-C<input_format> may be either C<ISL_FORMAT_POLYLIB> or
-C<ISL_FORMAT_OMEGA>. However, not all combination are currently
-supported. Furthermore, only a very limited subset of
-the C<Omega> input format is currently supported.
-In particular, C<isl_basic_set_read_from_str> and
-C<isl_basic_map_read_from_file> only
-support C<ISL_FORMAT_OMEGA>, while C<isl_set_read_from_file>
-only supports C<ISL_FORMAT_POLYLIB>.
+ isl_ctx *ctx, FILE *input, unsigned nparam);
+
+The input may be either in C<PolyLib> format or in an
+C<Omega>-like format.
C<nparam> specifies how many of the final columns in
the C<PolyLib> format correspond to parameters. It should
-be zero when C<ISL_FORMAT_OMEGA> is used.
+be zero when C<Omega>-like input is expected.
=head3 Output
struct isl_basic_map *isl_basic_map_simplify(struct isl_basic_map *bmap);
struct isl_basic_map *isl_basic_map_detect_equalities(
struct isl_basic_map *bmap);
-#define ISL_FORMAT_POLYLIB 1
-#define ISL_FORMAT_OMEGA 2
__isl_give isl_basic_map *isl_basic_map_read_from_file(isl_ctx *ctx,
- FILE *input, unsigned nparam, unsigned input_format);
+ FILE *input, unsigned nparam);
struct isl_basic_map *isl_basic_map_fix_si(struct isl_basic_map *bmap,
enum isl_dim_type type, unsigned pos, int value);
__isl_take isl_basic_set *bset);
struct isl_basic_set *isl_basic_set_product(struct isl_basic_set_list *list);
-#define ISL_FORMAT_POLYLIB 1
-#define ISL_FORMAT_OMEGA 2
__isl_give isl_basic_set *isl_basic_set_read_from_file(isl_ctx *ctx,
- FILE *input, unsigned nparam, unsigned input_format);
+ FILE *input, unsigned nparam);
__isl_give isl_basic_set *isl_basic_set_read_from_str(isl_ctx *ctx,
- const char *str, unsigned nparam, unsigned input_format);
+ const char *str, unsigned nparam);
__isl_give isl_set *isl_set_read_from_file(isl_ctx *ctx,
- FILE *input, unsigned nparam, unsigned input_format);
-#define ISL_FORMAT_POLYLIB_CONSTRAINTS 3
+ FILE *input, unsigned nparam);
+#define ISL_FORMAT_POLYLIB 1
+#define ISL_FORMAT_POLYLIB_CONSTRAINTS 2
void isl_basic_set_print(__isl_keep isl_basic_set *bset, FILE *out, int indent,
const char *prefix, const char *suffix, unsigned output_format);
void isl_set_print(__isl_keep struct isl_set *set, FILE *out, int indent,
}
__isl_give isl_basic_map *isl_basic_map_read_from_file(isl_ctx *ctx,
- FILE *input, unsigned nparam, unsigned input_format)
+ FILE *input, unsigned nparam)
{
struct isl_basic_map *bmap;
struct isl_stream *s = isl_stream_new_file(ctx, input);
}
__isl_give isl_basic_set *isl_basic_set_read_from_file(isl_ctx *ctx,
- FILE *input, unsigned nparam, unsigned input_format)
+ FILE *input, unsigned nparam)
{
struct isl_basic_map *bmap;
- bmap = isl_basic_map_read_from_file(ctx, input, nparam, input_format);
+ bmap = isl_basic_map_read_from_file(ctx, input, nparam);
if (!bmap)
return NULL;
isl_assert(ctx, isl_basic_map_n_in(bmap) == 0, goto error);
}
struct isl_basic_map *isl_basic_map_read_from_str(struct isl_ctx *ctx,
- const char *str, unsigned nparam, unsigned input_format)
+ const char *str, unsigned nparam)
{
struct isl_basic_map *bmap;
struct isl_stream *s = isl_stream_new_str(ctx, str);
}
struct isl_basic_set *isl_basic_set_read_from_str(struct isl_ctx *ctx,
- const char *str, unsigned nparam, unsigned input_format)
+ const char *str, unsigned nparam)
{
struct isl_basic_map *bmap;
- bmap = isl_basic_map_read_from_str(ctx, str, nparam, input_format);
+ bmap = isl_basic_map_read_from_str(ctx, str, nparam);
if (!bmap)
return NULL;
isl_assert(ctx, isl_basic_map_n_in(bmap) == 0, goto error);
}
__isl_give isl_map *isl_map_read_from_file(struct isl_ctx *ctx,
- FILE *input, unsigned nparam, unsigned input_format)
+ FILE *input, unsigned nparam)
{
struct isl_map *map;
struct isl_stream *s = isl_stream_new_file(ctx, input);
}
__isl_give isl_set *isl_set_read_from_file(struct isl_ctx *ctx,
- FILE *input, unsigned nparam, unsigned input_format)
+ FILE *input, unsigned nparam)
{
struct isl_map *map;
- map = isl_map_read_from_file(ctx, input, nparam, input_format);
+ map = isl_map_read_from_file(ctx, input, nparam);
if (!map)
return NULL;
isl_assert(ctx, isl_map_n_in(map) == 0, goto error);
input = fopen(filename, "r");
assert(input);
- bset1 = isl_basic_set_read_from_file(ctx, input, 0, ISL_FORMAT_OMEGA);
- bset2 = isl_basic_set_read_from_str(ctx, str, 0, ISL_FORMAT_OMEGA);
+ bset1 = isl_basic_set_read_from_file(ctx, input, 0);
+ bset2 = isl_basic_set_read_from_str(ctx, str, 0);
assert(isl_basic_set_is_equal(bset1, bset2) == 1);
input = fopen(filename, "r");
assert(input);
- bset1 = isl_basic_set_read_from_file(ctx, input, 0, ISL_FORMAT_OMEGA);
- bmap = isl_basic_map_read_from_file(ctx, input, 0, ISL_FORMAT_OMEGA);
+ bset1 = isl_basic_set_read_from_file(ctx, input, 0);
+ bmap = isl_basic_map_read_from_file(ctx, input, 0);
bset1 = isl_basic_set_apply(bset1, bmap);
- bset2 = isl_basic_set_read_from_file(ctx, input, 0, ISL_FORMAT_OMEGA);
+ bset2 = isl_basic_set_read_from_file(ctx, input, 0);
assert(isl_basic_set_is_equal(bset1, bset2) == 1);
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_read_from_file(ctx, input, 0);
+ bset2 = isl_basic_set_read_from_file(ctx, input, 0);
bset1 = isl_basic_set_affine_hull(bset1);
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_read_from_file(ctx, input, 0);
+ bset2 = isl_basic_set_read_from_file(ctx, input, 0);
set = isl_basic_set_union(bset1, bset2);
bset1 = isl_set_convex_hull(set);
- bset2 = isl_basic_set_read_from_file(ctx, input, 0, ISL_FORMAT_POLYLIB);
+ bset2 = isl_basic_set_read_from_file(ctx, input, 0);
assert(isl_basic_set_is_equal(bset1, bset2) == 1);
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_read_from_file(ctx, input, 0);
+ bset2 = isl_basic_set_read_from_file(ctx, input, 0);
bset1 = isl_basic_set_gist(bset1, bset2);
- bset2 = isl_basic_set_read_from_file(ctx, input, 0, ISL_FORMAT_POLYLIB);
+ bset2 = isl_basic_set_read_from_file(ctx, input, 0);
assert(isl_basic_set_is_equal(bset1, bset2) == 1);
struct isl_basic_set *bset2;
struct isl_set *set1, *set2;
- bset1 = isl_basic_set_read_from_str(ctx, s1, 0, ISL_FORMAT_OMEGA);
- bset2 = isl_basic_set_read_from_str(ctx, s2, 0, ISL_FORMAT_OMEGA);
+ bset1 = isl_basic_set_read_from_str(ctx, s1, 0);
+ bset2 = isl_basic_set_read_from_str(ctx, s2, 0);
set1 = isl_set_from_basic_set(bset1);
set2 = isl_set_from_basic_set(bset2);
return isl_set_union(set1, set2);
ctx = isl_ctx_alloc_with_options(options->isl);
options->isl = NULL;
- context = isl_basic_set_read_from_file(ctx, stdin, 0, ISL_FORMAT_POLYLIB);
+ context = isl_basic_set_read_from_file(ctx, stdin, 0);
assert(context);
n = fscanf(stdin, "%d", &neg_one);
assert(n == 1);
assert(neg_one == -1);
bset = isl_basic_set_read_from_file(ctx, stdin,
- isl_basic_set_dim(context, isl_dim_set), ISL_FORMAT_POLYLIB);
+ isl_basic_set_dim(context, isl_dim_set));
while (fgets(s, sizeof(s), stdin)) {
if (strncasecmp(s, "Maximize", 8) == 0)
struct isl_ctx *ctx = isl_ctx_alloc();
struct isl_basic_set *bset;
- bset = isl_basic_set_read_from_file(ctx, stdin, 0, ISL_FORMAT_POLYLIB);
+ bset = isl_basic_set_read_from_file(ctx, stdin, 0);
bset = isl_basic_set_detect_equalities(bset);
isl_basic_set_print(bset, stdout, 0, "", "", ISL_FORMAT_POLYLIB);
isl_basic_set_free(bset);
enum isl_lp_result res;
isl_int_init(opt);
- bset = isl_basic_set_read_from_file(ctx, stdin, 0, ISL_FORMAT_POLYLIB);
+ bset = isl_basic_set_read_from_file(ctx, stdin, 0);
assert(bset);
obj = isl_vec_read_from_file(ctx, stdin, ISL_FORMAT_POLYLIB);
assert(obj);
struct isl_basic_set *bset;
struct isl_vec *sample;
- bset = isl_basic_set_read_from_file(ctx, stdin, 0, ISL_FORMAT_POLYLIB);
+ bset = isl_basic_set_read_from_file(ctx, stdin, 0);
sample = isl_basic_set_sample_vec(isl_basic_set_copy(bset));
isl_vec_dump(sample, stdout, 0);
assert(sample);
struct isl_basic_set *bset;
struct isl_mat *samples;
- bset = isl_basic_set_read_from_file(ctx, stdin, 0, ISL_FORMAT_POLYLIB);
+ bset = isl_basic_set_read_from_file(ctx, stdin, 0);
samples = isl_basic_set_samples(bset);
isl_mat_dump(samples, stdout, 0);
isl_mat_free(samples);