mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.98][Refactoring] Use int for peak performance, which makes code cleaner
This commit is contained in:
@@ -446,9 +446,6 @@ bool print_cpufetch_x86(struct cpuInfo* cpu, STYLE s, struct colors* cs) {
|
||||
if(art == NULL)
|
||||
return false;
|
||||
|
||||
double flops;
|
||||
bool valid_pp = get_peak_performance(cpu, cpu->topo, get_freq(cpu->freq), &flops);
|
||||
|
||||
char* uarch = get_str_uarch(cpu);
|
||||
char* manufacturing_process = get_str_process(cpu);
|
||||
char* sockets = get_str_sockets(cpu->topo);
|
||||
@@ -463,7 +460,7 @@ bool print_cpufetch_x86(struct cpuInfo* cpu, STYLE s, struct colors* cs) {
|
||||
char* l1d = get_str_l1d(cpu->cach);
|
||||
char* l2 = get_str_l2(cpu->cach);
|
||||
char* l3 = get_str_l3(cpu->cach);
|
||||
char* pp = get_str_peak_performance(flops, valid_pp);
|
||||
char* pp = get_str_peak_performance(cpu->peak_performance);
|
||||
|
||||
setAttribute(art,ATTRIBUTE_NAME,cpu_name);
|
||||
if(cpu->hv->present) {
|
||||
@@ -570,9 +567,6 @@ bool print_cpufetch_ppc(struct cpuInfo* cpu, STYLE s, struct colors* cs) {
|
||||
if(art == NULL)
|
||||
return false;
|
||||
|
||||
double flops;
|
||||
bool valid_pp = get_peak_performance(cpu, cpu->topo, get_freq(cpu->freq), &flops);
|
||||
|
||||
char* uarch = get_str_uarch(cpu);
|
||||
char* manufacturing_process = get_str_process(cpu);
|
||||
char* sockets = get_str_sockets(cpu->topo);
|
||||
@@ -586,7 +580,7 @@ bool print_cpufetch_ppc(struct cpuInfo* cpu, STYLE s, struct colors* cs) {
|
||||
char* l1d = get_str_l1d(cpu->cach);
|
||||
char* l2 = get_str_l2(cpu->cach);
|
||||
char* l3 = get_str_l3(cpu->cach);
|
||||
char* pp = get_str_peak_performance(flops, valid_pp);
|
||||
char* pp = get_str_peak_performance(cpu->peak_performance);
|
||||
|
||||
if(cpu_name != NULL) {
|
||||
setAttribute(art,ATTRIBUTE_NAME,cpu_name);
|
||||
@@ -792,9 +786,7 @@ bool print_cpufetch_arm(struct cpuInfo* cpu, STYLE s, struct colors* cs) {
|
||||
}
|
||||
}
|
||||
}
|
||||
double flops;
|
||||
bool valid_pp = get_peak_performance(cpu, &flops);
|
||||
char* pp = get_str_peak_performance(flops, valid_pp);
|
||||
char* pp = get_str_peak_performance(cpu->peak_performance);
|
||||
setAttribute(art,ATTRIBUTE_PEAK,pp);
|
||||
|
||||
if(art->n_attributes_set > NUMBER_OF_LINES) {
|
||||
|
||||
Reference in New Issue
Block a user