Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81477 - trunk/boost/multiprecision
From: john_at_[hidden]
Date: 2012-11-22 04:56:48


Author: johnmaddock
Date: 2012-11-22 04:56:47 EST (Thu, 22 Nov 2012)
New Revision: 81477
URL: http://svn.boost.org/trac/boost/changeset/81477

Log:
Small optimisation for integer modulus.
Text files modified:
   trunk/boost/multiprecision/gmp.hpp | 3 +--
   1 files changed, 1 insertions(+), 2 deletions(-)

Modified: trunk/boost/multiprecision/gmp.hpp
==============================================================================
--- trunk/boost/multiprecision/gmp.hpp (original)
+++ trunk/boost/multiprecision/gmp.hpp 2012-11-22 04:56:47 EST (Thu, 22 Nov 2012)
@@ -1636,8 +1636,7 @@
 {
    if((sizeof(Integer) <= sizeof(long)) || (val <= (std::numeric_limits<unsigned long>::max)()))
    {
- gmp_int r;
- return mpz_tdiv_r_ui(r.data(), x.data(), val);
+ return mpz_tdiv_ui(x.data(), val);
    }
    else
    {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk