MCPcopy Create free account
hub / github.com/Kitware/CMake / GetCPUDescription

Method GetCPUDescription

Source/kwsys/SystemInformation.cxx:599–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597}
598
599std::string SystemInformation::GetCPUDescription()
600{
601 std::ostringstream oss;
602 oss << this->GetNumberOfPhysicalCPU() << " core ";
603 if (this->GetModelName().empty()) {
604 oss << this->GetProcessorClockFrequency() << " MHz "
605 << this->GetVendorString() << " " << this->GetExtendedProcessorName();
606 } else {
607 oss << this->GetModelName();
608 }
609
610 // remove extra spaces
611 std::string tmp = oss.str();
612 size_t pos;
613 while ((pos = tmp.find(" ")) != std::string::npos) {
614 tmp.replace(pos, 2, " ");
615 }
616
617 return tmp;
618}
619
620char const* SystemInformation::GetOSName()
621{

Callers 1

GetValueFunction · 0.80

Calls 8

GetModelNameMethod · 0.95
GetVendorStringMethod · 0.95
strMethod · 0.80
emptyMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected