Created more functions to modify members of the CPU class via
setCPUmembername() ie. setCPUarch or setCPUcores
This commit is contained in:
parent
52a496056e
commit
65ae11560b
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
4
main.cpp
4
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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user