diff options
Diffstat (limited to 'mpn/x86_64/atom/gmp-mparam.h')
-rw-r--r-- | mpn/x86_64/atom/gmp-mparam.h | 104 |
1 files changed, 91 insertions, 13 deletions
diff --git a/mpn/x86_64/atom/gmp-mparam.h b/mpn/x86_64/atom/gmp-mparam.h index 1743166dc..e0f64dddc 100644 --- a/mpn/x86_64/atom/gmp-mparam.h +++ b/mpn/x86_64/atom/gmp-mparam.h @@ -53,17 +53,99 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #define MULMOD_BNM1_THRESHOLD 9 #define SQRMOD_BNM1_THRESHOLD 9 -#define MUL_FFT_TABLE { 272, 544, 1088, 1792, 5120, 12288, 49152, 196608, 786432, 0 } -#define MUL_FFT_MODF_THRESHOLD 240 -#define MUL_FFT_THRESHOLD 1856 - -#define SQR_FFT_TABLE { 272, 544, 1088, 1792, 5120, 12288, 49152, 196608, 786432, 0 } -#define SQR_FFT_MODF_THRESHOLD 216 +#define MUL_FFT_MODF_THRESHOLD 212 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 212, 5}, { 7, 4}, { 15, 5}, { 11, 6}, \ + { 6, 5}, { 13, 6}, { 7, 5}, { 15, 6}, \ + { 13, 7}, { 7, 6}, { 15, 7}, { 9, 6}, \ + { 19, 7}, { 13, 8}, { 7, 7}, { 17, 8}, \ + { 9, 7}, { 19, 8}, { 11, 7}, { 23, 8}, \ + { 13, 9}, { 7, 8}, { 17, 9}, { 11,10}, \ + { 7, 9}, { 15, 8}, { 31, 9}, { 19, 8}, \ + { 39, 9}, { 23,10}, { 15, 9}, { 39,10}, \ + { 23, 9}, { 47,11}, { 15,10}, { 31, 9}, \ + { 63,10}, { 39, 9}, { 79,10}, { 47, 9}, \ + { 95, 8}, { 191,11}, { 31,10}, { 63, 9}, \ + { 127, 8}, { 255,10}, { 71, 9}, { 143, 8}, \ + { 287,10}, { 79,11}, { 47, 9}, { 191,12}, \ + { 31,11}, { 63,10}, { 127, 9}, { 255, 8}, \ + { 511,10}, { 143, 9}, { 287, 8}, { 575,11}, \ + { 79,10}, { 159, 9}, { 319,10}, { 175, 9}, \ + { 351, 8}, { 703,10}, { 191, 9}, { 383,10}, \ + { 207, 9}, { 415,11}, { 111,10}, { 223,12}, \ + { 63,11}, { 127,10}, { 255, 9}, { 511,11}, \ + { 143,10}, { 287, 9}, { 575,11}, { 159,10}, \ + { 319,11}, { 175,10}, { 351, 9}, { 703,11}, \ + { 191,10}, { 383,11}, { 207,10}, { 415,11}, \ + { 223,10}, { 447,13}, { 63,12}, { 127,11}, \ + { 255,10}, { 511,11}, { 287,10}, { 575,12}, \ + { 159,11}, { 351,10}, { 703,12}, { 191,11}, \ + { 383,12}, { 223,11}, { 479,13}, { 127,12}, \ + { 255,11}, { 511,12}, { 287,11}, { 575,12}, \ + { 319,11}, { 639,12}, { 351,11}, { 703,13}, \ + { 191,12}, { 415,11}, { 831,12}, { 447,11}, \ + { 895,12}, { 479,13}, { 255,12}, { 511,11}, \ + { 1023,12}, { 575,11}, { 1151,13}, { 319,12}, \ + { 703,13}, { 383,12}, { 831,13}, { 447,12}, \ + { 895,14}, { 255,13}, { 511,12}, { 1023,13}, \ + { 575,12}, { 1151,13}, { 703,14}, { 383,13}, \ + { 831,12}, { 1663,13}, { 895,15}, { 255,14}, \ + { 511,13}, { 1023,12}, { 2047,13}, { 1151,14}, \ + { 639,13}, { 1407,12}, { 2815,14}, { 767,13}, \ + { 1663,14}, { 895,13}, { 1791,15}, { 32768,16}, \ + { 65536,17}, { 131072,18}, { 262144,19}, { 524288,20}, \ + {1048576,21}, {2097152,22}, {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 160 +#define MUL_FFT_THRESHOLD 1728 + +#define SQR_FFT_MODF_THRESHOLD 208 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 208, 5}, { 7, 4}, { 15, 5}, { 11, 6}, \ + { 6, 5}, { 13, 6}, { 7, 5}, { 15, 6}, \ + { 13, 7}, { 7, 6}, { 15, 7}, { 8, 6}, \ + { 17, 7}, { 17, 8}, { 9, 7}, { 19, 8}, \ + { 11, 7}, { 23, 8}, { 13, 9}, { 7, 8}, \ + { 19, 9}, { 11, 8}, { 25,10}, { 7, 9}, \ + { 15, 8}, { 31, 9}, { 19, 8}, { 39, 9}, \ + { 23,10}, { 15, 9}, { 39,10}, { 23, 9}, \ + { 47,11}, { 15,10}, { 31, 9}, { 67,10}, \ + { 39, 9}, { 79, 8}, { 159,10}, { 47,11}, \ + { 31,10}, { 63, 9}, { 127, 8}, { 255,10}, \ + { 71, 9}, { 143, 8}, { 287, 7}, { 575, 9}, \ + { 159, 8}, { 319,11}, { 47, 9}, { 191,12}, \ + { 31,11}, { 63,10}, { 127, 9}, { 255, 8}, \ + { 511,10}, { 143, 9}, { 287, 8}, { 575,10}, \ + { 159, 9}, { 319, 8}, { 639, 9}, { 351, 8}, \ + { 703,10}, { 191, 9}, { 383,10}, { 207, 9}, \ + { 415,11}, { 111,10}, { 223,12}, { 63,11}, \ + { 127,10}, { 255, 9}, { 511,11}, { 143,10}, \ + { 287, 9}, { 575,11}, { 159,10}, { 319, 9}, \ + { 639,11}, { 175,10}, { 351, 9}, { 703,11}, \ + { 191,10}, { 383,11}, { 207,10}, { 415,11}, \ + { 223,10}, { 447,13}, { 63,12}, { 127,11}, \ + { 255,10}, { 511,11}, { 287,10}, { 575,12}, \ + { 159,11}, { 319,10}, { 639,11}, { 351,10}, \ + { 703,12}, { 191,11}, { 383,10}, { 767,11}, \ + { 415,12}, { 223,11}, { 447,13}, { 127,12}, \ + { 255,11}, { 543,12}, { 287,11}, { 575,12}, \ + { 319,11}, { 639,12}, { 351,13}, { 191,12}, \ + { 383,11}, { 767,12}, { 415,11}, { 831,12}, \ + { 479,13}, { 255,10}, { 2047,12}, { 575,13}, \ + { 319,11}, { 1279,12}, { 703,13}, { 383,12}, \ + { 831,13}, { 447,12}, { 895,14}, { 255,13}, \ + { 511,12}, { 1023,13}, { 575,12}, { 1151,13}, \ + { 703,14}, { 383,13}, { 831,12}, { 1663,13}, \ + { 895,15}, { 255,14}, { 511,13}, { 1151,14}, \ + { 639,13}, { 1407,12}, { 2815,14}, { 767,13}, \ + { 1663,14}, { 895,13}, { 1791,15}, { 32768,16}, \ + { 65536,17}, { 131072,18}, { 262144,19}, { 524288,20}, \ + {1048576,21}, {2097152,22}, {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 160 #define SQR_FFT_THRESHOLD 1600 -#define MULLO_BASECASE_THRESHOLD 2 +#define MULLO_BASECASE_THRESHOLD 0 #define MULLO_DC_THRESHOLD 22 -#define MULLO_MUL_N_THRESHOLD 4141 +#define MULLO_MUL_N_THRESHOLD 3176 #define DC_DIV_QR_THRESHOLD 26 #define DC_DIVAPPR_Q_THRESHOLD 93 @@ -80,7 +162,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #define MU_DIV_QR_THRESHOLD 792 #define MU_DIVAPPR_Q_THRESHOLD 807 -#define MUPI_DIV_QR_THRESHOLD 58 +#define MUPI_DIV_QR_THRESHOLD 67 #define MU_BDIV_QR_THRESHOLD 654 #define MU_BDIV_Q_THRESHOLD 792 @@ -94,7 +176,3 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #define GET_STR_PRECOMPUTE_THRESHOLD 27 #define SET_STR_DC_THRESHOLD 254 #define SET_STR_PRECOMPUTE_THRESHOLD 1122 - -#define MUL_FFT_TABLE2 {{1,4}, {177,5}, {353,6}, {833,7}, {2177,8}, {4865,9}, {5633,8}, {6401,10}, {7169,9}, {11777,10}, {15361,9}, {19969,10}, {23553,9}, {24065,11}, {30721,10}, {48129,11}, {63489,10}, {80897,11}, {96257,10}, {97281,9}, {114177,11}, {114689,12}, {126977,11}, {129025,10}, {146945,11}, {161793,10}, {179969,11}, {194561,10}, {228353,12}, {258049,11}, {359937,12}, {389121,11}, {456705,13}, {516097,12}, {520193,11}, {588801,12}, {651265,11}, {719873,12}, {782337,11}, {849921,12}, {913409,11}, {980993,13}, {1040385,12}, {1439745,13}, {1564673,12}, {1961985,13}, {2088961,12}, {2357249,13}, {2613249,12}, {2881537,13}, {3137537,12}, {3403777,13}, {3661825,14}, {MP_SIZE_T_MAX, 0}} - -#define SQR_FFT_TABLE2 {{1,4}, {177,5}, {353,6}, {833,7}, {2177,8}, {4865,9}, {5633,8}, {6401,10}, {7169,9}, {11777,10}, {15361,9}, {19969,10}, {23553,9}, {24065,11}, {30721,10}, {48129,11}, {63489,10}, {72705,9}, {81665,11}, {96257,9}, {97793,8}, {105473,10}, {106497,12}, {126977,11}, {129025,10}, {195585,9}, {212481,11}, {228353,12}, {258049,11}, {391169,10}, {424961,11}, {457729,13}, {516097,12}, {520193,11}, {588801,12}, {651265,11}, {719873,12}, {782337,11}, {849921,12}, {916481,13}, {1040385,12}, {1439745,13}, {1564673,12}, {1830913,14}, {2080769,13}, {2088961,12}, {2355201,13}, {2613249,12}, {2879489,13}, {3137537,12}, {3162113,13}, {3227649,12}, {3395585,13}, {3661825,14}, {MP_SIZE_T_MAX, 0}} |