当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Python numpy CCompilerOpt.feature_c_preprocessor用法及代码示例


本文简要介绍 python 语言中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 函数名称。

‘tabs’: int

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

返回

str,生成的 C 预处理器

例子

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

相关用法


注:本文由纯净天空筛选整理自numpy.org大神的英文原创作品 numpy.distutils.ccompiler_opt.CCompilerOpt.feature_c_preprocessor。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。