From 692e360327cbfff140c23c3e0b341fa0254859ab Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 10 Jan 2014 09:35:07 +0100 Subject: [PATCH] add isl_space_factor_range 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 f3ffbe64..d384e228 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -5491,6 +5491,8 @@ instead. __isl_take isl_union_pw_multi_aff *upma2); #include + __isl_give isl_space *isl_space_factor_range( + __isl_take isl_space *space); __isl_give isl_space *isl_space_domain_factor_domain( __isl_take isl_space *space); __isl_give isl_space *isl_space_domain_factor_range( diff --git a/include/isl/space.h b/include/isl/space.h index 1410c740..9476fcf1 100644 --- a/include/isl/space.h +++ b/include/isl/space.h @@ -96,6 +96,7 @@ __isl_give isl_space *isl_space_domain_product(__isl_take isl_space *left, __isl_take isl_space *right); __isl_give isl_space *isl_space_range_product(__isl_take isl_space *left, __isl_take isl_space *right); +__isl_give isl_space *isl_space_factor_range(__isl_take isl_space *space); __isl_give isl_space *isl_space_domain_factor_domain( __isl_take isl_space *space); __isl_give isl_space *isl_space_domain_factor_range( diff --git a/isl_space.c b/isl_space.c index 822d7f77..e284504f 100644 --- a/isl_space.c +++ b/isl_space.c @@ -1271,6 +1271,15 @@ error: return NULL; } +/* Given a space of the form [A -> B] -> [C -> D], return the space B -> D. + */ +__isl_give isl_space *isl_space_factor_range(__isl_take isl_space *space) +{ + space = isl_space_domain_factor_range(space); + space = isl_space_range_factor_range(space); + return space; +} + /* Given a space of the form [A -> B] -> C, return the space A -> C. */ __isl_give isl_space *isl_space_domain_factor_domain( -- 2.11.4.GIT