diff --git a/include/setcpu.h b/include/setcpu.h index 009e9d4..928fc0e 100644 --- a/include/setcpu.h +++ b/include/setcpu.h @@ -3,13 +3,32 @@ /* this function's Incoming arguments are a pointer to the CPU class "CPU *pCPU" and the new mainclock speed */ -void setCPU(CPU *pCPU, float mmainclock) { - cout << "Coming from the setCPU function in setcpu.h" << endl; +void setCPUclock(CPU *pCPU, float mmainclock) { +cout << "Coming from the setCPUclock function in setcpu.h" << endl; - pCPU->mainclock = mmainclock; +pCPU->mainclock = mmainclock; cout << "Incoming main clock variable was: " << mmainclock << endl; +cout << "Leaving setCPUclock()\n\n"; +} - cout << "Leaving setCPU()\n\n"; +void setCPUarch(CPU *pCPU, std::string march) { +pCPU->architecture = march; +} + +void setCPUbits(CPU *pCPU, int mbits) { + pCPU->bits64 = mbits; +} + +void setCPUcores(CPU *pCPU, int mcores) { +pCPU->cores = mcores; +} + +void setCPUthreads(CPU *pCPU, int mthreads) { +pCPU->threads = mthreads; + // create an IF catch to set threads cores * 2 as a fall back +} +void setCPUmanufacturer(CPU *pCPU, std::string mmanufacturer) { + pCPU->manufacturer = mmanufacturer; } diff --git a/main.cpp b/main.cpp index a485df9..121868c 100644 --- a/main.cpp +++ b/main.cpp @@ -27,8 +27,10 @@ int main() { cout << "Lets tyy the setCPU function!\n"; cout << "A7800x3d main clock speed is: " << A7800x3d->mainclock << endl; - setCPU(A7800x3d, 4.8); + setCPUclock(A7800x3d, 4.8); + setCPUmanufacturer(A7800x3d, "AMD"); cout << "A7800x3d new main clock speed is: " << A7800x3d->mainclock << endl; + cout << "A7800x3d manufacturer is: " << A7800x3d->manufacturer << endl; system("sleep 3s"); return 0;