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


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


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

用法:

distutils.ccompiler_opt.CCompilerOpt.feature_implies(names, keep_origins=False)

返回 ‘names’ 暗示的一组 CPU 函数

参数

names: str or sequence of 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'}

相关用法


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