Files
archived-ext-hwinfo/include/hwinfo/system.h
Amin Yahyaabadi ef8fce2d91 feat: make hwinfo features modular (#98)
* 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
2024-07-24 08:41:46 +02:00

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