add isl_map_read_from_str
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 23 Jan 2010 21:52:02 +0000 (22:52 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 25 Jan 2010 16:45:12 +0000 (17:45 +0100)
doc/user.pod
include/isl_map.h
isl_input.c

index 67c5091..a4bc5b2 100644 (file)
@@ -390,6 +390,8 @@ to foreign file formats.
                isl_ctx *ctx, const char *str, int nparam);
        __isl_give isl_map *isl_map_read_from_file(
                struct isl_ctx *ctx, FILE *input, int nparam);
+       __isl_give isl_map *isl_map_read_from_str(isl_ctx *ctx,
+               const char *str, int nparam);
 
 The input may be either in C<PolyLib> format or in the
 C<isl> format, which is similar to the C<Omega> format.
index 3cc0492..e26c691 100644 (file)
@@ -187,6 +187,8 @@ __isl_give isl_basic_map *isl_basic_map_read_from_str(isl_ctx *ctx,
                const char *str, int nparam);
 __isl_give isl_map *isl_map_read_from_file(struct isl_ctx *ctx,
                FILE *input, int nparam);
+__isl_give isl_map *isl_map_read_from_str(isl_ctx *ctx,
+               const char *str, int nparam);
 struct isl_basic_map *isl_basic_map_fix_si(struct isl_basic_map *bmap,
                enum isl_dim_type type, unsigned pos, int value);
 
index db3d619..43385e9 100644 (file)
@@ -898,6 +898,18 @@ __isl_give isl_map *isl_map_read_from_file(struct isl_ctx *ctx,
        return map;
 }
 
+__isl_give isl_map *isl_map_read_from_str(struct isl_ctx *ctx,
+               const char *str, int nparam)
+{
+       struct isl_map *map;
+       struct isl_stream *s = isl_stream_new_str(ctx, str);
+       if (!s)
+               return NULL;
+       map = map_read(s, nparam);
+       isl_stream_free(s);
+       return map;
+}
+
 __isl_give isl_set *isl_set_read_from_file(struct isl_ctx *ctx,
                FILE *input, int nparam)
 {