diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2013-06-18 12:32:05 +0200 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2013-06-18 12:32:05 +0200 |
commit | f04492f2cd692fea0e0628fcf2b2eff546690f57 (patch) | |
tree | 06b5bdc13a7222331dfb7e96dbb23731248767ca | |
parent | f3a1006069d7ab5b395c63014e17eb1b92c12607 (diff) | |
download | isl-f04492f2cd692fea0e0628fcf2b2eff546690f57.tar.gz isl-f04492f2cd692fea0e0628fcf2b2eff546690f57.tar.bz2 isl-f04492f2cd692fea0e0628fcf2b2eff546690f57.zip |
remove *_scale_vec functions
They have been superseded by *_scale_multi_val functions, which provide
a nicer interface. Since the *_scale_vec functions were introduced
after the latest release, removing them does not cause any backward
compatibility problems.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
-rw-r--r-- | doc/user.pod | 11 | ||||
-rw-r--r-- | include/isl/aff.h | 7 | ||||
-rw-r--r-- | isl_aff.c | 98 |
3 files changed, 0 insertions, 116 deletions
diff --git a/doc/user.pod b/doc/user.pod index 4590af8c..12f1cefa 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -4401,20 +4401,9 @@ C<isl_multi_aff_sub> subtracts the second argument from the first. isl_union_pw_multi_aff_scale_multi_val( __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_multi_val *mv); - __isl_give isl_multi_aff *isl_multi_aff_scale_vec( - __isl_take isl_multi_aff *ma, - __isl_take isl_vec *v); - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_vec( - __isl_take isl_pw_multi_aff *pma, - __isl_take isl_vec *v); - __isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_vec( - __isl_take isl_union_pw_multi_aff *upma, - __isl_take isl_vec *v); C<isl_multi_aff_scale_multi_val> scales the elements of C<ma> by the corresponding elements of C<mv>. -C<isl_multi_aff_scale_vec> scales the first elements of C<ma> -by the corresponding elements of C<v>. __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_params( __isl_take isl_pw_multi_aff *pma, diff --git a/include/isl/aff.h b/include/isl/aff.h index 8aa9e357..eb85f4ab 100644 --- a/include/isl/aff.h +++ b/include/isl/aff.h @@ -9,7 +9,6 @@ #include <isl/multi.h> #include <isl/union_set_type.h> #include <isl/val.h> -#include <isl/vec.h> #if defined(__cplusplus) extern "C" { @@ -311,8 +310,6 @@ __isl_give isl_multi_aff *isl_multi_aff_sub(__isl_take isl_multi_aff *ma1, __isl_give isl_multi_aff *isl_multi_aff_scale(__isl_take isl_multi_aff *maff, isl_int f); -__isl_give isl_multi_aff *isl_multi_aff_scale_vec(__isl_take isl_multi_aff *ma, - __isl_take isl_vec *v); __isl_give isl_multi_aff *isl_multi_aff_product( __isl_take isl_multi_aff *ma1, __isl_take isl_multi_aff *ma2); @@ -411,8 +408,6 @@ __isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_val( __isl_take isl_pw_multi_aff *pma, __isl_take isl_val *v); __isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_multi_val( __isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_val *mv); -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_vec( - __isl_take isl_pw_multi_aff *pma, __isl_take isl_vec *v); __isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_lexmin( __isl_take isl_pw_multi_aff *pma1, @@ -502,8 +497,6 @@ __isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_sub( __isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_multi_val( __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_multi_val *mv); -__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_vec( - __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_vec *v); __isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_flat_range_product( __isl_take isl_union_pw_multi_aff *upma1, @@ -5186,104 +5186,6 @@ error: #include <isl_multi_templ.c> -/* Scale the first elements of "ma" by the corresponding elements of "vec". - */ -__isl_give isl_multi_aff *isl_multi_aff_scale_vec(__isl_take isl_multi_aff *ma, - __isl_take isl_vec *vec) -{ - int i, n; - isl_int v; - - if (!ma || !vec) - goto error; - - n = isl_multi_aff_dim(ma, isl_dim_out); - if (isl_vec_size(vec) < n) - n = isl_vec_size(vec); - - isl_int_init(v); - for (i = 0; i < n; ++i) { - isl_aff *aff; - - isl_vec_get_element(vec, i, &v); - - aff = isl_multi_aff_get_aff(ma, i); - aff = isl_aff_scale(aff, v); - ma = isl_multi_aff_set_aff(ma, i, aff); - } - isl_int_clear(v); - - isl_vec_free(vec); - return ma; -error: - isl_vec_free(vec); - isl_multi_aff_free(ma); - return NULL; -} - -/* Scale the first elements of "pma" by the corresponding elements of "vec". - */ -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_vec( - __isl_take isl_pw_multi_aff *pma, __isl_take isl_vec *v) -{ - int i; - - pma = isl_pw_multi_aff_cow(pma); - if (!pma || !v) - goto error; - - for (i = 0; i < pma->n; ++i) { - pma->p[i].maff = isl_multi_aff_scale_vec(pma->p[i].maff, - isl_vec_copy(v)); - if (!pma->p[i].maff) - goto error; - } - - isl_vec_free(v); - return pma; -error: - isl_vec_free(v); - isl_pw_multi_aff_free(pma); - return NULL; -} - -/* This function is called for each entry of an isl_union_pw_multi_aff. - * Replace the entry by the result of applying isl_pw_multi_aff_scale_vec - * to the original entry with the isl_vec in "user" as extra argument. - */ -static int union_pw_multi_aff_scale_vec_entry(void **entry, void *user) -{ - isl_pw_multi_aff **pma = (isl_pw_multi_aff **) entry; - isl_vec *v = user; - - *pma = isl_pw_multi_aff_scale_vec(*pma, isl_vec_copy(v)); - if (!*pma) - return -1; - - return 0; -} - -/* Scale the first elements of "upma" by the corresponding elements of "vec". - */ -__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_vec( - __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_vec *v) -{ - upma = isl_union_pw_multi_aff_cow(upma); - if (!upma || !v) - goto error; - - if (isl_hash_table_foreach(upma->dim->ctx, &upma->table, - &union_pw_multi_aff_scale_vec_entry, v) < 0) - goto error; - - isl_vec_free(v); - return upma; -error: - isl_vec_free(v); - isl_union_pw_multi_aff_free(upma); - return NULL; -} - /* Scale the elements of "pma" by the corresponding elements of "mv". */ __isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_multi_val( |