1/* gmp-mparam.h -- Compiler/machine parameter header file.
2
3Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010 Free Software
4Foundation, Inc.
5
6This file is part of the GNU MP Library.
7
8The GNU MP Library is free software; you can redistribute it and/or modify
9it under the terms of the GNU Lesser General Public License as published by
10the Free Software Foundation; either version 3 of the License, or (at your
11option) any later version.
12
13The GNU MP Library is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
16License for more details.
17
18You should have received a copy of the GNU Lesser General Public License
19along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
20
21#define GMP_LIMB_BITS 64
22#define BYTES_PER_MP_LIMB 8
23
24/* 1300MHz Itanium2 (babe.fsffrance.org) */
25
26
27#define MOD_1_NORM_THRESHOLD                 0  /* always */
28#define MOD_1_UNNORM_THRESHOLD               0  /* always */
29#define MOD_1N_TO_MOD_1_1_THRESHOLD          4
30#define MOD_1U_TO_MOD_1_1_THRESHOLD          8
31#define MOD_1_1_TO_MOD_1_2_THRESHOLD         0
32#define MOD_1_2_TO_MOD_1_4_THRESHOLD        22
33#define PREINV_MOD_1_TO_MOD_1_THRESHOLD     22
34#define USE_PREINV_DIVREM_1                  1  /* native */
35#define DIVEXACT_1_THRESHOLD                 0  /* always (native) */
36#define BMOD_1_TO_MOD_1_THRESHOLD        MP_SIZE_T_MAX  /* never */
37
38#define MUL_TOOM22_THRESHOLD                44
39#define MUL_TOOM33_THRESHOLD                89
40#define MUL_TOOM44_THRESHOLD               232
41#define MUL_TOOM6H_THRESHOLD               351
42#define MUL_TOOM8H_THRESHOLD               454
43
44#define MUL_TOOM32_TO_TOOM43_THRESHOLD     101
45#define MUL_TOOM32_TO_TOOM53_THRESHOLD     160
46#define MUL_TOOM42_TO_TOOM53_THRESHOLD     138
47#define MUL_TOOM42_TO_TOOM63_THRESHOLD     159
48
49#define SQR_BASECASE_THRESHOLD              26
50#define SQR_TOOM2_THRESHOLD                119
51#define SQR_TOOM3_THRESHOLD                141
52#define SQR_TOOM4_THRESHOLD                282
53#define SQR_TOOM6_THRESHOLD                375
54#define SQR_TOOM8_THRESHOLD                527
55
56#define MULMOD_BNM1_THRESHOLD               24
57#define SQRMOD_BNM1_THRESHOLD               19
58
59#define MUL_FFT_MODF_THRESHOLD             888  /* k = 5 */
60#define MUL_FFT_TABLE3                                      \
61  { {    888, 5}, {     31, 6}, {     16, 5}, {     33, 6}, \
62    {     17, 5}, {     35, 6}, {     28, 7}, {     15, 6}, \
63    {     33, 7}, {     17, 6}, {     35, 7}, {     19, 6}, \
64    {     39, 7}, {     29, 8}, {     15, 7}, {     33, 8}, \
65    {     17, 7}, {     37, 8}, {     19, 7}, {     41, 8}, \
66    {     21, 7}, {     43, 8}, {     23, 7}, {     47, 8}, \
67    {     27, 7}, {     55, 8}, {     31, 7}, {     63, 8}, \
68    {     37, 9}, {     19, 8}, {     43, 9}, {     23, 8}, \
69    {     51, 9}, {     27, 8}, {     55, 9}, {     31, 8}, \
70    {     63, 9}, {     35, 8}, {     71, 9}, {     39, 8}, \
71    {     79, 9}, {     43,10}, {     23, 9}, {     47, 8}, \
72    {     95, 9}, {     55,10}, {     31, 9}, {     71,10}, \
73    {     39, 9}, {     83,10}, {     47, 9}, {     99,10}, \
74    {     55,11}, {     31,10}, {     63, 9}, {    127,10}, \
75    {     71, 9}, {    143,10}, {     87,11}, {     47,10}, \
76    {    111,12}, {     31,11}, {     63,10}, {    143,11}, \
77    {     79,10}, {    167,11}, {     95,10}, {    199,11}, \
78    {    111,12}, {     63,11}, {    127,10}, {    255,11}, \
79    {    143,10}, {    287,11}, {    159,10}, {    319,12}, \
80    {     95,11}, {    223,13}, {     63,12}, {    127,11}, \
81    {    287,12}, {    159,11}, {    335,12}, {    191,11}, \
82    {    383,10}, {    767,11}, {    399,12}, {    223,13}, \
83    {    127,12}, {    255,11}, {    511,10}, {   1023,12}, \
84    {    287,11}, {    575,10}, {   1151,12}, {    319,11}, \
85    {    639,10}, {   1279,11}, {    671,13}, {    191,12}, \
86    {    383,11}, {    767,10}, {   1535,12}, {    415,11}, \
87    {    831,14}, {    127,13}, {    255,12}, {    511,11}, \
88    {   1023,12}, {    543,11}, {   1087,12}, {    575,13}, \
89    {    319,12}, {    639,11}, {   1279,12}, {    671,11}, \
90    {   1343,12}, {    703,11}, {   1471,13}, {    383,12}, \
91    {    767,11}, {   1535,12}, {    799,11}, {   1599,12}, \
92    {    831,13}, {    447,12}, {    959,14}, {    255,13}, \
93    {    511,12}, {   1055,11}, {   2111,12}, {   1087,13}, \
94    {    575,12}, {   1215,11}, {   2431,12}, {   1247,13}, \
95    {    639,12}, {   1279,11}, {   2559,12}, {   1343,13}, \
96    {    703,12}, {   1471,14}, {    383,13}, {    767,12}, \
97    {   1599,13}, {    831,12}, {   1663,11}, {   3327,12}, \
98    {   1727,13}, {    895,12}, {   1791,13}, {    959,15}, \
99    {    255,14}, {    511,13}, {   1023,12}, {   2047,13}, \
100    {   1087,12}, {   2175,13}, {   1151,12}, {   2303,13}, \
101    {   1215,11}, {   4863,12}, {   2495,14}, {    639,13}, \
102    {   1343,12}, {   2687,13}, {   1471,12}, {   2943,14}, \
103    {    767,13}, {   1599,12}, {   3199,13}, {   1727,12}, \
104    {   3455,14}, {    895,13}, {   1983,12}, {   3967,15}, \
105    {    511,14}, {   1023,13}, {   2111,12}, {   4223,13}, \
106    {   2239,12}, {   4479,13}, {   2495,14}, {   1279,13}, \
107    {   2751,14}, {   1407,13}, {   2943,15}, {    767,14}, \
108    {   1535,13}, {   3199,14}, {   1663,13}, {   3455,14}, \
109    {   1791,12}, {   7167,14}, {   1919,13}, {   3967,16}, \
110    {    511,15}, {   1023,14}, {   2175,13}, {   4351,14}, \
111    {   2431,15}, {   1279,14}, {   2943,13}, {   5887,15}, \
112    {   1535,14}, {   3199,13}, {   6399,14}, {  16384,15}, \
113    {  32768,16}, {  65536,17}, { 131072,18}, { 262144,19}, \
114    { 524288,20}, {1048576,21}, {2097152,22}, {4194304,23}, \
115    {8388608,24} }
116#define MUL_FFT_TABLE3_SIZE 217
117#define MUL_FFT_THRESHOLD                 9856
118
119#define SQR_FFT_MODF_THRESHOLD             751  /* k = 5 */
120#define SQR_FFT_TABLE3                                      \
121  { {    751, 5}, {     35, 6}, {     18, 5}, {     37, 6}, \
122    {     29, 7}, {     15, 6}, {     33, 7}, {     17, 6}, \
123    {     35, 7}, {     29, 8}, {     15, 7}, {     37, 8}, \
124    {     19, 7}, {     41, 8}, {     21, 7}, {     43, 8}, \
125    {     23, 7}, {     47, 8}, {     43, 9}, {     23, 8}, \
126    {     51, 9}, {     27, 8}, {     55, 9}, {     31, 8}, \
127    {     63, 9}, {     39, 8}, {     79, 9}, {     43,10}, \
128    {     23, 9}, {     47, 8}, {     95, 9}, {     55,10}, \
129    {     31, 9}, {     67,10}, {     39, 9}, {     83,10}, \
130    {     47, 9}, {     99,10}, {     55,11}, {     31,10}, \
131    {     63, 9}, {    127,10}, {     79,11}, {     47,10}, \
132    {    103,12}, {     31,11}, {     63,10}, {    143,11}, \
133    {     79,10}, {    159,11}, {     95,10}, {    199,11}, \
134    {    111,12}, {     63,11}, {    127,10}, {    255,11}, \
135    {    143,10}, {    287,11}, {    159,12}, {     95,11}, \
136    {    191,10}, {    383,11}, {    207,13}, {     63,12}, \
137    {    127,11}, {    255,10}, {    511,11}, {    271,12}, \
138    {    159,11}, {    319,10}, {    639,11}, {    335,12}, \
139    {    191,11}, {    383,10}, {    767,12}, {    223,13}, \
140    {    127,11}, {    511,10}, {   1023,11}, {    527,12}, \
141    {    287,11}, {    575,10}, {   1151,11}, {    591,12}, \
142    {    319,11}, {    639,13}, {    191,12}, {    383,11}, \
143    {    767,10}, {   1535,11}, {    799,10}, {   1599, 9}, \
144    {   3199,14}, {    127,13}, {    255,12}, {    511, 9}, \
145    {   4095,10}, {   2111,12}, {    543,11}, {   1087,10}, \
146    {   2239,12}, {    575,10}, {   2303,13}, {    319,12}, \
147    {    671,11}, {   1471,13}, {    383,11}, {   1599,12}, \
148    {    831,11}, {   1663,12}, {    863,10}, {   3455,13}, \
149    {    447,12}, {    895,11}, {   1791,14}, {    255,13}, \
150    {    511,12}, {   1023,11}, {   2111,12}, {   1087,11}, \
151    {   2239,13}, {    575,12}, {   1215,11}, {   2495,13}, \
152    {    639,12}, {   1343,13}, {    703,12}, {   1407,14}, \
153    {    383,13}, {    767,12}, {   1599,13}, {    831,12}, \
154    {   1727,11}, {   3455,12}, {   1791,15}, {    255,14}, \
155    {    511,13}, {   1023,12}, {   2111,11}, {   4223,12}, \
156    {   2239,11}, {   4479,10}, {   8959,11}, {   4607,13}, \
157    {   1215,14}, {    639,13}, {   1343,12}, {   2815,13}, \
158    {   1471,12}, {   2943,14}, {    767,13}, {   1599,12}, \
159    {   3199,13}, {   1727,12}, {   3455,14}, {    895,13}, \
160    {   1855,12}, {   3711,13}, {   1983,12}, {   3967,15}, \
161    {    511,14}, {   1023,13}, {   2111,12}, {   4223,13}, \
162    {   2239,12}, {   4479,14}, {   1151,13}, {   2495,14}, \
163    {   1279,13}, {   2687,14}, {   1407,13}, {   2943,15}, \
164    {    767,14}, {   1535,13}, {   3071,14}, {   1663,13}, \
165    {   3327,14}, {   1791,16}, {    511,15}, {   1023,14}, \
166    {   2047,13}, {   4223,14}, {   2175,13}, {   4479,12}, \
167    {   8959,14}, {   2303,13}, {   4735,14}, {   2431,15}, \
168    {   1279,14}, {   2943,15}, {   1535,14}, {   3071,13}, \
169    {   6143,14}, {  16384,15}, {  32768,16}, {  65536,17}, \
170    { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \
171    {2097152,22}, {4194304,23}, {8388608,24} }
172#define SQR_FFT_TABLE3_SIZE 203
173#define SQR_FFT_THRESHOLD                 7552
174
175#define MULLO_BASECASE_THRESHOLD            17
176#define MULLO_DC_THRESHOLD                  91
177#define MULLO_MUL_N_THRESHOLD            19187
178
179#define DC_DIV_QR_THRESHOLD                 72
180#define DC_DIVAPPR_Q_THRESHOLD             254
181#define DC_BDIV_QR_THRESHOLD               117
182#define DC_BDIV_Q_THRESHOLD                292
183
184#define INV_MULMOD_BNM1_THRESHOLD           86
185#define INV_NEWTON_THRESHOLD               178
186#define INV_APPR_THRESHOLD                 179
187
188#define BINV_NEWTON_THRESHOLD              300
189#define REDC_1_TO_REDC_2_THRESHOLD           2
190#define REDC_2_TO_REDC_N_THRESHOLD         167
191
192#define MU_DIV_QR_THRESHOLD               1787
193#define MU_DIVAPPR_Q_THRESHOLD            1470
194#define MUPI_DIV_QR_THRESHOLD                0  /* always */
195#define MU_BDIV_QR_THRESHOLD              1787
196#define MU_BDIV_Q_THRESHOLD               2089
197
198#define MATRIX22_STRASSEN_THRESHOLD         27
199#define HGCD_THRESHOLD                     139
200#define GCD_DC_THRESHOLD                   469
201#define GCDEXT_DC_THRESHOLD                496
202#define JACOBI_BASE_METHOD                   1
203
204#define GET_STR_DC_THRESHOLD                14
205#define GET_STR_PRECOMPUTE_THRESHOLD        22
206#define SET_STR_DC_THRESHOLD              1474
207#define SET_STR_PRECOMPUTE_THRESHOLD      3495
208