numpy.distutils.ccompiler_opt.CCompilerOpt.feature_implies#
方法
- distutils.ccompiler_opt.CCompilerOpt.feature_implies(names, keep_origins=False)[源码]#
返回由 'names' 推断出的 CPU 特征集
- 参数:
- namesstr 或 str序列
CPU 特征名称(大写)。
- keep_originsbool
如果为 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'}