Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in / Register
O
opencv
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Packages
    • Packages
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • submodule
  • opencv
  • Repository

Switch branch/tag
  • opencv
  • android
  • service
  • engine
  • jni
  • BinderComponent
  • ProcReader.cpp
Find file
BlameHistoryPermalink
  • Alexander Smorkalov's avatar
    Code normalization problems fixed. · 293063ee
    Alexander Smorkalov authored 12 years ago
    Rair hangs on library installation fixed.
    293063ee
ProcReader.cpp 534 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#include "ProcReader.h"
#include "StringUtils.h"
#include <fstream>

using namespace std;

map<string, string> GetCpuInfo()
{
    map<string, string> result;
    ifstream f;

    f.open("/proc/cpuinfo");
    if (f.is_open())
    {
        while (!f.eof())
        {
            string tmp;
            string key;
            string value;
            getline(f, tmp);
            if (ParseString(tmp, key, value))
            {
                result[key] = value;
            }
        }
    }

    f.close();

    return result;
}

Replace ProcReader.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.