Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit b9e81e8

Browse files
author
Sven Verdoolaege
committed
simplify operator/(isl::aff A, int i)
There is no point in creating an isl::aff from an isl::val only to have the constant value extracted again inside isl.
1 parent 95b854a commit b9e81e8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tc/external/detail/islpp-inl.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ inline isl::aff operator*(isl::aff A, isl::val V) {
3838
}
3939

4040
inline isl::aff operator/(isl::aff A, int i) {
41-
isl::ctx ctx = A.get_ctx();
42-
isl::aff T(isl::local_space(A.get_space().domain()), isl::val(ctx, i));
43-
return A.div(T);
41+
return A.scale_down(isl::val(A.get_ctx(), i));
4442
}
4543

4644
inline isl::aff operator+(int i, isl::aff A) {

0 commit comments

Comments
 (0)