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


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


本文简要介绍 python 语言中numpy.distutils.ccompiler_opt.CCompilerOpt.feature_ahead的用法。

用法:

distutils.ccompiler_opt.CCompilerOpt.feature_ahead(names)

删除任何隐含特征并保留原点后,返回‘names’ 中的特征列表。

参数

‘names’: sequence

大写的 CPU 函数名称序列。

返回

按原样排序的 CPU 函数列表‘names’

例子

>>> self.feature_ahead(["SSE2", "SSE3", "SSE41"])
["SSE41"]
# assume AVX2 and FMA3 implies each other and AVX2
# is the highest interest
>>> self.feature_ahead(["SSE2", "SSE3", "SSE41", "AVX2", "FMA3"])
["AVX2"]
# assume AVX2 and FMA3 don't implies each other
>>> self.feature_ahead(["SSE2", "SSE3", "SSE41", "AVX2", "FMA3"])
["AVX2", "FMA3"]

相关用法


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