numpy.distutils.ccompiler_opt.CCompilerOpt.feature_ahead

方法

distutils.ccompiler_opt.CCompilerOpt.feature_ahead(names)[源代码]

删除所有隐含的特征并保留原点后,返回“names”中的特征列表。

参数
“序列名”:sequence names

CPU功能名称的大写顺序。

返回
按“名称”排序的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"]