numpy.distutils.ccompiler_opt.CCompilerOpt#

class numpy.distutils.ccompiler_opt.CCompilerOpt(ccompiler, cpu_baseline='min', cpu_dispatch='max', cache_path=None)[source]#

一個 CCompiler 的輔助類別,旨在提供額外的建置選項,以有效控制與 CPU 功能直接相關的編譯器最佳化。

屬性:
conf_cache_factors
conf_tmp_path

方法

cache_flush()

強制更新快取。

cc_normalize_flags(flags)

移除因收集隱含功能旗標而造成的衝突。

conf_features_partial()

傳回一個字典,其中包含平台支援的 CPU 功能,並將其餘未定義的選項累積在 conf_features 中,傳回的字典與類別屬性 conf_features 中的規則和注意事項相同,並且它也會覆寫 'conf_features' 中已設定的任何選項。

cpu_baseline_flags()

傳回最終 CPU 基準編譯器旗標的列表

cpu_baseline_names()

傳回最終 CPU 基準功能名稱的列表

cpu_dispatch_names()

傳回最終 CPU 調度功能名稱的列表

dist_compile(sources, flags[, ccompiler])

包裝 CCompiler.compile()

dist_error(*args)

引發編譯器錯誤

dist_fatal(*args)

引發 distutils 錯誤

dist_info()

傳回一個元組,其中包含關於 (平台、編譯器、extra_args) 的資訊,這是抽象類別 '_CCompiler' 發現平台環境所必需的。

dist_load_module(name, path)

從檔案載入模組,這是抽象類別 '_Cache' 所必需的。

dist_log(*args[, stderr])

印出主控台訊息

dist_test(source, flags[, macros])

如果 'CCompiler.compile()' 能夠使用特定旗標編譯原始碼檔案,則傳回 True。

feature_ahead(names)

在移除任何隱含功能並保留原始功能後,傳回 'names' 中的功能列表。

feature_c_preprocessor(feature_name[, tabs])

產生 C 前處理器定義並包含 CPU 功能的標頭檔。

feature_detect(names)

傳回需要偵測的 CPU 功能列表,並從最低到最高關注度排序。

feature_get_til(names, keyisfalse)

feature_implies_c() 相同,但在透過參數 'keyisfalse' 提供的功能選項為 False 時,停止收集隱含功能,並對傳回的功能進行排序。

feature_implies(names[, keep_origins])

傳回由 'names' 隱含的一組 CPU 功能

feature_implies_c(names)

與 feature_implies() 相同,但結合 'names'

feature_is_exist(name)

如果某個功能存在且涵蓋在 _Config.conf_features 中,則傳回 True。

feature_names([names, force_flags, macros])

傳回一組平台和 C 編譯器支援的 CPU 功能名稱。

feature_sorted(names[, reverse])

排序 CPU 功能列表,並依最低關注度排序。

feature_untied(names)

與 'feature_ahead()' 相同,但如果兩個功能互相隱含,則保留最高關注度。

generate_dispatch_header(header_path)

產生調度標頭,其中包含已啟用 CPU 基準和可調度功能的平台特定指令集的 #definitions 和標頭檔。

is_cached()

如果類別是從快取檔案載入的,則傳回 True

me(cb)

一個靜態方法,可以作為裝飾器來動態快取某些方法。

parse_targets(source)

擷取並解析定義目標 CPU 功能所需的組態語句,語句應宣告在原始碼頂部,位於 C 註解之間,並以特殊標記 @targets 開頭。

try_dispatch(sources[, src_dir, ccompiler])

編譯一個或多個可調度的原始碼並產生物件檔案,還會產生抽象 C 組態標頭檔和巨集,這些標頭檔和巨集稍後用於最終執行時間調度過程。

cache_hash

cc_test_cexpr

cc_test_flags

feature_can_autovec

feature_extra_checks

feature_flags

feature_is_supported

feature_test

report