1/* gmp-mparam.h -- Compiler/machine parameter header file. 2 3Copyright 2019 Free Software Foundation, Inc. 4 5This file is part of the GNU MP Library. 6 7The GNU MP Library is free software; you can redistribute it and/or modify 8it under the terms of either: 9 10 * the GNU Lesser General Public License as published by the Free 11 Software Foundation; either version 3 of the License, or (at your 12 option) any later version. 13 14or 15 16 * the GNU General Public License as published by the Free Software 17 Foundation; either version 2 of the License, or (at your option) any 18 later version. 19 20or both in parallel, as here. 21 22The GNU MP Library is distributed in the hope that it will be useful, but 23WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 24or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 25for more details. 26 27You should have received copies of the GNU General Public License and the 28GNU Lesser General Public License along with the GNU MP Library. If not, 29see https://www.gnu.org/licenses/. */ 30 31#define GMP_LIMB_BITS 32 32#define GMP_LIMB_BYTES 4 33 34/* 1500 MHz Cortex-A5 (odroid c1) */ 35/* FFT tuning limit = 18,235,562 */ 36/* Generated by tuneup.c, 2019-10-22, gcc 4.9 */ 37 38#define MOD_1_NORM_THRESHOLD 0 /* always */ 39#define MOD_1_UNNORM_THRESHOLD 0 /* always */ 40#define MOD_1N_TO_MOD_1_1_THRESHOLD 7 41#define MOD_1U_TO_MOD_1_1_THRESHOLD 7 42#define MOD_1_1_TO_MOD_1_2_THRESHOLD 8 43#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX 44#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 23 45#define USE_PREINV_DIVREM_1 1 /* native */ 46#define DIV_QR_1N_PI1_METHOD 1 /* 132.79% faster than 2 */ 47#define DIV_QR_1_NORM_THRESHOLD MP_SIZE_T_MAX /* never */ 48#define DIV_QR_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* never */ 49#define DIV_QR_2_PI2_THRESHOLD MP_SIZE_T_MAX /* never */ 50#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ 51#define BMOD_1_TO_MOD_1_THRESHOLD 52 52 53#define DIV_1_VS_MUL_1_PERCENT 213 54 55#define MUL_TOOM22_THRESHOLD 48 56#define MUL_TOOM33_THRESHOLD 143 57#define MUL_TOOM44_THRESHOLD 262 58#define MUL_TOOM6H_THRESHOLD 414 59#define MUL_TOOM8H_THRESHOLD 527 60 61#define MUL_TOOM32_TO_TOOM43_THRESHOLD 153 62#define MUL_TOOM32_TO_TOOM53_THRESHOLD 168 63#define MUL_TOOM42_TO_TOOM53_THRESHOLD 152 64#define MUL_TOOM42_TO_TOOM63_THRESHOLD 180 65#define MUL_TOOM43_TO_TOOM54_THRESHOLD 226 66 67#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ 68#define SQR_TOOM2_THRESHOLD 66 69#define SQR_TOOM3_THRESHOLD 149 70#define SQR_TOOM4_THRESHOLD 348 71#define SQR_TOOM6_THRESHOLD 517 72#define SQR_TOOM8_THRESHOLD 608 73 74#define MULMID_TOOM42_THRESHOLD 70 75 76#define MULMOD_BNM1_THRESHOLD 26 77#define SQRMOD_BNM1_THRESHOLD 28 78 79#define MUL_FFT_MODF_THRESHOLD 660 /* k = 5 */ 80#define MUL_FFT_TABLE3 \ 81 { { 660, 5}, { 29, 6}, { 15, 5}, { 33, 6}, \ 82 { 17, 5}, { 35, 6}, { 29, 7}, { 15, 6}, \ 83 { 37, 7}, { 19, 6}, { 40, 7}, { 21, 6}, \ 84 { 43, 7}, { 37, 8}, { 19, 7}, { 43, 8}, \ 85 { 23, 7}, { 51, 8}, { 27, 7}, { 55, 8}, \ 86 { 31, 7}, { 63, 8}, { 43, 9}, { 23, 8}, \ 87 { 55, 9}, { 31, 8}, { 71, 9}, { 39, 8}, \ 88 { 83, 9}, { 47, 8}, { 99, 9}, { 55,10}, \ 89 { 31, 9}, { 63, 8}, { 127, 9}, { 79,10}, \ 90 { 47, 9}, { 103,11}, { 31,10}, { 63, 9}, \ 91 { 135,10}, { 79, 9}, { 167,10}, { 95, 9}, \ 92 { 191,10}, { 111,11}, { 63,10}, { 159,11}, \ 93 { 95,10}, { 191, 9}, { 383,12}, { 63,11}, \ 94 { 127,10}, { 255, 9}, { 511,10}, { 271,11}, \ 95 { 159,10}, { 319, 9}, { 639,10}, { 335, 9}, \ 96 { 671,11}, { 191,10}, { 383, 9}, { 767,10}, \ 97 { 399, 9}, { 799,10}, { 415,11}, { 223,12}, \ 98 { 127,11}, { 255,10}, { 511, 9}, { 1023,10}, \ 99 { 543,11}, { 287,10}, { 607,11}, { 319,10}, \ 100 { 671,11}, { 351,12}, { 191,11}, { 383,10}, \ 101 { 799,11}, { 415,10}, { 831,13}, { 127,12}, \ 102 { 255,11}, { 511,10}, { 1023,11}, { 543,10}, \ 103 { 1087,11}, { 575,10}, { 1151,11}, { 607,12}, \ 104 { 319,11}, { 703,12}, { 383,11}, { 831,12}, \ 105 { 447,11}, { 895,13}, { 255,12}, { 511,11}, \ 106 { 1087,12}, { 575,11}, { 1183,12}, { 639,11}, \ 107 { 1279,12}, { 703,13}, { 383,12}, { 767,11}, \ 108 { 1535,12}, { 895,14}, { 255,13}, { 511,12}, \ 109 { 1151,13}, { 639,12}, { 1407,13}, { 767,12}, \ 110 { 1599,13}, { 895,12}, { 1791,14}, { 511,13}, \ 111 { 1023,12}, { 2111,13}, { 1151,12}, { 2367,13}, \ 112 { 1279,12}, { 2559,13}, { 1407,14}, { 767,13}, \ 113 { 1535,12}, { 3071,13}, { 1663,12}, { 3327,13}, \ 114 { 1791,15}, { 511,14}, { 1023,13}, { 2175,12}, \ 115 { 4351,13}, { 8192,14}, { 16384,15}, { 32768,16} } 116#define MUL_FFT_TABLE3_SIZE 140 117#define MUL_FFT_THRESHOLD 7552 118 119#define SQR_FFT_MODF_THRESHOLD 590 /* k = 5 */ 120#define SQR_FFT_TABLE3 \ 121 { { 590, 5}, { 33, 6}, { 17, 5}, { 35, 6}, \ 122 { 36, 7}, { 19, 6}, { 40, 7}, { 21, 6}, \ 123 { 43, 7}, { 23, 6}, { 47, 7}, { 37, 8}, \ 124 { 19, 7}, { 43, 8}, { 23, 7}, { 49, 8}, \ 125 { 27, 7}, { 55, 8}, { 31, 7}, { 63, 8}, \ 126 { 43, 9}, { 23, 8}, { 55, 9}, { 31, 8}, \ 127 { 67, 9}, { 39, 8}, { 83, 9}, { 47, 8}, \ 128 { 95, 9}, { 55,10}, { 31, 9}, { 79,10}, \ 129 { 47, 9}, { 103,11}, { 31,10}, { 63, 9}, \ 130 { 135,10}, { 79, 9}, { 167,10}, { 95, 9}, \ 131 { 191,10}, { 111,11}, { 63,10}, { 159,11}, \ 132 { 95,10}, { 191, 9}, { 383,12}, { 63,11}, \ 133 { 127,10}, { 255, 9}, { 511,10}, { 271, 9}, \ 134 { 543,11}, { 159,10}, { 319, 9}, { 639,10}, \ 135 { 335, 9}, { 671,10}, { 351,11}, { 191,10}, \ 136 { 383, 9}, { 767,10}, { 415,12}, { 127,11}, \ 137 { 255,10}, { 511, 9}, { 1023,10}, { 543, 9}, \ 138 { 1087,11}, { 287,10}, { 575, 9}, { 1151,10}, \ 139 { 607,11}, { 319,10}, { 671,11}, { 351,12}, \ 140 { 191,11}, { 383,10}, { 799,11}, { 415,10}, \ 141 { 831,13}, { 127,12}, { 255,11}, { 511,10}, \ 142 { 1023,11}, { 543,10}, { 1087,11}, { 575,10}, \ 143 { 1151,11}, { 607,12}, { 319,11}, { 735,12}, \ 144 { 383,11}, { 831,12}, { 447,11}, { 927,13}, \ 145 { 255,12}, { 511,11}, { 1087,12}, { 575,11}, \ 146 { 1151,12}, { 639,11}, { 1279,12}, { 703,13}, \ 147 { 383,12}, { 767,11}, { 1535,12}, { 831,11}, \ 148 { 1663,12}, { 895,11}, { 1791,12}, { 959,14}, \ 149 { 255,13}, { 511,12}, { 1023,11}, { 2047,12}, \ 150 { 1151,13}, { 639,12}, { 1407,13}, { 767,12}, \ 151 { 1599,13}, { 895,12}, { 1791,14}, { 511,13}, \ 152 { 1023,12}, { 2111,13}, { 1151,12}, { 2367,13}, \ 153 { 1279,12}, { 2559,13}, { 1407,14}, { 767,13}, \ 154 { 1535,12}, { 3071,13}, { 1663,12}, { 3327,13}, \ 155 { 1791,15}, { 511,14}, { 1023,13}, { 2175,12}, \ 156 { 4351,13}, { 8192,14}, { 16384,15}, { 32768,16} } 157#define SQR_FFT_TABLE3_SIZE 144 158#define SQR_FFT_THRESHOLD 5760 159 160#define MULLO_BASECASE_THRESHOLD 0 /* always */ 161#define MULLO_DC_THRESHOLD 39 162#define MULLO_MUL_N_THRESHOLD 14709 163#define SQRLO_BASECASE_THRESHOLD 8 164#define SQRLO_DC_THRESHOLD 33 165#define SQRLO_SQR_THRESHOLD 11278 166 167#define DC_DIV_QR_THRESHOLD 36 168#define DC_DIVAPPR_Q_THRESHOLD 116 169#define DC_BDIV_QR_THRESHOLD 48 170#define DC_BDIV_Q_THRESHOLD 140 171 172#define INV_MULMOD_BNM1_THRESHOLD 95 173#define INV_NEWTON_THRESHOLD 181 174#define INV_APPR_THRESHOLD 125 175 176#define BINV_NEWTON_THRESHOLD 327 177#define REDC_1_TO_REDC_2_THRESHOLD 0 /* always */ 178#define REDC_2_TO_REDC_N_THRESHOLD 152 179 180#define MU_DIV_QR_THRESHOLD 2350 181#define MU_DIVAPPR_Q_THRESHOLD 2130 182#define MUPI_DIV_QR_THRESHOLD 98 183#define MU_BDIV_QR_THRESHOLD 1970 184#define MU_BDIV_Q_THRESHOLD 2172 185 186#define POWM_SEC_TABLE 6,37,108,624,2351 187 188#define GET_STR_DC_THRESHOLD 28 189#define GET_STR_PRECOMPUTE_THRESHOLD 44 190#define SET_STR_DC_THRESHOLD 309 191#define SET_STR_PRECOMPUTE_THRESHOLD 762 192 193#define FAC_DSC_THRESHOLD 236 194#define FAC_ODD_THRESHOLD 29 195 196#define MATRIX22_STRASSEN_THRESHOLD 25 197#define HGCD2_DIV1_METHOD 5 /* 2.92% faster than 3 */ 198#define HGCD_THRESHOLD 70 199#define HGCD_APPR_THRESHOLD 59 200#define HGCD_REDUCE_THRESHOLD 4120 201#define GCD_DC_THRESHOLD 229 202#define GCDEXT_DC_THRESHOLD 233 203#define JACOBI_BASE_METHOD 1 /* 17.07% faster than 4 */ 204 205/* Tuneup completed successfully, took 47845 seconds */ 206