CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/Common/FakeCPUDetect.cpp
Views: 1401
// Copyright (C) 2003 Dolphin Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official SVN repository and contact information can be found at15// http://code.google.com/p/dolphin-emu/1617#include "ppsspp_config.h"18#if PPSSPP_ARCH(ARM) || PPSSPP_ARCH(ARM64)19#define REAL_CPUDETECT_AVAIL 120#elif (PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64)) && !defined(__EMSCRIPTEN__)21#define REAL_CPUDETECT_AVAIL 122#elif PPSSPP_ARCH(MIPS) || PPSSPP_ARCH(MIPS64)23#define REAL_CPUDETECT_AVAIL 124#elif PPSSPP_ARCH(RISCV64)25#define REAL_CPUDETECT_AVAIL 126#elif PPSSPP_ARCH(LOONGARCH64)27#define REAL_CPUDETECT_AVAIL 128#endif2930#ifndef REAL_CPUDETECT_AVAIL31#include <cstdint>32#include <cstring>33#include <memory>3435#include "Common/CommonTypes.h"36#include "CPUDetect.h"37#include "StringUtils.h"3839CPUInfo cpu_info;4041CPUInfo::CPUInfo() {42Detect();43}4445// Detects the various cpu features46void CPUInfo::Detect()47{48memset(this, 0, sizeof(*this));49num_cores = 1;50strcpy(cpu_string, "Unknown");51strcpy(brand_string, "Unknown");5253HTT = false;54logical_cpu_count = 2;55}5657std::vector<std::string> CPUInfo::Features() {58std::vector<std::string> features;59return features;60}6162// Turn the cpu info into a string we can show63std::string CPUInfo::Summarize() {64std::string sum;65sum = StringFromFormat("%s, %i core", cpu_string, num_cores);6667auto features = Features();68for (std::string &feature : features) {69sum += ", " + feature;70}71return sum;72}73#endif747576