[前][次][番号順一覧][スレッド一覧]

ruby-changes:30600

From: akr <ko1@a...>
Date: Sun, 25 Aug 2013 01:51:28 +0900 (JST)
Subject: [ruby-changes:30600] akr:r42679 (trunk): * bignum.c (BARY_SHORT_MUL): Renamed from BARY_MUL1.

akr	2013-08-25 01:51:23 +0900 (Sun, 25 Aug 2013)

  New Revision: 42679

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42679

  Log:
    * bignum.c (BARY_SHORT_MUL): Renamed from BARY_MUL1.
      (bary_short_mul): Renamed from bary_mul1.

  Modified files:
    trunk/ChangeLog
    trunk/bignum.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42678)
+++ ChangeLog	(revision 42679)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Aug 25 01:47:47 2013  Tanaka Akira  <akr@f...>
+
+	* bignum.c (BARY_SHORT_MUL): Renamed from BARY_MUL1.
+	  (bary_short_mul): Renamed from bary_mul1.
+
 Sat Aug 24 10:35:09 2013  Tanaka Akira  <akr@f...>
 
 	* process.c (rb_clock_gettime): The emulated clock names changed.
Index: bignum.c
===================================================================
--- bignum.c	(revision 42678)
+++ bignum.c	(revision 42679)
@@ -103,7 +103,7 @@ STATIC_ASSERT(sizeof_long_and_sizeof_bdi https://github.com/ruby/ruby/blob/trunk/bignum.c#L103
 
 #define BARY_ADD(z, x, y) bary_add(BARY_ARGS(z), BARY_ARGS(x), BARY_ARGS(y))
 #define BARY_SUB(z, x, y) bary_sub(BARY_ARGS(z), BARY_ARGS(x), BARY_ARGS(y))
-#define BARY_MUL1(z, x, y) bary_mul1(BARY_ARGS(z), BARY_ARGS(x), BARY_ARGS(y))
+#define BARY_SHORT_MUL(z, x, y) bary_short_mul(BARY_ARGS(z), BARY_ARGS(x), BARY_ARGS(y))
 #define BARY_DIVMOD(q, r, x, y) bary_divmod(BARY_ARGS(q), BARY_ARGS(r), BARY_ARGS(x), BARY_ARGS(y))
 #define BARY_ZERO_P(x) bary_zero_p(BARY_ARGS(x))
 
@@ -2410,7 +2410,7 @@ rb_big_mul_toom3(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/bignum.c#L2410
 }
 
 static void
-bary_mul1(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
+bary_short_mul(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
 {
     assert(xn + yn <= zn);
 
@@ -2543,14 +2543,14 @@ bary_mul_karatsuba_branch(BDIGIT *zds, s https://github.com/ruby/ruby/blob/trunk/bignum.c#L2543
         if (xds == yds && xn == yn)
             bary_sq_fast(zds, zn, xds, xn);
         else
-            bary_mul1(zds, zn, xds, xn, yds, yn);
+            bary_short_mul(zds, zn, xds, xn, yds, yn);
         return;
     }
 
     /* normal multiplication when x or y is a sparse bignum */
     if (bary_sparse_p(xds, xn)) goto normal;
     if (bary_sparse_p(yds, yn)) {
-        bary_mul1(zds, zn, yds, yn, xds, xn);
+        bary_short_mul(zds, zn, yds, yn, xds, xn);
         return;
     }
 
@@ -2606,13 +2606,13 @@ bary_mul(BDIGIT *zds, size_t zn, const B https://github.com/ruby/ruby/blob/trunk/bignum.c#L2606
             if (xds == yds && xn == yn)
                 bary_sq_fast(zds, zn, xds, xn);
             else
-                bary_mul1(zds, zn, xds, xn, yds, yn);
+                bary_short_mul(zds, zn, xds, xn, yds, yn);
             return;
         }
     }
     else {
         if (yn < KARATSUBA_MUL_DIGITS) {
-            bary_mul1(zds, zn, yds, yn, xds, xn);
+            bary_short_mul(zds, zn, yds, yn, xds, xn);
             return;
         }
     }
@@ -3289,7 +3289,7 @@ absint_numwords_generic(size_t numbytes, https://github.com/ruby/ruby/blob/trunk/bignum.c#L3289
 
     bary_unpack(BARY_ARGS(numbytes_bary), &numbytes, 1, sizeof(numbytes), 0,
         INTEGER_PACK_NATIVE_BYTE_ORDER);
-    BARY_MUL1(val_numbits_bary, numbytes_bary, char_bit);
+    BARY_SHORT_MUL(val_numbits_bary, numbytes_bary, char_bit);
     if (nlz_bits_in_msbyte)
         BARY_SUB(val_numbits_bary, val_numbits_bary, nlz_bits_in_msbyte_bary);
     bary_unpack(BARY_ARGS(word_numbits_bary), &word_numbits, 1, sizeof(word_numbits), 0,

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]