Returns a set of CPU feature names that supported by platform and the **C** compiler. Parameters ---------- names : sequence or None, optional Specify certain CPU features to test it against the **C** compiler. if None(default), it will test
(self, names=None, force_flags=None, macros=[])
| 1272 | self.feature_is_cached = True |
| 1273 | |
| 1274 | def feature_names(self, names=None, force_flags=None, macros=[]): |
| 1275 | """ |
| 1276 | Returns a set of CPU feature names that supported by platform and the **C** compiler. |
| 1277 | |
| 1278 | Parameters |
| 1279 | ---------- |
| 1280 | names : sequence or None, optional |
| 1281 | Specify certain CPU features to test it against the **C** compiler. |
| 1282 | if None(default), it will test all current supported features. |
| 1283 | **Note**: feature names must be in upper-case. |
| 1284 | |
| 1285 | force_flags : list or None, optional |
| 1286 | If None(default), default compiler flags for every CPU feature will |
| 1287 | be used during the test. |
| 1288 | |
| 1289 | macros : list of tuples, optional |
| 1290 | A list of C macro definitions. |
| 1291 | """ |
| 1292 | assert( |
| 1293 | names is None or ( |
| 1294 | not isinstance(names, str) and |
| 1295 | hasattr(names, "__iter__") |
| 1296 | ) |
| 1297 | ) |
| 1298 | assert(force_flags is None or isinstance(force_flags, list)) |
| 1299 | if names is None: |
| 1300 | names = self.feature_supported.keys() |
| 1301 | supported_names = set() |
| 1302 | for f in names: |
| 1303 | if self.feature_is_supported( |
| 1304 | f, force_flags=force_flags, macros=macros |
| 1305 | ): |
| 1306 | supported_names.add(f) |
| 1307 | return supported_names |
| 1308 | |
| 1309 | def feature_is_exist(self, name): |
| 1310 | """ |
no test coverage detected