numpy.distutils.ccompiler_opt.CCompilerOpt.parse_targets

method

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

Fetch and parse configuration statements that required for defining the targeted CPU features, statements should be declared in the top of source in between C comment and start with a special mark @targets.

Configuration statements are sort of keywords representing CPU features names, group of statements and policies, combined together to determine the required optimization.

Parameters
source: str

the path of C source file.

Returns
  • bool, True if group has the ‘baseline’ option
  • list, list of CPU features
  • list, list of extra compiler flags