1/* gmp-mparam.h -- Compiler/machine parameter header file. 2 3Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009, 2010, 2012 Free 4Software Foundation, 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/* 3550 MHz POWER7 (gcc110.fsffrance.org) */ 25 26#define MOD_1_NORM_THRESHOLD 0 /* always */ 27#define MOD_1_UNNORM_THRESHOLD 0 /* always */ 28#define MOD_1N_TO_MOD_1_1_THRESHOLD 12 29#define MOD_1U_TO_MOD_1_1_THRESHOLD 6 30#define MOD_1_1_TO_MOD_1_2_THRESHOLD 7 31#define MOD_1_2_TO_MOD_1_4_THRESHOLD 34 32#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 16 33#define USE_PREINV_DIVREM_1 1 34#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ 35#define BMOD_1_TO_MOD_1_THRESHOLD 28 36 37#define MUL_TOOM22_THRESHOLD 22 38#define MUL_TOOM33_THRESHOLD 73 39#define MUL_TOOM44_THRESHOLD 202 40#define MUL_TOOM6H_THRESHOLD 393 41#define MUL_TOOM8H_THRESHOLD 592 42 43#define MUL_TOOM32_TO_TOOM43_THRESHOLD 137 44#define MUL_TOOM32_TO_TOOM53_THRESHOLD 149 45#define MUL_TOOM42_TO_TOOM53_THRESHOLD 137 46#define MUL_TOOM42_TO_TOOM63_THRESHOLD 149 47 48#define SQR_BASECASE_THRESHOLD 18 49#define SQR_TOOM2_THRESHOLD 64 50#define SQR_TOOM3_THRESHOLD 89 51#define SQR_TOOM4_THRESHOLD 184 52#define SQR_TOOM6_THRESHOLD 294 53#define SQR_TOOM8_THRESHOLD 430 54 55#define MULMOD_BNM1_THRESHOLD 17 56#define SQRMOD_BNM1_THRESHOLD 13 57 58#define MUL_FFT_MODF_THRESHOLD 408 /* k = 5 */ 59#define MUL_FFT_TABLE3 \ 60 { { 408, 5}, { 21, 6}, { 11, 5}, { 23, 6}, \ 61 { 12, 5}, { 25, 6}, { 21, 7}, { 11, 6}, \ 62 { 23, 7}, { 12, 6}, { 25, 7}, { 13, 6}, \ 63 { 27, 7}, { 25, 8}, { 13, 7}, { 28, 8}, \ 64 { 15, 7}, { 31, 8}, { 17, 7}, { 35, 8}, \ 65 { 19, 7}, { 39, 8}, { 21, 9}, { 11, 8}, \ 66 { 27, 9}, { 15, 8}, { 35, 9}, { 19, 8}, \ 67 { 43, 9}, { 23, 8}, { 49, 9}, { 27,10}, \ 68 { 15, 9}, { 31, 8}, { 63, 9}, { 43,10}, \ 69 { 23, 9}, { 51,11}, { 15,10}, { 31, 9}, \ 70 { 67,10}, { 39, 9}, { 79,10}, { 55,11}, \ 71 { 31,10}, { 79,11}, { 47,10}, { 95,12}, \ 72 { 31,11}, { 63,10}, { 135,11}, { 79,10}, \ 73 { 167,11}, { 95,10}, { 191,11}, { 111,12}, \ 74 { 63,11}, { 127,10}, { 255, 9}, { 511,11}, \ 75 { 143, 7}, { 2303,10}, { 303,11}, { 159,10}, \ 76 { 319, 9}, { 639,12}, { 95,11}, { 191,10}, \ 77 { 383,13}, { 63,12}, { 127,11}, { 255,10}, \ 78 { 511,11}, { 271,10}, { 543,11}, { 287,10}, \ 79 { 575,12}, { 159,11}, { 319,10}, { 639,11}, \ 80 { 335,10}, { 671, 9}, { 1343,11}, { 351,10}, \ 81 { 703,12}, { 191,11}, { 383,10}, { 799,11}, \ 82 { 415,10}, { 831,12}, { 223,11}, { 447,13}, \ 83 { 127,12}, { 255,11}, { 511,10}, { 1023,11}, \ 84 { 543,10}, { 1087,12}, { 287,11}, { 575,10}, \ 85 { 1151,11}, { 607,10}, { 1215,12}, { 319,11}, \ 86 { 639,10}, { 1279,11}, { 671,10}, { 1343,12}, \ 87 { 351,11}, { 703,13}, { 191,12}, { 383,11}, \ 88 { 799,10}, { 1599,12}, { 415,11}, { 831,10}, \ 89 { 1663,12}, { 447,11}, { 895,14}, { 127,13}, \ 90 { 255,12}, { 543,13}, { 319,12}, { 671,11}, \ 91 { 1343,12}, { 703,11}, { 1407,12}, { 735,13}, \ 92 { 447,12}, { 959,11}, { 1919,14}, { 255,12}, \ 93 { 1087,13}, { 575,12}, { 1215,13}, { 639,12}, \ 94 { 1343,11}, { 2687,12}, { 1471,14}, { 383,13}, \ 95 { 767,12}, { 1599,13}, { 831,10}, { 6655,12}, \ 96 { 1727,13}, { 959,12}, { 1919,11}, { 3839,14}, \ 97 { 511,11}, { 4095,13}, { 1087,12}, { 2303,13}, \ 98 { 1215,12}, { 2431,14}, { 639,13}, { 1343,12}, \ 99 { 2687,13}, { 1471,12}, { 2943,14}, { 767,13}, \ 100 { 1599,12}, { 3199,13}, { 1663,14}, { 895,13}, \ 101 { 1919,12}, { 3839,15}, { 511,14}, { 1023,13}, \ 102 { 2175,14}, { 1151,13}, { 2431,12}, { 4863,14}, \ 103 { 1407,13}, { 2943,15}, { 767,14}, { 1663,13}, \ 104 { 3327,12}, { 6655,14}, { 1919,13}, { 3839,16}, \ 105 { 511,15}, { 1023,14}, { 2175,13}, { 4351,14}, \ 106 { 2303,12}, { 9215,13}, { 4863,15}, { 1279,13}, \ 107 { 5119,14}, { 2815,13}, { 5887,15}, { 1535,14}, \ 108 { 16384,15}, { 32768,16}, { 65536,17}, { 131072,18}, \ 109 { 262144,19}, { 524288,20}, {1048576,21}, {2097152,22}, \ 110 {4194304,23}, {8388608,24} } 111#define MUL_FFT_TABLE3_SIZE 202 112#define MUL_FFT_THRESHOLD 3712 113 114#define SQR_FFT_MODF_THRESHOLD 332 /* k = 5 */ 115#define SQR_FFT_TABLE3 \ 116 { { 332, 5}, { 19, 6}, { 10, 5}, { 21, 6}, \ 117 { 21, 7}, { 11, 6}, { 23, 7}, { 21, 8}, \ 118 { 11, 7}, { 24, 8}, { 13, 7}, { 27, 8}, \ 119 { 15, 7}, { 31, 8}, { 21, 9}, { 11, 8}, \ 120 { 27, 9}, { 15, 8}, { 33, 9}, { 19, 8}, \ 121 { 39, 9}, { 23, 8}, { 47, 9}, { 27,10}, \ 122 { 15, 9}, { 39,10}, { 23, 9}, { 47,11}, \ 123 { 15,10}, { 31, 9}, { 67,10}, { 39, 9}, \ 124 { 79,10}, { 55,11}, { 31,10}, { 79,11}, \ 125 { 47,10}, { 95,12}, { 31,11}, { 63,10}, \ 126 { 127, 9}, { 255,11}, { 79,10}, { 159, 9}, \ 127 { 319,11}, { 95,10}, { 191, 9}, { 383,12}, \ 128 { 63,11}, { 127,10}, { 255, 9}, { 511,10}, \ 129 { 271, 9}, { 543,11}, { 143,10}, { 287, 9}, \ 130 { 575,10}, { 303, 9}, { 607,10}, { 319, 9}, \ 131 { 639,12}, { 95,11}, { 191,10}, { 383,13}, \ 132 { 63,12}, { 127,11}, { 255,10}, { 511,11}, \ 133 { 271,10}, { 543, 9}, { 1087,11}, { 287,10}, \ 134 { 575,11}, { 303,10}, { 607, 9}, { 1215,11}, \ 135 { 319,10}, { 639,11}, { 335,10}, { 671,11}, \ 136 { 351,10}, { 703,12}, { 191,11}, { 383,10}, \ 137 { 767,11}, { 415,10}, { 831,12}, { 223,11}, \ 138 { 447,10}, { 895,11}, { 479,10}, { 959,12}, \ 139 { 255,11}, { 511,10}, { 1023,11}, { 543,10}, \ 140 { 1087,12}, { 287,11}, { 575,10}, { 1151,11}, \ 141 { 607,10}, { 1215,12}, { 319,11}, { 639,10}, \ 142 { 1279,11}, { 671,12}, { 351,11}, { 703,13}, \ 143 { 191,12}, { 383,11}, { 767,10}, { 1535,11}, \ 144 { 831,10}, { 1663,12}, { 447,11}, { 895,12}, \ 145 { 479,11}, { 959,14}, { 127,13}, { 255,12}, \ 146 { 511,11}, { 1023,12}, { 543,11}, { 1087,12}, \ 147 { 575,11}, { 1151,12}, { 607,11}, { 1215,13}, \ 148 { 319,12}, { 639,11}, { 1279,12}, { 671,11}, \ 149 { 1343,12}, { 703,11}, { 1407,13}, { 383,12}, \ 150 { 767,11}, { 1535,12}, { 831,11}, { 1663,13}, \ 151 { 447,12}, { 959,11}, { 1919,14}, { 255,13}, \ 152 { 511,12}, { 1087,13}, { 639,12}, { 1343,13}, \ 153 { 703,12}, { 1407,14}, { 383,13}, { 767,12}, \ 154 { 1535,13}, { 831,12}, { 1663,13}, { 959,12}, \ 155 { 1919,15}, { 255,13}, { 1151,12}, { 2303,13}, \ 156 { 1215,12}, { 2431,14}, { 639,13}, { 1343,12}, \ 157 { 2687,13}, { 1407,12}, { 2815,13}, { 1471,11}, \ 158 { 5887,13}, { 1663,14}, { 895,13}, { 1919,15}, \ 159 { 511,14}, { 1023,13}, { 2175,14}, { 1151,13}, \ 160 { 2431,12}, { 4863,13}, { 2687,14}, { 1407,13}, \ 161 { 2815,15}, { 767,14}, { 1663,13}, { 3455,14}, \ 162 { 1791,13}, { 3583,14}, { 1919,13}, { 3839,16}, \ 163 { 511,15}, { 1023,14}, { 2175,13}, { 4351,15}, \ 164 { 1279,14}, { 2943,13}, { 5887,15}, { 1535,14}, \ 165 { 16384,15}, { 32768,16}, { 65536,17}, { 131072,18}, \ 166 { 262144,19}, { 524288,20}, {1048576,21}, {2097152,22}, \ 167 {4194304,23}, {8388608,24} } 168#define SQR_FFT_TABLE3_SIZE 206 169#define SQR_FFT_THRESHOLD 2752 170 171#define MULLO_BASECASE_THRESHOLD 5 172#define MULLO_DC_THRESHOLD 23 173#define MULLO_MUL_N_THRESHOLD 7246 174 175#define DC_DIV_QR_THRESHOLD 16 176#define DC_DIVAPPR_Q_THRESHOLD 64 177#define DC_BDIV_QR_THRESHOLD 62 178#define DC_BDIV_Q_THRESHOLD 156 179 180#define INV_MULMOD_BNM1_THRESHOLD 62 181#define INV_NEWTON_THRESHOLD 93 182#define INV_APPR_THRESHOLD 66 183 184#define BINV_NEWTON_THRESHOLD 294 185#define REDC_1_TO_REDC_N_THRESHOLD 74 186 187#define MU_DIV_QR_THRESHOLD 1387 188#define MU_DIVAPPR_Q_THRESHOLD 1414 189#define MUPI_DIV_QR_THRESHOLD 31 190#define MU_BDIV_QR_THRESHOLD 1210 191#define MU_BDIV_Q_THRESHOLD 1558 192 193#define MATRIX22_STRASSEN_THRESHOLD 14 194#define HGCD_THRESHOLD 108 195#define GCD_DC_THRESHOLD 333 196#define GCDEXT_DC_THRESHOLD 333 197#define JACOBI_BASE_METHOD 1 198 199#define GET_STR_DC_THRESHOLD 10 200#define GET_STR_PRECOMPUTE_THRESHOLD 22 201#define SET_STR_DC_THRESHOLD 1532 202#define SET_STR_PRECOMPUTE_THRESHOLD 3850 203