mirror of
https://github.com/shadps4-emu/ext-hwinfo.git
synced 2026-01-31 00:55:22 +01:00
* feat: make hwinfo features modular * fix: use the latest available C++ standard * fix!: deprecate NO_OCL in favour of HWINFO_GPU_OPENCL * doc: add docs for the modular targets/options * fix: add preprocessor feature guards * ci: test build of all features in ci * fix: detect C++ standard after enabling C++ language
44 lines
786 B
C++
44 lines
786 B
C++
// Copyright Leon Freist
|
|
// Author Leon Freist <freist@informatik.uni-freiburg.de>
|
|
|
|
#pragma once
|
|
|
|
#ifdef HWINFO_RAM
|
|
|
|
#include <hwinfo/platform.h>
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace hwinfo {
|
|
|
|
class Memory {
|
|
public:
|
|
struct Module {
|
|
int id;
|
|
std::string vendor;
|
|
std::string name;
|
|
std::string model;
|
|
std::string serial_number;
|
|
int64_t total_Bytes;
|
|
int64_t frequency_Hz;
|
|
};
|
|
|
|
public:
|
|
Memory();
|
|
~Memory() = default;
|
|
|
|
HWI_NODISCARD const std::vector<Memory::Module>& modules() const;
|
|
HWI_NODISCARD int64_t total_Bytes() const;
|
|
HWI_NODISCARD int64_t free_Bytes() const;
|
|
HWI_NODISCARD int64_t available_Bytes() const;
|
|
|
|
private:
|
|
std::vector<Memory::Module> _modules;
|
|
};
|
|
|
|
} // namespace hwinfo
|
|
|
|
#endif // HWINFO_RAM
|