add isl_space_params_alloc
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 27 Aug 2011 08:57:25 +0000 (10:57 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 3 Sep 2011 10:04:55 +0000 (12:04 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/space.h
isl_space.c

index efa9e2a..8f2fd63 100644 (file)
@@ -466,6 +466,8 @@ the space in which it lives needs to be specified using an C<isl_space>.
        #include <isl/space.h>
        __isl_give isl_space *isl_space_alloc(isl_ctx *ctx,
                unsigned nparam, unsigned n_in, unsigned n_out);
+       __isl_give isl_space *isl_space_params_alloc(isl_ctx *ctx,
+               unsigned nparam);
        __isl_give isl_space *isl_space_set_alloc(isl_ctx *ctx,
                unsigned nparam, unsigned dim);
        __isl_give isl_space *isl_space_copy(__isl_keep isl_space *space);
@@ -473,9 +475,11 @@ the space in which it lives needs to be specified using an C<isl_space>.
        unsigned isl_space_dim(__isl_keep isl_space *space,
                enum isl_dim_type type);
 
-The space used for creating a set
+The space used for creating a parameter domain
+needs to be created using C<isl_space_params_alloc>.
+For other sets, the space
 needs to be created using C<isl_space_set_alloc>, while
-that for creating a relation
+for a relation, the space
 needs to be created using C<isl_space_alloc>.
 C<isl_space_dim> can be used
 to find out the number of dimensions of each type in
index 92ee6b1..ce38f33 100644 (file)
@@ -36,6 +36,7 @@ __isl_give isl_space *isl_space_alloc(isl_ctx *ctx,
                        unsigned nparam, unsigned n_in, unsigned n_out);
 __isl_give isl_space *isl_space_set_alloc(isl_ctx *ctx,
                        unsigned nparam, unsigned dim);
+__isl_give isl_space *isl_space_params_alloc(isl_ctx *ctx, unsigned nparam);
 __isl_give isl_space *isl_space_copy(__isl_keep isl_space *dim);
 void isl_space_free(__isl_take isl_space *dim);
 
index 46262ff..971c111 100644 (file)
@@ -54,6 +54,15 @@ __isl_give isl_space *isl_space_set_alloc(isl_ctx *ctx,
        return isl_space_alloc(ctx, nparam, 0, dim);
 }
 
+/* Create a space for a parameter domain.
+ */
+__isl_give isl_space *isl_space_params_alloc(isl_ctx *ctx, unsigned nparam)
+{
+       isl_space *space;
+       space = isl_space_alloc(ctx, nparam, 0, 0);
+       return space;
+}
+
 static unsigned global_pos(__isl_keep isl_space *dim,
                                 enum isl_dim_type type, unsigned pos)
 {