imath backend: use tailored isl_int_fdiv_q_ui
commit9bf8799c8f4e0ad294bcf6f214c718925e298d20
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 15 Apr 2017 13:05:58 +0000 (15 15:05 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Thu, 25 May 2017 14:13:31 +0000 (25 16:13 +0200)
treefe028b830c0a0e901fce39279eb1921df12e89a6
parent662a4d057a4109b3bd85092fabb0acc2eccded61
imath backend: use tailored isl_int_fdiv_q_ui

In particular, simply convert the unsigned long argument to an mpz_t and
call impz_fdiv_q.  impz_fdiv_q_ui does essentially the same, but it
computes the integer division twice, once to get the quotient and
once to get the remainder.  The remainder is needed because
impz_fdiv_q_ui is meant to mimic gmp's mpz_fdiv_q_ui, which
returns this remainder.  However, there is no need for
the isl_int_fdiv_q_ui macro to return this remainder.

This change is unlikely to result in any measurable performance
improvement, but it still feels better to only compute the integer
division once.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
imath_wrap/wrap.h
isl_imath.c
isl_imath.h
isl_int_imath.h