From e0839a446dffce4291636032e26f182c0665548f Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 27 Oct 2014 14:01:25 +0100 Subject: [PATCH] add isl_space_factor_domain 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 d384e228..dea9cfc2 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_domain( + __isl_take isl_space *space); __isl_give isl_space *isl_space_factor_range( __isl_take isl_space *space); __isl_give isl_space *isl_space_domain_factor_domain( diff --git a/include/isl/space.h b/include/isl/space.h index 9476fcf1..d6fce404 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_domain(__isl_take isl_space *space); __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); diff --git a/isl_space.c b/isl_space.c index e284504f..1a5d6d3b 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 A -> C. + */ +__isl_give isl_space *isl_space_factor_domain(__isl_take isl_space *space) +{ + space = isl_space_domain_factor_domain(space); + space = isl_space_range_factor_domain(space); + return space; +} + /* 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) -- 2.11.4.GIT