Files
fastfetch/src/detection/cpu/cpu.h
T
李通洲 e0eba8ce21 Chore: run clang-format
```bash
find . -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) ! -path "src/3rdparty/*" -print0 | xargs -0 clang-format -i
```
2026-03-29 10:03:32 +08:00

36 lines
824 B
C

#pragma once
#include "fastfetch.h"
#include "modules/cpu/option.h"
#define FF_CPU_TEMP_UNSET (-DBL_MAX)
typedef struct FFCPUCore {
uint32_t freq;
uint32_t count;
} FFCPUCore;
typedef struct FFCPUResult {
FFstrbuf name;
FFstrbuf vendor;
const char* march; // Microarchitecture
uint16_t packages;
uint16_t coresPhysical;
uint16_t coresLogical;
uint16_t coresOnline;
uint16_t numaNodes;
uint32_t frequencyBase; // GHz
uint32_t frequencyMax; // GHz
FFCPUCore coreTypes[16]; // number of P cores, E cores, etc.
double temperature;
} FFCPUResult;
const char* ffDetectCPU(const FFCPUOptions* options, FFCPUResult* cpu);
const char* ffCPUAppleCodeToName(uint32_t code);
const char* ffCPUQualcommCodeToName(uint32_t code);
void ffCPUDetectByCpuid(FFCPUResult* cpu);