mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
Fix #26. Guess number of VPUs according to microarchitecture
This commit is contained in:
@@ -631,10 +631,9 @@ char* get_str_peak_performance(struct cpuInfo* cpu, struct topology* topo, int64
|
||||
}
|
||||
|
||||
double flops = topo->physical_cores * topo->sockets * (freq*1000000);
|
||||
int vpus = get_number_of_vpus(cpu);
|
||||
|
||||
// Intel USUALLY has two VPUs. I have never seen an AMD
|
||||
// with two VPUs.
|
||||
if(cpu->cpu_vendor == VENDOR_INTEL) flops = flops * 2;
|
||||
flops = flops * vpus;
|
||||
|
||||
if(cpu->FMA3 || cpu->FMA4)
|
||||
flops = flops*2;
|
||||
|
||||
Reference in New Issue
Block a user