mirror of https://github.com/opencv/opencv.git
Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
534 B
32 lines
534 B
13 years ago
|
#include "ProcReader.h"
|
||
|
#include "StringUtils.h"
|
||
|
#include <fstream>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
map<string, string> GetCpuInfo()
|
||
|
{
|
||
|
map<string, string> result;
|
||
|
ifstream f;
|
||
12 years ago
|
|
||
13 years ago
|
f.open("/proc/cpuinfo");
|
||
|
if (f.is_open())
|
||
|
{
|
||
12 years ago
|
while (!f.eof())
|
||
12 years ago
|
{
|
||
12 years ago
|
string tmp;
|
||
|
string key;
|
||
|
string value;
|
||
|
getline(f, tmp);
|
||
|
if (ParseString(tmp, key, value))
|
||
|
{
|
||
|
result[key] = value;
|
||
|
}
|
||
12 years ago
|
}
|
||
|
}
|
||
|
|
||
13 years ago
|
f.close();
|
||
12 years ago
|
|
||
13 years ago
|
return result;
|
||
|
}
|