From 63e7eda63686ab054605f368388f531434239f30 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 18 Aug 2011 20:03:41 +0200 Subject: [PATCH] add isl_space_params Signed-off-by: Sven Verdoolaege --- doc/user.pod | 2 ++ include/isl/space.h | 1 + isl_space.c | 9 +++++++++ 3 files changed, 12 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index f382895d..3d9a0078 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -622,6 +622,8 @@ using the following functions. __isl_give isl_space *isl_space_from_domain(__isl_take isl_space *space); __isl_give isl_space *isl_space_range(__isl_take isl_space *space); __isl_give isl_space *isl_space_from_range(__isl_take isl_space *space); + __isl_give isl_space *isl_space_params( + __isl_take isl_space *space); __isl_give isl_space *isl_space_reverse(__isl_take isl_space *space); __isl_give isl_space *isl_space_join(__isl_take isl_space *left, __isl_take isl_space *right); diff --git a/include/isl/space.h b/include/isl/space.h index c2cd1b15..8a859ae7 100644 --- a/include/isl/space.h +++ b/include/isl/space.h @@ -94,6 +94,7 @@ __isl_give isl_space *isl_space_domain(__isl_take isl_space *dim); __isl_give isl_space *isl_space_from_domain(__isl_take isl_space *dim); __isl_give isl_space *isl_space_range(__isl_take isl_space *dim); __isl_give isl_space *isl_space_from_range(__isl_take isl_space *dim); +__isl_give isl_space *isl_space_params(__isl_take isl_space *space); __isl_give isl_space *isl_space_align_params(__isl_take isl_space *dim1, __isl_take isl_space *dim2); diff --git a/isl_space.c b/isl_space.c index a7d7d53a..f0b14bc0 100644 --- a/isl_space.c +++ b/isl_space.c @@ -1098,6 +1098,15 @@ __isl_give isl_space *isl_space_from_range(__isl_take isl_space *dim) return dim; } +__isl_give isl_space *isl_space_params(__isl_take isl_space *space) +{ + space = isl_space_drop_dims(space, + isl_dim_in, 0, isl_space_dim(space, isl_dim_in)); + space = isl_space_drop_dims(space, + isl_dim_out, 0, isl_space_dim(space, isl_dim_out)); + return space; +} + __isl_give isl_space *isl_space_as_set_space(__isl_take isl_space *dim) { dim = isl_space_cow(dim); -- 2.11.4.GIT