[Gmp-commit] /var/hg/gmp: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Thu Aug 20 06:19:12 UTC 2015


details:   /var/hg/gmp/rev/57c22cc42dda
changeset: 16774:57c22cc42dda
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Thu Aug 20 08:16:32 2015 +0200
description:
gmp-impl.h: New MPQ_{SRC,}PTR_SWAP macro

details:   /var/hg/gmp/rev/1fac4f92ac04
changeset: 16775:1fac4f92ac04
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Thu Aug 20 08:19:02 2015 +0200
description:
ChangeLog

diffstat:

 ChangeLog  |   4 +++-
 gmp-impl.h |  13 +++++++++++++
 2 files changed, 16 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r 3c383927c9b8 -r 1fac4f92ac04 ChangeLog
--- a/ChangeLog	Wed Aug 19 08:06:42 2015 +0200
+++ b/ChangeLog	Thu Aug 20 08:19:02 2015 +0200
@@ -1,8 +1,10 @@
-2015-08-04 Marco Bodrato <bodrato at mail.dm.unipi.it>
+2015-08-18 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mpn/generic/rootrem.c (logbased_root): New function.
 	(mpn_rootrem_internal): Use it to estimate highest 9 bits of the root.
 
+	* gmp-impl.h (MPQ_PTR_SWAP, MPQ_SRCPTR_SWAP): New macros.
+
 2015-08-17  Torbjörn Granlund  <torbjorng at google.com>
 
 	* acinclude.m4 (X86_64_PATTERN): Add skylake.
diff -r 3c383927c9b8 -r 1fac4f92ac04 gmp-impl.h
--- a/gmp-impl.h	Wed Aug 19 08:06:42 2015 +0200
+++ b/gmp-impl.h	Thu Aug 20 08:19:02 2015 +0200
@@ -677,6 +677,19 @@
     (y) = __mpz_srcptr_swap__tmp;					\
   } while (0)
 
+#define MPQ_PTR_SWAP(x, y)						\
+  do {                                                                  \
+    mpq_ptr __mpq_ptr_swap__tmp = (x);					\
+    (x) = (y);                                                          \
+    (y) = __mpq_ptr_swap__tmp;						\
+  } while (0)
+#define MPQ_SRCPTR_SWAP(x, y)                                           \
+  do {                                                                  \
+    mpq_srcptr __mpq_srcptr_swap__tmp = (x);                            \
+    (x) = (y);                                                          \
+    (y) = __mpq_srcptr_swap__tmp;                                       \
+  } while (0)
+
 
 /* Enhancement: __gmp_allocate_func could have "__attribute__ ((malloc))",
    but current gcc (3.0) doesn't seem to support that.  */


More information about the gmp-commit mailing list