(BROKEN) Lib initit not working + started cuda information for GPUs

This commit is contained in:
Ben
2018-12-19 17:22:20 +00:00
parent ee4a95ec5e
commit 9c6bb25663
9 changed files with 44 additions and 17 deletions

View File

@@ -42,11 +42,11 @@ public:
double CPU_PERCENT(int core);
std::vector<double> CPU_CORE_PERCENT();
bool m_isPolling;
virtual ~CPU();
private:
std::thread* m_pollThread;
bool m_isPolling;
};
static CPU* CPU_Instance;

9
libsys/gpu.cpp Normal file
View File

@@ -0,0 +1,9 @@
#include "gpu.h"
GPU::GPU() {
}
GPU::~GPU() {
}

View File

@@ -0,0 +1,10 @@
#pragma once
class GPU {
public:
GPU();
virtual ~GPU();
};
static GPU* GPU_Instance;

13
libsys/libsys.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include "libsys.h"
void initialize_libsys() {
__cpu = new CPU();
__mem = new Memory();
__gpu = new GPU();
__sys = new System();
CPU_Instance = __cpu;
Memory_Instance = __mem;
GPU_Instance = __gpu;
System_Instance = __sys;
}

View File

@@ -3,3 +3,10 @@
#include "common.h"
#include "sys.h"
#include "temp.h"
void initialize_libsys();
static CPU* __cpu;
static Memory* __mem;
static GPU* __gpu;
static System* __sys;

View File

@@ -27,10 +27,11 @@ public:
static void MEMORY_POLL(Memory* mem);
void END_MEMORY_POLLING();
bool m_isPolling;
virtual ~Memory();
private:
std::thread* m_pollThread;
bool m_isPolling;
};
static Memory* Memory_Instance;

View File

@@ -2,16 +2,6 @@
System::System() {
this->m_Sys = new Sys();
if (CPU_Instance = NULL) {
CPU_Instance = new CPU();
}
if (Memory_Instance == NULL) {
Memory_Instance = new Memory();
}
}
Sys System::getSystemSpec() {