diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2010-11-11 12:42:50 +0100 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2010-11-12 10:36:29 +0100 |
commit | 37d11ffeb7e18553e2c9182a8c4889fd1052a1ce (patch) | |
tree | ba22fc8a08f603d4028c10309648c0e53800e733 | |
parent | e87d6a05c8cc412abd7c1061cf9cb577f62d6ad6 (diff) | |
download | isl-37d11ffeb7e18553e2c9182a8c4889fd1052a1ce.tar.gz isl-37d11ffeb7e18553e2c9182a8c4889fd1052a1ce.tar.bz2 isl-37d11ffeb7e18553e2c9182a8c4889fd1052a1ce.zip |
add isl_vec_clr
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
-rw-r--r-- | include/isl_vec.h | 1 | ||||
-rw-r--r-- | isl_vec.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/isl_vec.h b/include/isl_vec.h index 3107311a..f1f2078f 100644 --- a/include/isl_vec.h +++ b/include/isl_vec.h @@ -42,6 +42,7 @@ void isl_vec_dump(struct isl_vec *vec, FILE *out, int indent); void isl_vec_lcm(struct isl_vec *vec, isl_int *lcm); struct isl_vec *isl_vec_ceil(struct isl_vec *vec); struct isl_vec *isl_vec_normalize(struct isl_vec *vec); +__isl_give isl_vec *isl_vec_clr(__isl_take isl_vec *vec); __isl_give isl_vec *isl_vec_scale(__isl_take isl_vec *vec, isl_int m); __isl_give isl_vec *isl_vec_add(__isl_take isl_vec *vec1, __isl_take isl_vec *vec2); @@ -146,6 +146,15 @@ void isl_vec_dump(struct isl_vec *vec, FILE *out, int indent) fprintf(out, "]\n"); } +__isl_give isl_vec *isl_vec_clr(__isl_take isl_vec *vec) +{ + vec = isl_vec_cow(vec); + if (!vec) + return NULL; + isl_seq_clr(vec->el, vec->size); + return vec; +} + void isl_vec_lcm(struct isl_vec *vec, isl_int *lcm) { isl_seq_lcm(vec->block.data, vec->size, lcm); |