mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-24 23:40:39 +01:00
WIP
This commit is contained in:
@@ -88,19 +88,15 @@ void* measure_freq(void *freq_ptr) {
|
|||||||
double* freq_vector_ptr = freq_vector;
|
double* freq_vector_ptr = freq_vector;
|
||||||
|
|
||||||
for (int i=0; i < cpu->num_cpus; ptr = ptr->next_cpu, i++) {
|
for (int i=0; i < cpu->num_cpus; ptr = ptr->next_cpu, i++) {
|
||||||
double average_freq = vector_average_harmonic(freq_vector_ptr, ptr->topo->total_cores_module);
|
ptr->freq->max_pp = vector_average_harmonic(freq_vector_ptr, ptr->topo->total_cores_module);
|
||||||
|
printWarn("AVX2 measured freq=%d (module %d)", ptr->freq->max_pp, i);
|
||||||
ptr->freq->max = (int32_t) average_freq;
|
|
||||||
printWarn("AVX2 measured freq=%d (module %d)", ptr->freq->max, i);
|
|
||||||
|
|
||||||
freq_vector_ptr = freq_vector_ptr + ptr->topo->total_cores_module;
|
freq_vector_ptr = freq_vector_ptr + ptr->topo->total_cores_module;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
double average_freq = vector_average_harmonic(freq_vector, v);
|
cpu->freq->max_pp = vector_average_harmonic(freq_vector, v);
|
||||||
|
printWarn("AVX2 measured freq=%d\n", cpu->freq->max_pp);
|
||||||
cpu->freq->max = (int32_t) average_freq;
|
|
||||||
printWarn("AVX2 measured freq=%d\n", cpu->freq->max);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -111,7 +107,7 @@ int64_t measure_frequency(struct cpuInfo* cpu) {
|
|||||||
// We have a hybrid architecture and we have already
|
// We have a hybrid architecture and we have already
|
||||||
// measured the frequency for this module in a previous
|
// measured the frequency for this module in a previous
|
||||||
// call to this function, so now just return it.
|
// call to this function, so now just return it.
|
||||||
return get_freq(cpu->freq);
|
return get_freq_pp(cpu->freq);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user