numpy.distutils.ccompiler_opt.CCompilerOpt.feature_implies#

方法

distutils.ccompiler_opt.CCompilerOpt.feature_implies(names, keep_origins=False)[源代码]#

返回由 'names' 隐含的 CPU 特性集

参数:
names字符串或字符串序列

大写的 CPU 特性名称。

keep_origins布尔值

如果为 False(默认值),则返回的集合将不包含来自 'names' 的任何特性。这种情况仅在两个特性相互隐含时发生。

示例

>>> self.feature_implies("SSE3")
{'SSE', 'SSE2'}
>>> self.feature_implies("SSE2")
{'SSE'}
>>> self.feature_implies("SSE2", keep_origins=True)
# 'SSE2' found here since 'SSE' and 'SSE2' imply each other
{'SSE', 'SSE2'}