diff --git a/include/gpu.hpp b/include/gpu.hpp index 428407a..58e7e6e 100644 --- a/include/gpu.hpp +++ b/include/gpu.hpp @@ -4,10 +4,6 @@ #include #include - -#define REL_METRICS_PATH "/../../gpu_metrics" // gpu_metrics path relative to hwmon path -#define MAX_METRICS_LENGTH 512 // length of the metrics buffer - /* clean abstraction for gpu_metrics or metrics in filesystem in sane units */ namespace gpu { diff --git a/src/gpu.cpp b/src/gpu.cpp index 8fab334..abff8e2 100644 --- a/src/gpu.cpp +++ b/src/gpu.cpp @@ -9,6 +9,9 @@ namespace gpu { +const std::string rel_metrics_path = "/../../gpu_metrics"; // gpu_metrics path relative to hwmon path +constexpr uint16_t max_metrics_length = 512; // length of the metrics buffer + /* takes pointer to a target gpu::sensors struct and updates its hwmon path and detects gpu_metrics */ void detectHwmon(gpuSensors* target, const std::string& pci) { target->hwmon = utils::getFirstDir("/sys/bus/pci/devices/" + pci + "/hwmon");