numpy.distutils.ccompiler_opt.CCompilerOpt.parse_targets#

方法

distutils.ccompiler_opt.CCompilerOpt.parse_targets(source)[source]#

獲取並解析定義目標 CPU 功能所需的配置語句,語句應在原始碼頂部以 **C** 註解形式宣告,並以特殊標記 **@targets** 開頭。

配置語句是一種代表 CPU 功能名稱、語句組和策略的關鍵字,它們組合在一起以確定所需的最佳化。

參數:
sourcestr

C 原始碼檔案的路徑。

回傳值:
  • bool,如果群組具有 'baseline' 選項則為 True
  • list,CPU 功能列表
  • list,額外的編譯器旗標列表