bncore.c

Go to the documentation of this file.
00001 #include <tommath.h>
00002 #ifdef BNCORE_C
00003 /* LibTomMath, multiple-precision integer library -- Tom St Denis
00004  *
00005  * LibTomMath is a library that provides multiple-precision
00006  * integer arithmetic as well as number theoretic functionality.
00007  *
00008  * The library was designed directly after the MPI library by
00009  * Michael Fromberger but has been written from scratch with
00010  * additional optimizations in place.
00011  *
00012  * The library is free for all purposes without any express
00013  * guarantee it works.
00014  *
00015  * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
00016  */
00017 
00018 /* Known optimal configurations
00019 
00020  CPU                    /Compiler     /MUL CUTOFF/SQR CUTOFF
00021 -------------------------------------------------------------
00022  Intel P4 Northwood     /GCC v3.4.1   /        88/       128/LTM 0.32 ;-)
00023  AMD Athlon64           /GCC v3.4.4   /        80/       120/LTM 0.35
00024  
00025 */
00026 
00027 int     KARATSUBA_MUL_CUTOFF = 80,      /* Min. number of digits before Karatsuba multiplication is used. */
00028         KARATSUBA_SQR_CUTOFF = 120,     /* Min. number of digits before Karatsuba squaring is used. */
00029         
00030         TOOM_MUL_CUTOFF      = 350,      /* no optimal values of these are known yet so set em high */
00031         TOOM_SQR_CUTOFF      = 400; 
00032 #endif
00033 
00034 /* $Source: /cvsroot/tcl/libtommath/bncore.c,v $ */
00035 /* $Revision: 1.3 $ */
00036 /* $Date: 2006/12/01 19:45:38 $ */



Generated on Wed Mar 12 12:18:25 2008 by  doxygen 1.5.1