numpy.distutils.ccompiler_opt.CCompilerOpt.feature_implies

方法

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

返回一组由“names”表示的CPU特性

参数
名称:str或str序列

CPU功能名称(大写)。

keep_origins: bool

如果为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'}