| 209 | |
| 210 | |
| 211 | void 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 | |
| 235 | void printGpuInfo() { |
no test coverage detected