MCPcopy Index your code
hub / github.com/numpy/numpy / get_cpuinfo_item

Method get_cpuinfo_item

numpy/_core/tests/test_cpu_features.py:101–110  ·  view source on GitHub ↗
(self, magic_key)

Source from the content-addressed store, hash-verified

99 self.features_flags = self.get_cpuinfo_item(magic_key)
100
101 def get_cpuinfo_item(self, magic_key):
102 values = set()
103 with open('/proc/cpuinfo') as fd:
104 for line in fd:
105 if not line.startswith(magic_key):
106 continue
107 flags_value = [s.strip() for s in line.split(':', 1)]
108 if len(flags_value) == 2:
109 values = values.union(flags_value[1].upper().split())
110 return values
111
112 def load_flags_auxv(self):
113 auxv = subprocess.check_output(['/bin/true'], env={"LD_SHOW_AUXV": "1"})

Callers 2

load_flags_cpuinfoMethod · 0.95
load_flagsMethod · 0.80

Calls 5

openFunction · 0.85
startswithMethod · 0.80
stripMethod · 0.80
splitMethod · 0.80
upperMethod · 0.80

Tested by

no test coverage detected