📄 def_config.h
字号:
* this optimization, I know of none that currently do.
* Most will avoid copying *temporary* objects in return statements,
* and NTL's default code sequence exploits this fact.
*
* To re-build after changing this flag: rm *.o; make ntl.a
*/
#endif
#if 0
#define NTL_X86_FIX
/*
* Forces the "x86 floating point fix", overriding the default behavior.
* By default, NTL will apply the "fix" if it looks like it is
* necessary, and if knows how to fix it.
* The problem addressed here is that x86 processors sometimes
* run in a mode where FP registers have more precision than doubles.
* This will cause code in quad_float.c some trouble.
* NTL can normally correctly detect the problem, and fix it,
* so you shouldn't need to worry about this or the next flag.
* To re-build after changing this flag: rm quad_float.o; make ntl.a
*
*/
#elif 0
#define NTL_NO_X86_FIX
/*
* Forces no "x86 floating point fix", overriding the default behavior.
* To re-build after changing this flag: rm quad_float.o; make ntl.a
*/
#endif
/*************************************************************************
*
* Performance Options
*
*************************************************************************/
/* One can choose one of four different stragtegies for long integer
* arithmetic: the default, NTL_LONG_LONG, NTL_AVOID_FLOAT, or NTL_SINGLE_MUL.
* The configuration wizard will choose among the first three; the use of
* NTL_SINGLE_MUL is only allowed if NTL_CLEAN_INT is not set, and its
* use is not recommended.
*
* These flags are irrelevant when NTL_GMP_LIP is set, and are simply ignored,
* except for NTL_SINGLE_MUL -- setting that causes a complie-time error.
*
*/
#if 0
#define NTL_LONG_LONG
/*
*
* For platforms that support it, this flag can be set to cause
* the low-level multiplication code to use the type "long long",
* which may yield a significant performance gain,
* but on others, it can yield no improvement and can even
* slow things down.
*
*
* See below (NTL_LONG_LONG_TYPE) for how to use a type name
* other than "long long".
*
* If you set NTL_LONG_LONG, you might also want to set
* the flag NTL_TBL_REM (see below).
*
* To re-build after changing this flag: rm lip.o; make ntl.a
*/
#elif 0
#define NTL_AVOID_FLOAT
/*
*
* On machines with slow floating point or---more comminly---slow int/float
* conversions, this flag can lead to faster code.
*
* If you set NTL_AVOID_FLOAT, you should probably also
* set NTL_TBL_REM (see below).
*
* To re-build after changing this flag: rm lip.o; make ntl.a
*/
#elif 0
#define NTL_SINGLE_MUL
/* This was developed originally to improve performance on
* ancient Sparc stations that did not have built-in integer mul
* instructions. Unless you have such an old-timer, I would not
* recommend using this option. This option only works on
* 32-bit machines with IEEE floating point, and is not truly
* portable. If you use this option, you get a 26-bit radix.
*
* To re-build after changing this flag: rm *.o; make ntl.a
*/
#endif
/* There are four strategies to implmement single-precision
* modular multiplication with precondinition (see the MulModPrecon
* function in the ZZ module): the default, NTL_SPMM_UL, and NTL_SPMM_ULL,
* and NTL_SPMM_ASM.
* This plays a crucial role in the "small prime FFT" used to
* implement polynomial arithmetic, and in other CRT-based methods
* (such as linear algebra over ZZ), as well as polynomial andd matrix
* arithmetic over zz_p.
*/
#if 0
#define NTL_SPMM_UL
/* The default MulModPrecon implementation uses a mix of
* int and float arithmetic, which may be slow on certain machines.
* This flag causes an "all integer" implementation to be used.
* It is entirely portable.
* To re-build after changing this flag: rm *.o; make ntl.a
*/
#elif 0
#define NTL_SPMM_ULL
/* Like this previous flag, this also causes an "all integer"
* implementation of MulModPrecon to be used.
* It us usually a faster implementation,
* but it is not enturely portable.
* It relies on double-word unsigned multiplication
* (see NTL_UNSIGNED_LONG_LONG_TYPE above).
*
* To re-build after changing this flag: rm *.o; make ntl.a
*/
#elif 0
#define NTL_SPMM_ASM
/* Like this previous two flag, this also causes an "all integer"
* implementation of MulModPrecon to be used.
* It relies assembler code to do double-word unsigned multiplication.
* This is only supported on a select mechines under GCC.
*
* To re-build after changing this flag: rm *.o; make ntl.a
*/
#endif
/* The next five flags NTL_AVOID_BRANCHING, NTL_TBL_REM,
* NTL_GF2X_ALTCODE, NTL_GF2X_ALTCODE1, and NTL_GF2X_NOINLINE
* are also set by the configuration wizard.
*/
#if 0
#define NTL_AVOID_BRANCHING
/*
* With this option, branches are replaced at several
* key points with equivalent code using shifts and masks.
* It may speed things up on machines with
* deep pipelines and high branch penalities.
* This flag mainly affects the implementation of the
* single-precision modular arithmetic routines.
*
* To re-build after changing this flag: rm *.o; make ntl.a
*/
#endif
#if 0
#define NTL_TBL_REM
/*
*
* With this flag, some divisions are avoided in the
* ZZ_pX multiplication routines. If you use the NTL_AVOID_FLOAT
* or NTL_LONG_LONG flags, then you should probably use this one too.
*
* Irrelevent when NTL_GMP_LIP is set.
*
* To re-build after changing this flag:
* rm lip.o; make ntl.a
*/
#endif
#if 0
#define NTL_GF2X_ALTCODE
/*
* With this option, the default strategy for implmenting low-level
* GF2X multiplication is replaced with an alternative strategy.
* This alternative strategy seems to work better on RISC machines
* with deep pipelines and high branch penalties (like a powerpc),
* but does no better (or even worse) on x86s.
*
* To re-build after changing this flag: rm GF2X.o; make ntl.a
*/
#elif 0
#define NTL_GF2X_ALTCODE1
/*
* Yest another alternative strategy for implementing GF2X
* multiplication.
*
* To re-build after changing this flag: rm GF2X.o; make ntl.a
*/
#endif
#if 0
#define NTL_GF2X_NOINLINE
/*
* By default, the low-level GF2X multiplication routine in inlined.
* This can potentially lead to some trouble on some platforms,
* and you can override the default by setting this flag.
*
* To re-build after changing this flag: rm GF2X.o; make ntl.a
*/
#endif
/* The following flag is not set by the configuration wizard; its use
* is not generally recommended.
*/
#if 0
#define NTL_FAST_INT_MUL
/*
* Really esoteric.
* If using NTL_SINGLE_MUL, and your machine
* has a fast integer multiply instruction, this might yield
* faster code. Experiment!
*
* Irrelevent when NTL_GMP_LIP is set.
*
* To re-build after changing this flag: rm *.o; make ntl.a
*/
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -