numpy.distutils.ccompiler_opt.CCompilerOpt.feature_c_preprocessor#
方法
- distutils.ccompiler_opt.CCompilerOpt.feature_c_preprocessor(feature_name, tabs=0)[source]#
產生 C 前處理器定義和 CPU 功能的包含標頭檔。
- 參數:
- ‘feature_name’:字串
CPU 功能名稱,大寫。
- ‘tabs’:整數
如果 > 0,則根據 tabs 數量將產生的字串向右對齊。
- 回傳:
- 字串,產生的 C 前處理器
範例
>>> self.feature_c_preprocessor("SSE3") /** SSE3 **/ #define NPY_HAVE_SSE3 1 #include <pmmintrin.h>