hardwaredb/include/setcpu.h
ganome 65ae11560b
Created more functions to modify members of the CPU class via
setCPUmembername() ie. setCPUarch or setCPUcores
2025-01-28 20:11:02 -07:00

35 lines
851 B
C++

// void setCPU(){};
/* this function's Incoming arguments are a pointer to the CPU class
"CPU *pCPU" and the new mainclock speed
*/
void setCPUclock(CPU *pCPU, float mmainclock) {
cout << "Coming from the setCPUclock function in setcpu.h" << endl;
pCPU->mainclock = mmainclock;
cout << "Incoming main clock variable was: " << mmainclock << endl;
cout << "Leaving setCPUclock()\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;
}