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

Method cpu_have

numpy/core/tests/test_cpu_features.py:84–91  ·  view source on GitHub ↗
(self, feature_name)

Source from the content-addressed store, hash-verified

82 assert_features_equal(npy_have, cpu_have, feature_name)
83
84 def cpu_have(self, feature_name):
85 map_names = self.features_map.get(feature_name, feature_name)
86 if isinstance(map_names, str):
87 return map_names in self.features_flags
88 for f in map_names:
89 if f in self.features_flags:
90 return True
91 return False
92
93 def load_flags_cpuinfo(self, magic_key):
94 self.features_flags = self.get_cpuinfo_item(magic_key)

Callers 1

test_featuresMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected