diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2011-09-22 12:00:15 +0200 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2011-09-22 13:24:13 +0200 |
commit | 2d6726a1603607dfee8a3eacf357b91363fe2a30 (patch) | |
tree | d9770f3a24365c9be6138e545aa202db0b1ff915 /isl_space.c | |
parent | dbb61f82cfb84f18d8df5d2aa114fd114d559d39 (diff) | |
download | isl-2d6726a1603607dfee8a3eacf357b91363fe2a30.tar.gz isl-2d6726a1603607dfee8a3eacf357b91363fe2a30.tar.bz2 isl-2d6726a1603607dfee8a3eacf357b91363fe2a30.zip |
add isl_space_set_from_params
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Diffstat (limited to 'isl_space.c')
-rw-r--r-- | isl_space.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/isl_space.c b/isl_space.c index 7bac5784..2b092043 100644 --- a/isl_space.c +++ b/isl_space.c @@ -1246,6 +1246,19 @@ __isl_give isl_space *isl_space_params(__isl_take isl_space *space) return space; } +__isl_give isl_space *isl_space_set_from_params(__isl_take isl_space *space) +{ + if (!space) + return NULL; + if (!isl_space_is_params(space)) + isl_die(isl_space_get_ctx(space), isl_error_invalid, + "not a parameter space", goto error); + return isl_space_reset(space, isl_dim_set); +error: + isl_space_free(space); + return NULL; +} + __isl_give isl_space *isl_space_as_set_space(__isl_take isl_space *dim) { dim = isl_space_cow(dim); |