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
37 lines
722 B
C++
37 lines
722 B
C++
// Copyright Leon Freist
|
|
// Author Leon Freist <freist@informatik.uni-freiburg.de>
|
|
|
|
#pragma once
|
|
|
|
#if defined(HWINFO_CPU) && defined(HWINFO_GPU) && defined(HWINFO_RAM) && defined(HWINFO_DISK)
|
|
#define HWINFO_SYSTEM
|
|
|
|
#include <hwinfo/cpu.h>
|
|
#include <hwinfo/disk.h>
|
|
#include <hwinfo/gpu.h>
|
|
#include <hwinfo/ram.h>
|
|
|
|
#include <vector>
|
|
|
|
namespace hwinfo {
|
|
|
|
class System {
|
|
public:
|
|
System() = default;
|
|
|
|
std::vector<CPU>& CPUs() const;
|
|
std::vector<GPU>& GPUs() const;
|
|
std::vector<Memory>& RAMs() const;
|
|
std::vector<Disk>& Disks() const;
|
|
|
|
private:
|
|
std::vector<CPU> _cpuSockets;
|
|
std::vector<GPU> _gpus;
|
|
std::vector<Memory> _ramBars;
|
|
std::vector<Disk> _disks;
|
|
};
|
|
|
|
} // namespace hwinfo
|
|
|
|
#endif // HWINFO_SYSTEM
|