[Gmp-commit] /var/hg/gmp: Whitespace cleanup.

mercurial at gmplib.org mercurial at gmplib.org
Sat Nov 17 22:46:12 CET 2012


details:   /var/hg/gmp/rev/137030704983
changeset: 15120:137030704983
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sat Nov 17 22:46:09 2012 +0100
description:
Whitespace cleanup.

diffstat:

 demos/calc/calclex.c                   |   2 +-
 gen-fac.c                              |   4 ++--
 mini-gmp/mini-gmp.c                    |   4 ++--
 mpn/arm/arm-defs.m4                    |   2 +-
 mpn/generic/broot.c                    |   2 +-
 mpn/generic/brootinv.c                 |  10 +++++-----
 mpn/x86_64/bobcat/copyd.asm            |   2 +-
 mpn/x86_64/bobcat/copyi.asm            |   2 +-
 mpn/x86_64/fastsse/lshift-movdqu2.asm  |   2 +-
 mpn/x86_64/fastsse/lshiftc-movdqu2.asm |   2 +-
 mpn/x86_64/fastsse/rshift-movdqu2.asm  |   2 +-
 mpz/bin_uiui.c                         |   2 +-
 tests/mpn/t-brootinv.c                 |   2 +-
 tests/mpz/t-mfac_uiui.c                |  10 +++++-----
 tune/speed.c                           |   2 +-
 15 files changed, 25 insertions(+), 25 deletions(-)

diffs (255 lines):

diff -r 68755226fce7 -r 137030704983 demos/calc/calclex.c
--- a/demos/calc/calclex.c	Fri Nov 16 20:16:54 2012 +0100
+++ b/demos/calc/calclex.c	Sat Nov 17 22:46:09 2012 +0100
@@ -112,7 +112,7 @@
  * int a single C statement (which needs a semi-colon terminator).  This
  * avoids problems with code like:
  *
- * 	if ( condition_holds )
+ *	if ( condition_holds )
  *		yyless( 5 );
  *	else
  *		do_something_else();
diff -r 68755226fce7 -r 137030704983 gen-fac.c
--- a/gen-fac.c	Fri Nov 16 20:16:54 2012 +0100
+++ b/gen-fac.c	Sat Nov 17 22:46:09 2012 +0100
@@ -107,8 +107,8 @@
     {
       for (a = b; (a & 1) == 0; a >>= 1);
       if (a == b) {
-	mpz_divexact_ui (y, y, a/2+1); 
-	mpz_mul_ui (y, y, a); 
+	mpz_divexact_ui (y, y, a/2+1);
+	mpz_mul_ui (y, y, a);
       } else
 	mpz_mul_2exp (y, y, 1);
       if (mpz_sizeinbase (y, 2) > numb)
diff -r 68755226fce7 -r 137030704983 mini-gmp/mini-gmp.c
--- a/mini-gmp/mini-gmp.c	Fri Nov 16 20:16:54 2012 +0100
+++ b/mini-gmp/mini-gmp.c	Sat Nov 17 22:46:09 2012 +0100
@@ -2207,7 +2207,7 @@
 void
 mpz_mod (mpz_t r, const mpz_t n, const mpz_t d)
 {
-  if (d->_mp_size >= 0) 
+  if (d->_mp_size >= 0)
     mpz_div_qr (NULL, r, n, d, DIV_FLOOR);
   else
     mpz_div_qr (NULL, r, n, d, DIV_CEIL);
@@ -3116,7 +3116,7 @@
   mpz_init (u);
   mpz_setbit (t, mpz_sizeinbase (y, 2) / z + 1);
 
-  if (z == 2) /* simplify sqrt loop: z-1 == 1 */    
+  if (z == 2) /* simplify sqrt loop: z-1 == 1 */
     do {
       mpz_swap (u, t);			/* u = x */
       mpz_tdiv_q (t, y, u);		/* t = y/x */
diff -r 68755226fce7 -r 137030704983 mpn/arm/arm-defs.m4
--- a/mpn/arm/arm-defs.m4	Fri Nov 16 20:16:54 2012 +0100
+++ b/mpn/arm/arm-defs.m4	Sat Nov 17 22:46:09 2012 +0100
@@ -51,7 +51,7 @@
 define(`lea_num',0)
 
 dnl  LEA(reg,gmp_symbol)
-dnl  
+dnl
 dnl  Load the address of gmp_symbol into a register.  The gmp_symbol must be
 dnl  either local or protected/hidden, since we assume it has a fixed distance
 dnl  from the point of use.
diff -r 68755226fce7 -r 137030704983 mpn/generic/broot.c
--- a/mpn/generic/broot.c	Fri Nov 16 20:16:54 2012 +0100
+++ b/mpn/generic/broot.c	Sat Nov 17 22:46:09 2012 +0100
@@ -125,7 +125,7 @@
       return;
     }
 
-  /* For odd k, (k+1)/2 = k/2+1, and the latter avoids overflow. */ 
+  /* For odd k, (k+1)/2 = k/2+1, and the latter avoids overflow. */
   kp1h = k/2 + 1;
 
   /* FIXME: Special case for two limb iteration. */
diff -r 68755226fce7 -r 137030704983 mpn/generic/brootinv.c
--- a/mpn/generic/brootinv.c	Fri Nov 16 20:16:54 2012 +0100
+++ b/mpn/generic/brootinv.c	Sat Nov 17 22:46:09 2012 +0100
@@ -46,7 +46,7 @@
    Works just for odd k.  Else the Hensel lifting degenerates.
 
    FIXME:
-   
+
      (1) Make it work for k == GMP_LIMB_MAX (k+1 below overflows).
 
      (2) Rewrite iteration as
@@ -78,15 +78,15 @@
   binvert_limb (kinv, k);
 
   /* 4-bit initial approximation:
-        
-   y%16 | 1  3  5  7  9 11 13 15, 	
+
+   y%16 | 1  3  5  7  9 11 13 15,
     k%4 +-----------------------------
      1  | 1 11 13  7  9  3  5 15
      3  | 1  3  5  7  9 11 13 15
 
   */
   y0 = yp[0];
-  
+
   r0 = y0 ^ (((y0 << 1) ^ (y0 << 2)) & ~(k << 2) & 8);		/* 4 bits */
   r0 = kinv * (k2 * r0 - y0 * powlimb(r0, k2 & 0x7f));		/* 8 bits */
   r0 = kinv * (k2 * r0 - y0 * powlimb(r0, k2 & 0xffff));	/* 16 bits */
@@ -106,7 +106,7 @@
   rp[0] = r0;
   if (bn == 1)
     return;
-  
+
   d = 0;
   for (; bn > 1; bn = (bn + 1) >> 1)
     order[d++] = bn;
diff -r 68755226fce7 -r 137030704983 mpn/x86_64/bobcat/copyd.asm
--- a/mpn/x86_64/bobcat/copyd.asm	Fri Nov 16 20:16:54 2012 +0100
+++ b/mpn/x86_64/bobcat/copyd.asm	Sat Nov 17 22:46:09 2012 +0100
@@ -21,7 +21,7 @@
 
 C	     cycles/limb
 C AMD K8,K9	 1
-C AMD K10	 1-2  (alignment fluctuations) 
+C AMD K10	 1-2  (alignment fluctuations)
 C AMD bd1	 ?
 C AMD bobcat	 1.5
 C Intel P4	 2.8
diff -r 68755226fce7 -r 137030704983 mpn/x86_64/bobcat/copyi.asm
--- a/mpn/x86_64/bobcat/copyi.asm	Fri Nov 16 20:16:54 2012 +0100
+++ b/mpn/x86_64/bobcat/copyi.asm	Sat Nov 17 22:46:09 2012 +0100
@@ -21,7 +21,7 @@
 
 C	     cycles/limb
 C AMD K8,K9	 1
-C AMD K10	 1-2  (alignment fluctuations) 
+C AMD K10	 1-2  (alignment fluctuations)
 C AMD bd1	 ?
 C AMD bobcat	 1.5
 C Intel P4	 2.8
diff -r 68755226fce7 -r 137030704983 mpn/x86_64/fastsse/lshift-movdqu2.asm
--- a/mpn/x86_64/fastsse/lshift-movdqu2.asm	Fri Nov 16 20:16:54 2012 +0100
+++ b/mpn/x86_64/fastsse/lshift-movdqu2.asm	Sat Nov 17 22:46:09 2012 +0100
@@ -40,7 +40,7 @@
 C
 C This variant rely on fast load movdqu, and uses it even for aligned operands,
 C in order to avoid the need for two separate loops.
-C 
+C
 C TODO
 C  * Could 2-limb wind-down code be simplified?
 C  * Improve basecase code, using shld/shrd for SBR, discrete integer shifts
diff -r 68755226fce7 -r 137030704983 mpn/x86_64/fastsse/lshiftc-movdqu2.asm
--- a/mpn/x86_64/fastsse/lshiftc-movdqu2.asm	Fri Nov 16 20:16:54 2012 +0100
+++ b/mpn/x86_64/fastsse/lshiftc-movdqu2.asm	Sat Nov 17 22:46:09 2012 +0100
@@ -40,7 +40,7 @@
 C
 C This variant rely on fast load movdqu, and uses it even for aligned operands,
 C in order to avoid the need for two separate loops.
-C 
+C
 C TODO
 C  * Could 2-limb wind-down code be simplified?
 C  * Improve basecase code, using shld/shrd for SBR, discrete integer shifts
diff -r 68755226fce7 -r 137030704983 mpn/x86_64/fastsse/rshift-movdqu2.asm
--- a/mpn/x86_64/fastsse/rshift-movdqu2.asm	Fri Nov 16 20:16:54 2012 +0100
+++ b/mpn/x86_64/fastsse/rshift-movdqu2.asm	Sat Nov 17 22:46:09 2012 +0100
@@ -40,7 +40,7 @@
 C
 C This variant rely on fast load movdqu, and uses it even for aligned operands,
 C in order to avoid the need for two separate loops.
-C 
+C
 C TODO
 C  * Could 2-limb wind-down code be simplified?
 C  * Improve basecase code, using shld/shrd for SBR, discrete integer shifts
diff -r 68755226fce7 -r 137030704983 mpz/bin_uiui.c
--- a/mpz/bin_uiui.c	Fri Nov 16 20:16:54 2012 +0100
+++ b/mpz/bin_uiui.c	Sat Nov 17 22:46:09 2012 +0100
@@ -375,7 +375,7 @@
    (with inverses).
 */
 
-/* bin2kk[i - ODD_CENTRAL_BINOMIAL_OFFSET] = 
+/* bin2kk[i - ODD_CENTRAL_BINOMIAL_OFFSET] =
    binomial(i*2,i)/2^t (where t is chosen so that it is odd). */
 static const mp_limb_t bin2kk[] = { ONE_LIMB_ODD_CENTRAL_BINOMIAL_TABLE };
 
diff -r 68755226fce7 -r 137030704983 tests/mpn/t-brootinv.c
--- a/tests/mpn/t-brootinv.c	Fri Nov 16 20:16:54 2012 +0100
+++ b/tests/mpn/t-brootinv.c	Sat Nov 17 22:46:09 2012 +0100
@@ -84,7 +84,7 @@
       mpn_brootinv (rp, ap, n, k, scratch);
       mpn_powlo (pp, rp, &k, 1, n, scratch);
       mpn_mullo_n (app, ap, pp, n);
-      
+
       if (app[0] != 1 || !mpn_zero_p (app+1, n-1))
 	{
 	  gmp_fprintf (stderr,
diff -r 68755226fce7 -r 137030704983 tests/mpz/t-mfac_uiui.c
--- a/tests/mpz/t-mfac_uiui.c	Fri Nov 16 20:16:54 2012 +0100
+++ b/tests/mpz/t-mfac_uiui.c	Sat Nov 17 22:46:09 2012 +0100
@@ -62,7 +62,7 @@
   m2 = 0;
   for (n = 0; n <= limit;)
     {
-      mpz_mfac_uiui (res, n, MULTIFAC_WHEEL); 
+      mpz_mfac_uiui (res, n, MULTIFAC_WHEEL);
       MPZ_CHECK_FORMAT (res);
       if (mpz_cmp (ref[m], res) != 0)
         {
@@ -71,7 +71,7 @@
           printf ("  want "); mpz_out_str (stdout, 10, ref[m]); printf("\n");
           abort ();
         }
-      mpz_mfac_uiui (res, n, MULTIFAC_WHEEL2); 
+      mpz_mfac_uiui (res, n, MULTIFAC_WHEEL2);
       MPZ_CHECK_FORMAT (res);
       if (mpz_cmp (ref2[m2], res) != 0)
         {
@@ -91,7 +91,7 @@
       else n += step;
     }
   mpz_fac_ui (ref[0], n);
-  mpz_mfac_uiui (res, n, 1); 
+  mpz_mfac_uiui (res, n, 1);
   MPZ_CHECK_FORMAT (res);
   if (mpz_cmp (ref[0], res) != 0)
     {
@@ -102,7 +102,7 @@
     }
 
   mpz_2fac_ui (ref[0], n);
-  mpz_mfac_uiui (res, n, 2); 
+  mpz_mfac_uiui (res, n, 2);
   MPZ_CHECK_FORMAT (res);
   if (mpz_cmp (ref[0], res) != 0)
     {
@@ -114,7 +114,7 @@
 
   n++;
   mpz_2fac_ui (ref[0], n);
-  mpz_mfac_uiui (res, n, 2); 
+  mpz_mfac_uiui (res, n, 2);
   MPZ_CHECK_FORMAT (res);
   if (mpz_cmp (ref[0], res) != 0)
     {
diff -r 68755226fce7 -r 137030704983 tune/speed.c
--- a/tune/speed.c	Fri Nov 16 20:16:54 2012 +0100
+++ b/tune/speed.c	Sat Nov 17 22:46:09 2012 +0100
@@ -373,7 +373,7 @@
   { "mpn_broot",               speed_mpn_broot,    FLAG_R },
   { "mpn_broot_invm1",         speed_mpn_broot_invm1, FLAG_R },
   { "mpn_brootinv",            speed_mpn_brootinv, FLAG_R },
-  
+
   { "mpn_get_str",          speed_mpn_get_str,     FLAG_R_OPTIONAL },
   { "mpn_set_str",          speed_mpn_set_str,     FLAG_R_OPTIONAL },
   { "mpn_set_str_basecase", speed_mpn_bc_set_str,  FLAG_R_OPTIONAL },


More information about the gmp-commit mailing list