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

Function new_ccompiler_opt

numpy/distutils/ccompiler_opt.py:2648–2668  ·  view source on GitHub ↗

Create a new instance of 'CCompilerOpt' and generate the dispatch header which contains the #definitions and headers of platform-specific instruction-sets for the enabled CPU baseline and dispatch-able features. Parameters ---------- compiler : CCompiler instance dispat

(compiler, dispatch_hpath, **kwargs)

Source from the content-addressed store, hash-verified

2646 return False
2647
2648def new_ccompiler_opt(compiler, dispatch_hpath, **kwargs):
2649 """
2650 Create a new instance of 'CCompilerOpt' and generate the dispatch header
2651 which contains the #definitions and headers of platform-specific instruction-sets for
2652 the enabled CPU baseline and dispatch-able features.
2653
2654 Parameters
2655 ----------
2656 compiler : CCompiler instance
2657 dispatch_hpath : str
2658 path of the dispatch header
2659
2660 **kwargs: passed as-is to `CCompilerOpt(...)`
2661 Returns
2662 -------
2663 new instance of CCompilerOpt
2664 """
2665 opt = CCompilerOpt(compiler, **kwargs)
2666 if not os.path.exists(dispatch_hpath) or not opt.is_cached():
2667 opt.generate_dispatch_header(dispatch_hpath)
2668 return opt

Callers 2

runMethod · 0.90
runMethod · 0.90

Calls 4

is_cachedMethod · 0.95
CCompilerOptClass · 0.85
existsMethod · 0.45

Tested by

no test coverage detected