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

Method cc_normalize_flags

numpy/distutils/ccompiler_opt.py:1112–1141  ·  view source on GitHub ↗

Remove the conflicts that caused due gathering implied features flags. Parameters ---------- 'flags' list, compiler flags flags should be sorted from the lowest to the highest interest. Returns ------- list, filtered from any con

(self, flags)

Source from the content-addressed store, hash-verified

1110 return test
1111
1112 def cc_normalize_flags(self, flags):
1113 """
1114 Remove the conflicts that caused due gathering implied features flags.
1115
1116 Parameters
1117 ----------
1118 'flags' list, compiler flags
1119 flags should be sorted from the lowest to the highest interest.
1120
1121 Returns
1122 -------
1123 list, filtered from any conflicts.
1124
1125 Examples
1126 --------
1127 >>> self.cc_normalize_flags(['-march=armv8.2-a+fp16', '-march=armv8.2-a+dotprod'])
1128 ['armv8.2-a+fp16+dotprod']
1129
1130 >>> self.cc_normalize_flags(
1131 ['-msse', '-msse2', '-msse3', '-mssse3', '-msse4.1', '-msse4.2', '-mavx', '-march=core-avx2']
1132 )
1133 ['-march=core-avx2']
1134 """
1135 assert(isinstance(flags, list))
1136 if self.cc_is_gcc or self.cc_is_clang or self.cc_is_icc:
1137 return self._cc_normalize_unix(flags)
1138
1139 if self.cc_is_msvc or self.cc_is_iccw:
1140 return self._cc_normalize_win(flags)
1141 return flags
1142
1143 _cc_normalize_unix_mrgx = re.compile(
1144 # 1- to check the highest of

Callers 1

feature_flagsMethod · 0.80

Calls 2

_cc_normalize_unixMethod · 0.95
_cc_normalize_winMethod · 0.95

Tested by

no test coverage detected