numpy.distutils.ccompiler_opt.CCompilerOpt.feature_ahead#
方法
- distutils.ccompiler_opt.CCompilerOpt.feature_ahead(names)[source]#
返回列表中 ‘names’ 后的功能,删除任何隐含的功能,并保留原有功能。
- 参数:
- ‘names’: 序列
以大写形式表示的 CPU 功能名称序列。
- 返回:
- 按原样对 ‘names’ 排序的 CPU 功能列表
示例
>>> 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"]