numpy.distutils.ccompiler_opt.CCompilerOpt.feature_c_preprocessor

method

distutils.ccompiler_opt.CCompilerOpt.feature_c_preprocessor(feature_name, tabs=0)[source]

Generate C preprocessor definitions and include headers of a CPU feature.

Parameters
‘feature_name’: str

CPU feature name in uppercase.

‘tabs’: int

if > 0, align the generated strings to the right depend on number of tabs.

Returns
str, generated C preprocessor

Examples

>>> self.feature_c_preprocessor("SSE3")
/** SSE3 **/
#define NPY_HAVE_SSE3 1
#include <pmmintrin.h>