From 1626a1787dae6b37608654e8d98d1b1cafa11ecf Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 27 Aug 2011 10:57:25 +0200 Subject: [PATCH] add isl_space_params_alloc Signed-off-by: Sven Verdoolaege --- doc/user.pod | 8 ++++++-- include/isl/space.h | 1 + isl_space.c | 9 +++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/user.pod b/doc/user.pod index efa9e2a..8f2fd63 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -466,6 +466,8 @@ the space in which it lives needs to be specified using an C. #include __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. 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. +For other sets, the space needs to be created using C, while -that for creating a relation +for a relation, the space needs to be created using C. C can be used to find out the number of dimensions of each type in diff --git a/include/isl/space.h b/include/isl/space.h index 92ee6b1..ce38f33 100644 --- a/include/isl/space.h +++ b/include/isl/space.h @@ -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); diff --git a/isl_space.c b/isl_space.c index 46262ff..971c111 100644 --- a/isl_space.c +++ b/isl_space.c @@ -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) { -- 2.7.4