MCPcopy Create free account
hub / github.com/numpy/numpy / _parse_policy_autovec

Method _parse_policy_autovec

numpy/distutils/ccompiler_opt.py:2193–2211  ·  view source on GitHub ↗

skip features that has no auto-vectorized support by compiler

(self, has_baseline, final_targets, extra_flags)

Source from the content-addressed store, hash-verified

2191 return has_baseline, final_targets, extra_flags
2192
2193 def _parse_policy_autovec(self, has_baseline, final_targets, extra_flags):
2194 """skip features that has no auto-vectorized support by compiler"""
2195 skipped = []
2196 for tar in final_targets[:]:
2197 if isinstance(tar, str):
2198 can = self.feature_can_autovec(tar)
2199 else: # multiple target
2200 can = all([
2201 self.feature_can_autovec(t)
2202 for t in tar
2203 ])
2204 if not can:
2205 final_targets.remove(tar)
2206 skipped.append(tar)
2207
2208 if skipped:
2209 self.dist_log("skip non auto-vectorized features", skipped)
2210
2211 return has_baseline, final_targets, extra_flags
2212
2213class CCompilerOpt(_Config, _Distutils, _Cache, _CCompiler, _Feature, _Parse):
2214 """

Callers

nothing calls this directly

Calls 3

feature_can_autovecMethod · 0.80
allFunction · 0.50
dist_logMethod · 0.45

Tested by

no test coverage detected