X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=isl_morph.c;h=8bc4db82eeeee7e67786fb29a5216298b90ac2aa;hb=093abd9827a83a22e2f06ff1e0f6f14d8ed9245c;hp=80ec05acfa3540631ddd434ed975fe5639eac1f4;hpb=626782d07926b9514a45c0d4dc57086692bb6c13;p=platform%2Fupstream%2Fisl.git diff --git a/isl_morph.c b/isl_morph.c index 80ec05a..8bc4db8 100644 --- a/isl_morph.c +++ b/isl_morph.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -23,7 +24,7 @@ __isl_give isl_morph *isl_morph_alloc( if (!dom || !ran || !map || !inv) goto error; - morph = isl_alloc_type(in_dim->ctx, struct isl_morph); + morph = isl_alloc_type(dom->ctx, struct isl_morph); if (!morph) goto error; @@ -95,6 +96,22 @@ __isl_give isl_dim *isl_morph_get_ran_dim(__isl_keep isl_morph *morph) return isl_dim_copy(morph->ran->dim); } +unsigned isl_morph_dom_dim(__isl_keep isl_morph *morph, enum isl_dim_type type) +{ + if (!morph) + return 0; + + return isl_basic_set_dim(morph->dom, type); +} + +unsigned isl_morph_ran_dim(__isl_keep isl_morph *morph, enum isl_dim_type type) +{ + if (!morph) + return 0; + + return isl_basic_set_dim(morph->ran, type); +} + __isl_give isl_morph *isl_morph_remove_dom_dims(__isl_take isl_morph *morph, enum isl_dim_type type, unsigned first, unsigned n) {