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'}