numpy.distutils.ccompiler_opt.CCompilerOpt.feature_c_preprocessor

方法

distutils.ccompiler_opt.CCompilerOpt.feature_c_preprocessor(feature_name, tabs=0)[源代码]

生成C预处理器定义并包含CPU特性的头。

参数
'feature_name': str

CPU功能名称(大写)。

“制表符”:int

如果>0,则根据选项卡的数量将生成的字符串向右对齐。

返回
str,生成的C预处理器

实例

>>> self.feature_c_preprocessor("SSE3")
/** SSE3 **/
#define NPY_HAVE_SSE3 1
#include <pmmintrin.h>