Edit

kc3-lang/libtommath/bn_cutoffs.c

Branch :

  • Show log

    Commit

  • Author : Daniel Mendler
    Date : 2019-05-03 17:39:10
    Hash : 818d8fb7
    Message : Rework handling of tunable cutoffs * In the default settings, a cutoff X can be modified at runtime by adjusting the corresponding X_CUTOFF variable. * Tunability of the library can be disabled at compile time by defining the MP_FIXED_CUTOFFS macro. * There is an additional file tommath_cutoffs.h, which defines the default cutoffs. These can be adjusted manually or by the autotuner.

  • bn_cutoffs.c
  • #include "tommath_private.h"
    #ifdef BN_CUTOFFS_C
    /* LibTomMath, multiple-precision integer library -- Tom St Denis */
    /* SPDX-License-Identifier: Unlicense */
    
    #ifndef MP_FIXED_CUTOFFS
    #include "tommath_cutoffs.h"
    int KARATSUBA_MUL_CUTOFF = MP_DEFAULT_KARATSUBA_MUL_CUTOFF,
        KARATSUBA_SQR_CUTOFF = MP_DEFAULT_KARATSUBA_SQR_CUTOFF,
        TOOM_MUL_CUTOFF = MP_DEFAULT_TOOM_MUL_CUTOFF,
        TOOM_SQR_CUTOFF = MP_DEFAULT_TOOM_SQR_CUTOFF;
    #endif
    
    #endif