MCPcopy Create free account
hub / github.com/ThePhD/infoware / cpuinfo_buffer

Function cpuinfo_buffer

src/cpu/quantities_cache/quantities_cache_windows.cpp:23–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22
23static std::vector<SYSTEM_LOGICAL_PROCESSOR_INFORMATION> cpuinfo_buffer() {
24 std::vector<SYSTEM_LOGICAL_PROCESSOR_INFORMATION> buffer;
25
26 DWORD byte_count = 0;
27 GetLogicalProcessorInformation(nullptr, &byte_count);
28 buffer.resize(byte_count / sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION));
29 GetLogicalProcessorInformation(buffer.data(), &byte_count);
30
31 return buffer;
32}
33
34
35// C++ified http://stackoverflow.com/a/28894219/2851815

Callers 2

quantitiesMethod · 0.85
cacheMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected