diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2014-06-30 09:57:36 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2014-06-30 09:57:36 +0000 |
commit | db110f3c56448f3084cc474bf4185ee2486ae96b (patch) | |
tree | 24f505fec32f9b67f9820330704f60a79bf9ada8 /src/mul_ui.c | |
parent | 4be6dad958efb74af2abde7c50f654ebcbb4d7d2 (diff) | |
download | mpfr-db110f3c56448f3084cc474bf4185ee2486ae96b.tar.gz |
New macros for mpfr_{mul,div}_ui to optimize the call when the integer
is a constant number that is a power of 2.
New macros for mpfr_{mul,div}_si to optimize the call when the integer
is a constant number that is positive.
(Modified patch from Patrick PĂ©lissier)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9111 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/mul_ui.c')
-rw-r--r-- | src/mul_ui.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mul_ui.c b/src/mul_ui.c index 4c3e063b0..2ad96e50e 100644 --- a/src/mul_ui.c +++ b/src/mul_ui.c @@ -24,6 +24,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #define MPFR_NEED_LONGLONG_H #include "mpfr-impl.h" +#undef mpfr_mul_ui MPFR_HOT_FUNCTION_ATTR int mpfr_mul_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mpfr_rnd_t rnd_mode) { @@ -118,6 +119,7 @@ mpfr_mul_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mpfr_rnd_t rnd_mode return inexact; } +#undef mpfr_mul_si int mpfr_mul_si (mpfr_ptr y, mpfr_srcptr x, long int u, mpfr_rnd_t rnd_mode) { int res; |