isl_ctx *ctx, const char *str, int nparam);
__isl_give isl_set *isl_set_read_from_file(isl_ctx *ctx,
FILE *input, int nparam);
+ __isl_give isl_set *isl_set_read_from_str(isl_ctx *ctx,
+ const char *str, int nparam);
#include <isl_map.h>
__isl_give isl_basic_map *isl_basic_map_read_from_file(
const char *str, int nparam);
__isl_give isl_set *isl_set_read_from_file(isl_ctx *ctx,
FILE *input, int nparam);
+__isl_give isl_set *isl_set_read_from_str(isl_ctx *ctx,
+ const char *str, int 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,
return NULL;
}
+struct isl_set *isl_set_read_from_str(struct isl_ctx *ctx,
+ const char *str, int nparam)
+{
+ struct isl_map *map;
+ map = isl_map_read_from_str(ctx, str, nparam);
+ if (!map)
+ return NULL;
+ isl_assert(ctx, isl_map_n_in(map) == 0, goto error);
+ return (struct isl_set *)map;
+error:
+ isl_map_free(map);
+ return NULL;
+}
+
static char *next_line(FILE *input, char *line, unsigned len)
{
char *p;