[Gmp-commit] /var/hg/gmp: Added comment on toom functions.

mercurial at gmplib.org mercurial at gmplib.org
Wed Feb 1 10:36:05 CET 2012


details:   /var/hg/gmp/rev/d03b6015eda9
changeset: 14593:d03b6015eda9
user:      Niels M?ller <nisse at lysator.liu.se>
date:      Wed Feb 01 10:35:48 2012 +0100
description:
Added comment on toom functions.

diffstat:

 ChangeLog         |   5 +++++
 mpn/generic/mul.c |  19 +++++++++++++++++++
 2 files changed, 24 insertions(+), 0 deletions(-)

diffs (41 lines):

diff -r d7351c2ba64c -r d03b6015eda9 ChangeLog
--- a/ChangeLog	Mon Jan 30 23:59:39 2012 +0100
+++ b/ChangeLog	Wed Feb 01 10:35:48 2012 +0100
@@ -1,3 +1,8 @@
+2012-02-01  Niels Möller  <nisse at lysator.liu.se>
+
+	* mpn/generic/mul.c: Added diagram on where toom functions can be
+	called.
+
 2012-02-01  Marc Glisse  <marc.glisse at inria.fr>
 
 	* gmpxx.h (__gmp_unary_expr): Make the constructor explicit.
diff -r d7351c2ba64c -r d03b6015eda9 mpn/generic/mul.c
--- a/mpn/generic/mul.c	Mon Jan 30 23:59:39 2012 +0100
+++ b/mpn/generic/mul.c	Wed Feb 01 10:35:48 2012 +0100
@@ -28,6 +28,25 @@
 #define MUL_BASECASE_MAX_UN 500
 #endif
 
+/* Areas where the different toom algorithms can be called (extracted
+   from the t-toom*.c files, and ignoring small constant offsets):
+
+   1/6  1/5 1/4 4/13 1/3 3/8 2/5 5/11 1/2 3/5 2/3 3/4     1 vn/un
+                                       |------------------| toom22 (small)
+                                                         || toom22 (large)
+                      |-----------------------------------| toom32
+                                               |----------| toom33
+             |---------------------------------|          | toom42   
+                                       |------------------| toom43
+         |-----------------------------|                    toom52
+                                                   |------| toom44
+                              |--------------------|      | toom53
+    |-------------------------|                             toom62
+                      |--------------------|                toom63
+                          |-------------------------------| toom6h
+                                  |-----------------------| toom8h (32 bit)
+                 |----------------------------------------| toom8h (64 bit)
+*/
 #define TOOM33_OK(an,bn) (6 + 2 * an < 3 * bn)
 #define TOOM44_OK(an,bn) (12 + 3 * an < 4 * bn)
 


More information about the gmp-commit mailing list