MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / printCpuInfo

Function printCpuInfo

quest/src/api/environment.cpp:211–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209
210
211void printCpuInfo() {
212
213 using namespace printer_substrings;
214
215 // assume RAM is unknown unless it can be queried
216 string ram = un;
217 try {
218 ram = printer_getMemoryWithUnitStr(mem_tryGetLocalRamCapacityInBytes()) + pm;
219 } catch(mem::COULD_NOT_QUERY_RAM e){};
220
221 /// @todo
222 /// - CPU info e.g. speeds/caches?
223
224 print_table(
225 "cpu", {
226 {"numCpuCores", printer_toStr(std::thread::hardware_concurrency()) + pm},
227 {"numOmpProcs", (cpu_isOpenmpCompiled())? printer_toStr(cpu_getNumOpenmpProcessors()) + pm : na},
228 {"numOmpThrds", (cpu_isOpenmpCompiled())? printer_toStr(cpu_getAvailableNumThreads()) + pn : na},
229 {"cpuMemory", ram},
230 {"cpuMemoryFree", un},
231 });
232}
233
234
235void printGpuInfo() {

Callers 1

reportQuESTEnvFunction · 0.85

Calls 7

print_tableFunction · 0.85
cpu_isOpenmpCompiledFunction · 0.85
printer_toStrFunction · 0.50

Tested by

no test coverage detected